<!DOCTYPE html>
<%
/*******************************************************************************************************
* File name			: ErMacro.jsp
* Purpose			: Genarates Macro Module Reports
* Version			: 2.0
* Creation			: 27/11/2003
* Last Modified	:
							06/08/2004  M.Saravanan
							Alignment changed,Icons Added
							08/07/2004 M.Saravanan
							Applet is changed to Image
* Author				: Saravanan K
********************************************************************************************************/
%>

<%@ include file = "ErTracker.jsp" %>
<%@ page import="egurkha.reporter.*" %>
<%@ page import="com.egurkha.ini.*" %>
<%@ page import="com.eg.EgDateInfo" %>
<%@ page import = "java.text.*" %>
<%@ page import="com.eg.EgURLEncoder" %>
<!--skm (23/02/2006) -->
<%@ page import="com.eg.IniFile" %>
<%@ page import="com.eg.EgInstallInfo" %>
<%@ page import = "com.egurkha.util.DateTimeTokenizer" %>
<%@ page import = "com.egurkha.util.DateUtil" %>
<%@ page import="com.eg.EgMappingInfo"%>
<%@ page import = "com.eg.EgDbInfo" %>
<%@ page import="com.egurkha.util.StringUtils"%>
<%@ taglib prefix="egui" uri="../WEB-INF/eg-taglib.tld" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%
	IniUI iniui = IniUI.getInstance();
	UserRegistry mregistry = UserRegistry.getInstance();
	User muser = mregistry.getUser(session.getId());
	String thisLanguage = iniui.getDefaultLanguage();
	if (muser!=null)
	{
		String userLang = muser.getLanguage();
		if (userLang!=null && !userLang.equalsIgnoreCase("NULL"))
		{
			thisLanguage=userLang;
		}
	}

	ErComponentsUtils compUtil = new ErComponentsUtils(muser.getLoginID());
	EgMappingInfo mappingInfo=new EgMappingInfo(thisLanguage);
	String s_iniFile_dir = EgInstallInfo.getInstallDir()+ "/manager/config/";
	String uiFile = "eg_ui.ini";
	com.eg.IniFile egUI = new com.eg.IniFile(s_iniFile_dir + uiFile);
	String currentDateFormat = strUserDateFormat;

	String good = iniui.getStateDisplayLabel("GOOD");
	String high = iniui.getStateDisplayLabel("HIGH");
	String medium = iniui.getStateDisplayLabel("INTERMEDIATE");
	String low = iniui.getStateDisplayLabel("LOW");
	String unknown = iniui.getStateDisplayLabel("UNKNOWN");
	String s_header = "";
	String protocol =request.getScheme();
	String codeBase =protocol+"://"+request.getServerName()+":"+request.getServerPort()+"/final/reporter" ;

	EgDateInfo dateInfo = new EgDateInfo();
	ErUtils erUtils = new ErUtils();
	String s_disp_label = "";
	String s_tempLabel = "";
	String s_disp_message = "";
	Vector v_components = new Vector();
	Vector v_compType = new Vector();
	String s_timeline = new String();
	String s_selection = request.getParameter("er_selection");
	if(s_selection != null)
	{
		s_selection = erUtils.specialCharDecode(s_selection);
	}
	Hashtable ht_details = null;
	Hashtable h_macro1 = null;
	Hashtable h_macro2 = null;
	Hashtable h_dataPart = new Hashtable();
	Vector arr_table = null;
	Hashtable h_avg = new Hashtable();
	Hashtable h_max = new Hashtable();
	Enumeration e_states = null;
	ArrayList a_maxevents =  new ArrayList();
	Vector a_max = null;
	String s_start_date = new String();
	String s_end_date = new String();
	String s_sthr="";
	String s_enhr="";
	String mode="";
	String str_title = "";
	String pdfPrint = request.getParameter("pdfPrint");
String er_RmDispName = request.getParameter("er_RmDispName");
	
//	String throughSchedule = request.getParameter("throughSchedule");
	String userIdProcess = "";
	//if(throughSchedule !=null && throughSchedule.equalsIgnoreCase("true")){
		String userId = request.getParameter("er_userid");
		userIdProcess ="&er_userid="+EgURLEncoder.encode(userId,"UTF-8");
	//}


	if(s_selection != null)
	{
		if(request.getAttribute("result") != null)
		{
			ht_details = (Hashtable)request.getAttribute("result");
			s_start_date = (String) ht_details.get("sdate");
			s_end_date = (String) ht_details.get("edate");
			s_sthr = (String) ht_details.get("starthr");
			s_enhr = (String) ht_details.get("endhr");
			mode=(String) ht_details.get("mode");
			h_dataPart = (Hashtable)ht_details.get("data");
			arr_table = (Vector)h_dataPart.get("eventstable");
			a_max = (Vector)h_dataPart.get("maxduration");

			h_macro1 = (Hashtable)ht_details.get("ErPieChart");
			h_macro2 = (Hashtable)ht_details.get("ErStackedBarChart");

		}
	}

	String sdate=s_start_date;
	String edate=s_end_date;
	String st_format="";
	if(DateUtil.isDate(sdate,"MM/dd/yyyy"))
	{
		st_format = "MM/dd/yyyy";
	}
	else if(DateUtil.isDate(sdate,"dd/MM/yyyy"))
	{
		st_format = "dd/MM/yyyy";
	}
	else
	{
		st_format=currentDateFormat;
	}

	sdate =DateUtil.changeDateFormat(sdate,"MM/dd/yyyy",currentDateFormat);
	String en_format="";

	if(DateUtil.isDate(edate,"MM/dd/yyyy"))
	{
		en_format = "MM/dd/yyyy";
	}
	else if(DateUtil.isDate(edate,"dd/MM/yyyy"))
	{
		en_format = "dd/MM/yyyy";
	}
	else
	{
		en_format=currentDateFormat;
	}

	edate =DateUtil.changeDateFormat(edate,"MM/dd/yyyy",currentDateFormat);

	try
	{
		s_timeline = request.getParameter("er_timeline");
	}catch(Exception e)
	{
		System.out.println("Eception caught in ErMacro.jsp :"+e);
		e.printStackTrace();
	}
	if (s_timeline==null)
	{
		s_timeline="2weeks";
	}
	String er_enmin=request.getParameter("endmin");
	String stmin=request.getParameter("startmin");
	String st_date=request.getParameter("startdate");
	String end_date=request.getParameter("enddate");
	String start_Hr=request.getParameter("er_sthr");
	String end_Hr=request.getParameter("er_endhr");
	if(start_Hr==null)
	{
		start_Hr=request.getParameter("starthr");
	}
	if(end_Hr==null)
	{
		end_Hr=request.getParameter("endhr");
	}


	EgTimeZoneConverter converterStart=null;
	EgTimeZoneConverter converterEnd = null;
	
	converterStart = new EgTimeZoneConverter(st_date+"  "+start_Hr+":"+stmin,muser);
	converterEnd = new EgTimeZoneConverter(end_date+"  "+end_Hr+":"+er_enmin,muser);
	String st_Time = converterStart.getDateTime();
	String end_Time = converterEnd.getDateTime();
	
	s_timeline = s_timeline.toLowerCase();
	s_disp_label = request.getParameter("er_trgttype");

	if(s_disp_label == null)
		s_disp_label = "Application";

	s_tempLabel = s_disp_label;
	if(s_disp_label != null && (s_disp_label.equalsIgnoreCase("Application")))
	{
		s_tempLabel = "Component";
		s_disp_message = "Please choose an Application";
		v_components = compUtil.getAllUserComponents1();
		s_header = "Layer";
		str_title = "reporter.executive.COMPONENT";
	}
	else if(s_disp_label != null && s_disp_label.equalsIgnoreCase("CompType"))
	{
		s_tempLabel = "Component Type";
		s_disp_message = "Please choose an Component Type";
		Vector v_comp = compUtil.getAllUserComponents1();
		String s_compType = "", s_tmp = "";
		for(int i=0;i<v_comp.size();i++)
		{
			s_tmp = (String)v_comp.elementAt(i);
			s_compType = s_tmp.substring(s_tmp.lastIndexOf(":")+1);
			if(!v_components.contains(s_compType))
				v_components.add(s_compType);
		}
		s_header = "Component";
		str_title = "reporter.executive.COMPONENT TYPE";
	}
	else if(s_disp_label != null && (s_disp_label.equalsIgnoreCase("Segment") || s_disp_label.equalsIgnoreCase("Zone")) )
	{
		s_disp_message = "Please choose a Segment";
		v_components = compUtil.getUserSegments();
		s_header = "Component";
		str_title = "reporter.executive.SEGMENT";
	}
	else if(s_disp_label != null && s_disp_label.equalsIgnoreCase("Service"))
	{
		s_disp_message = "Please choose a Service";
		v_components = compUtil.getUserServices(true);
		s_header = "Component";
		str_title = "reporter.executive.SERVICE";
	}

	if(v_components == null)
		v_components = new Vector();

	Collections.sort(v_components);
	//skm (23/02/2006)
	String s_title = mappingInfo.getTextDescription("reporter.macro.DAYWISE DISTRIBUTION")+"(Minutes)";
	IniFile uiInfo = new IniFile(EgInstallInfo.getInstallDir()+"/manager/config/eg_ui.ini");
	String event_duration = null;

	if(uiInfo != null)
		event_duration = uiInfo.getValue("REPORTER","EVENTDURATION");

	if((event_duration != null) && (event_duration.equalsIgnoreCase("percent") || event_duration.equals("%")))
	{
		s_title = mappingInfo.getTextDescription("reporter.macro.DAYWISE DISTRIBUTION")+"(%)";
	}
	//skm (23/02/2006)
	EgDbInfo dbInfo = new EgDbInfo("manager");
	String fontStyleDblSingl = "";
	if((dbInfo.doubleByteEnabled || !muser.getLanguage().equals("en_US")) && !(pdfPrint !=null && pdfPrint.equalsIgnoreCase("yes")))
	{
		fontStyleDblSingl = "multi_font";
	}
	else
	{
		fontStyleDblSingl = "";
	}
%>


<!Doctype html>
<head>
<%
	if(pdfPrint !=null && pdfPrint.equalsIgnoreCase("yes"))
	{
%>
	<title>&nbsp; <egui:intnl text="reporter.common.Reporter"/> &nbsp; - &nbsp; <egui:intnl text="reporter.common.Print"/> &nbsp; </title>
<%
	}
	else
	{
%>
	<title>eG Reporter</title>
<%
	}
%>
<meta name="Author" content="">
<meta  charset="UTF-8">

	<link rel="stylesheet" type="text/css" href="../../final/styles/eGLightThemeIcons.css" />
	<link rel="stylesheet" type="text/css" href="../../final/reporter/styles/printpagestyle.css" />


<script language="JavaScript1.2" src="../reporter/scripts/er_images.js"></script>
<script language="JavaScript1.2" src="../scripts/<%=script_src%>"></script>


<script language="JavaScript1.2">
function goTo(type)
{
	document.forms[0].action = "../reporter/ErMacro.jsp";
	document.forms[0].submit();
}

function getReportData()
{
	var s_labels = document.home1.getParameter("sampleLabels");
	var s_val0 = document.home1.getParameter("sampleValues_0");
	var s_val1 = document.home1.getParameter("sampleValues_1");
	var s_val2 = document.home1.getParameter("sampleValues_2");
	var s_val3 = document.home1.getParameter("sampleValues_3");
	var s_val4 = document.home1.getParameter("sampleValues_4");
	var s_title = document.home1.getParameter("chartTitle");
	datareport = window.open("../reporter/ErMacroHome1_DReport.jsp?s_labels="+s_labels+"&s_val0="+s_val0+"&s_val1="+s_val1+"&s_val2="+s_val2+"&s_val3="+s_val3+"&s_val4="+s_val4+"&s_title="+s_title,"ReportData","toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,width=742,height=431,left=127,top=121,screenx=121,screeny=127,resizable=yes");
	datareport.focus();
}

function printGraph()
{
	var s_qryString = "../servlet/com.eg.ErControllerServlet?er_rtype=Macro&er_view=PRINT";
	printwin = window.open(s_qryString,"PrintWindow","width=792,height=464,left=0,top=85,scrollbars=1,scrollbars=yes,resizable");
}

function showGraph()
{
	if(document.forms[0].er_selection.value == -1)
	{
		alert('<egui:intnl text="reporter.common.Please choose the required parameters"/>');
	}
	else
	{
			document.forms[0].action = "../servlet/com.eg.ErControllerServlet?er_rtype=Macro&er_view=GRAPH";
			document.forms[0].submit();
	}
}

</script>
</head>

<body marginwidth="20" marginheight="20" bgcolor="#FFFFFF">

<form name="ErMacro" method="post" encoding="UTF-8">
<input type = "hidden" name="er_rType" value="Macro">
<input type = "hidden" name="er_trgttype" value=<%=request.getParameter("er_trgttype")%> >

<%
				String strLogCls = "printHeaderBoxLogo";
				if(pdfPrint !=null && pdfPrint.equalsIgnoreCase("yes"))
				{
					strLogCls = "printHeaderBoxLogo";
				}
				else
					strLogCls = "printPdfHeaderBoxLogo";

				if(pdfPrint !=null && pdfPrint.equalsIgnoreCase("yes"))
				{
%>
					<div class="<%=strLogCls%>" style="float:right;padding:10px"><img src="<%=imageName%>" border="0" /></div>
<%
				}
				else
				{
%>
					<div class="<%=strLogCls%>" style="float:right"><img src="<%=imageName%>" border="0" /></div>
<%
				}
%>
	<div class="printHeaderBox">
<%
	if (!StringUtils.isNull(er_RmDispName))
	{
%>
		<div class="printHeaderBoxTitle"><%= er_RmDispName %></div>
<%
	}
	else
	{
%>
		<div class="printHeaderBoxTitle"><egui:intnl text="reporter.common.VM CLUSTER CAPACITY REPORT"/></div>
<%
	}
%>
		<!-- <div class="printHeaderBoxContent">Content will display here if needed</div> -->
<%
	if(pdfPrint !=null && pdfPrint.equalsIgnoreCase("yes"))
	{
%>
		<div class="printHeaderBoxPrintIcon" style="float:left"><img class="iconPrinter mouse"  id="prin tbt" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" border="0" onClick="javascript:window.print()" alt='<egui:intnl text="reporter.common.PRINT"/>' title='<egui:intnl text="reporter.common.PRINT"/>'/></div>
<%
	}
%>
	</div>


<%
	String selectiontodisp="";
	if(s_selection!=null && s_selection.indexOf(":NULL")>-1)
		selectiontodisp=s_selection.substring(0,s_selection.indexOf(":"))+":"+s_selection.substring(s_selection.indexOf(":NULL")+6);
	else
	{
		//selectiontodisp=s_selection.substring(s_selection.lastIndexOf(":")+1,s_selection.length());
		selectiontodisp=s_selection;
	}
%>
	<div class="printOuterBoxNoBorder"> 
<%	String s_compdisp =selectiontodisp;
	
	//FIX FOR SUPPORT TOMCAT 6.0
	String strs_tempLabel="reporter.executive."+s_tempLabel;
	if(s_disp_label != null && s_disp_label.equalsIgnoreCase("CompType")
			|| s_disp_label.equalsIgnoreCase("Application"))
	{
		s_compdisp = s_compdisp.substring(0,s_compdisp.lastIndexOf(":")+1) + mappingInfo.getComponentTypeDescription(s_compdisp.substring(s_compdisp.lastIndexOf(":")+1));
%>
		<div class="printSelectionFields"><egui:intnl text="<%=strs_tempLabel%>"/> - <span class="bold"><egui:intnl type="<%=s_compdisp%>"/></span></div><!-- selectiontodisp-->
<%		
	}
	else if(s_disp_label.equalsIgnoreCase("Application"))
	{
		String s_comp ="";
		String s_comptype = selectiontodisp;
		if(selectiontodisp.indexOf(":")>-1)
		{
			s_comp = selectiontodisp.substring(0,selectiontodisp.indexOf(":")+1);
			s_comptype = selectiontodisp.substring(selectiontodisp.lastIndexOf(":")+1);
		}
%>
		<div class="printSelectionFields"><egui:intnl text="<%=strs_tempLabel%>"/> - <span class="bold"><%=s_comp%><egui:intnl type="<%=s_comptype%>"/></span></div>
<%
	}
	else
	{
%>
		<div class="printSelectionFields"><egui:intnl text="<%=strs_tempLabel%>"/> - <span class="bold"><%=selectiontodisp%></span></div>
<%
	}
%>
		<div class="printSelectionFields">Timeline - <span class="bold"><%=st_Time%> hrs to <%=end_Time%> hrs</span></div>
	</div>
	<div class="clearDiv"></div>

<%
	if(h_macro1 != null && h_macro1.size()>0)
	{
%>

	<table width="100%" >
		<tr>
			<td width="50%" style="padding:0px 10px 0px 0px">
				<div class="printOuterBox">
					<div class="printOuterBoxHeader"><egui:intnl text="reporter.executive.Overview of Events"/>  (%)</div>
					<div style="width:100%;overflow:auto;padding:10px"><img src="/final/servlet/com.eg.ErMacroController;jsessionid=<%=session.getId()%>?er_view=IMAGE&er_sthr=<%=start_Hr%>&er_timeline=<%=EgURLEncoder.encode(s_timeline,"UTF-8")%>&er_tbound=<%=request.getParameter("er_tbound")%>&startdate=<%=EgURLEncoder.encode(sdate,"UTF-8")%>&enddate=<%=EgURLEncoder.encode(edate,"UTF-8")%>&er_endhr=<%=end_Hr%>&er_trgttype=<%=request.getParameter("er_trgttype")%>&er_mode=<%=mode%>&er_rtype=Macro&er_selection=<%=EgURLEncoder.encode(s_selection,"UTF-8")%>&er_chartType=PieChart&er_print=yes&er_width=340&er_height=225<%=userIdProcess%>"></div>
				</div>
			</td>

			<td width="50%" style="padding:0px 0px 0px 0px">
				<div class="printOuterBox">
					<div class="printOuterBoxHeader"><%=s_title%></div>
					<div style="width:100%;overflow:auto;padding:10px"><img src="/final/servlet/com.eg.ErMacroController;jsessionid=<%=session.getId()%>?er_view=IMAGE&er_sthr=<%=start_Hr%>&er_timeline=<%=EgURLEncoder.encode(s_timeline,"UTF-8")%>&er_tbound=<%=request.getParameter("er_tbound")%>&startdate=<%=EgURLEncoder.encode(sdate,"UTF-8")%>&enddate=<%=EgURLEncoder.encode(edate,"UTF-8")%>&er_endhr=<%=end_Hr%>&er_trgttype=<%=request.getParameter("er_trgttype")%>&er_mode=<%=mode%>&er_rtype=Macro&er_selection=<%=EgURLEncoder.encode(s_selection,"UTF-8")%>&er_chartType=BarChart&er_print=yes&er_width=450&er_height=225<%=userIdProcess%>"></div>
				</div>
			</td>
		</tr>
	</table>

<div class="clearDiv">&nbsp;</div>
<%
		String rowStyle = "";
		if(a_max!=null && a_max.size()>0)
		{
		//FIX FOR TOMCAT 6.0
		String strs_header="reporter.executive."+s_header;
%>

<div class="printOuterBox">
		<div class="printOuterBoxHeader" ><egui:intnl text="reporter.executive.Top 5 Longest Events"/></div>

		<div class="newTable">
			<table align="center" width="100%" cellpadding="0" cellspacing="0" >
				<thead>
					<tr>
						<th width="25px" NOWRAP align="left"><egui:intnl text="reporter.executive.State"/></th>
						<th NOWRAP align="left"><egui:intnl text="<%=strs_header%>"/></th>
						<th width="20%" NOWRAP align="left"><egui:intnl text="reporter.executive.Duration"/></th>
						<th width="20%" NOWRAP align="left"><egui:intnl text="reporter.executive.From"/></th>
						<th width="20%" NOWRAP align="left"><egui:intnl text="reporter.executive.To"/></th>
					</tr>
				</thead>
				<tbody>
<%
			Vector newMax=new Vector();
			if(a_max!=null && a_max.size()>0)
			{
				for(int t=0;t<a_max.size();t=t+5)
				{
					String d1=(String)a_max.get(t);
					String d2=(String)a_max.get(t+1);
					String d3=(String)a_max.get(t+2);
					String d4=(String)a_max.get(t+3);
					String d5=(String)a_max.get(t+4);
					String s_shr=d4.substring(d4.indexOf(" ")+1,d4.length());
 					String e_enhr=d5.substring(d5.indexOf(" ")+1,d5.length());
					String st_dateTime="";
					String en_dateTime="";
					
						
					converterStart = new EgTimeZoneConverter(d4 , muser);
					st_dateTime = converterStart.getDateTime();
					if(d5.startsWith("Open @"))
					{
						d5 = d5.substring(d5.indexOf("@")+1,d5.length());
						d5=d5.trim();
						converterEnd = new EgTimeZoneConverter(d5 , muser);
						en_dateTime = converterEnd.getDateTime();
						en_dateTime = "Open @ "+en_dateTime;
					}
					else
					{
						converterEnd = new EgTimeZoneConverter(d5 , muser);
						en_dateTime = converterEnd.getDateTime();
					}

					SimpleDateFormat sd = new SimpleDateFormat(currentDateFormat);
					//java.util.Date tod = new java.util.Date(d4);
					//java.util.Date tod1 = new java.util.Date(d5);
					//d4 = sd.format(tod)+" "+s_shr;
					//d5=sd.format(tod1)+" "+e_enhr;
					newMax.add(d1);
					newMax.add(d2);
					newMax.add(d3);
					newMax.add(st_dateTime);
					newMax.add(en_dateTime);
				}
			}
			int i_cnt = 0;
			//String rowStyle = "";
			for(int i=0;i<newMax.size()/5;i++)
			{
	out.println("<tr" + rowStyle + ">");
				for(int j=0;j<5;j++)
				{
					//out.println(fontStyleDblSingl);
		out.println("<td align='left'>");

					String strnew = (String)newMax.elementAt(i*5+j);
					if((strnew.indexOf(":")>-1) && j<2)
					{
					//FIX FOR SUPPORT TOMCAT 6.0
					String str_strnew1=strnew.substring(0,strnew.lastIndexOf(":"));
					if(str_strnew1!=null && str_strnew1.endsWith(":NULL"))
						str_strnew1 = str_strnew1.substring(0,str_strnew1.lastIndexOf(":"));
					String str_strnew=strnew.substring(strnew.lastIndexOf(":")+1);
%>
						<%=str_strnew1%>:<egui:intnl type="<%= str_strnew%>"/>
<%
					}
					else
					{
						if(j==0)
						{
%>
						<img src="/final/images/Light/state20_<%=strnew%>.png" border="0" height="20" width="20">						
						<!--<egui:intnl text='<%="reporter.common."+strnew%>'/>-->
<%
						}
						else if(j==1)
						{
%>
						<egui:intnl layer="<%=strnew%>"/>
<%
						}
						else if(j>1)
						{
%>
						<egui:intnl layer="<%=strnew%>"/>
<%
						}
					}
		out.println("</td>");
				}
	out.println("</tr>");
								//out.println("<tr><td colspan='5'>&nbsp;</td></tr>");
				//rowStyle = rowStyle.equals("")?"ID='cellbglight'":"";
			}
%>
</tbody></table></div></div>
<%
		}
%>
<div class="clearDiv">&nbsp;</div>
<%
		//int colSpanValue = 5;
		//if(s_disp_label!=null && //(s_disp_label.equalsIgnoreCase("Segment")||s_disp_label.equalsIgnoreCase("Service")||s_disp_label.equalsIgnoreCase("CompType")))
		//{
		//	colSpanValue = 6;
		//}
		//FIX FOR SUPPOR TOMCAT 6.0
		String strs_header="reporter.executive."+s_header;
%>

	<div class="printOuterBox">
		<div class="printOuterBoxHeader" ><egui:intnl text="reporter.executive.Summary of Events"/>(%)</div>

		<div class="newTable">
			<table align="center" width="100%" cellpadding="0" cellspacing="0" >
				<thead>
					<tr>
						<th NOWRAP align="left"><egui:intnl text="<%=strs_header%>"/></th>
<%
		if(s_disp_label != null && !s_disp_label.equalsIgnoreCase("Application"))
		{
%>
						<th NOWRAP align="left"><egui:intnl text="reporter.executive.CompType"/></th>
<%
		}
			//FIX FOR SUPPORT TOMCAT 6.0
		String str_high="reporter.executive."+high;
		String str_medium="reporter.executive."+medium;
		String str_low="reporter.executive."+low;
%>

						<th NOWRAP ><egui:intnl text="<%=str_high%>"/></th>
						<th NOWRAP ><egui:intnl text="<%=str_medium%>"/></th>
						<th NOWRAP><egui:intnl text="<%=str_low%>"/></th>
						<th NOWRAP><egui:intnl text="reporter.executive.Total"/></th>
					</tr>
				</thead>
				<tbody>

<%
		//int i_grandTotal = 0;
		int rowSize = "Application".equalsIgnoreCase(s_disp_label)?5:6;
		rowStyle = "";
		if(arr_table != null)
		{
			for(int i=0;i<arr_table.size();i+=rowSize)
			{
%>
	<tr <%=rowStyle%> >
		<td align='left'>
<%
				if(arr_table.elementAt(i).toString().indexOf(":")>-1)
				{
%>
			<%=(String)arr_table.elementAt(i)%> </td>
<%
				}
				else
				{
%>
			<egui:intnl layer="<%=(String)arr_table.elementAt(i)%>"/>
		</td>
<%
				}
				if (rowSize == 6)
				{
%>
		<td align='left'><egui:intnl type="<%=(String)arr_table.elementAt(i+1)%>"/></td>
<%
				}
										//	out.println("</td>");
				//float f_total = 0;
				for(int j= rowSize - 4;j < rowSize ;j++)
				{
					String s_val = (String)arr_table.elementAt(i+j);
				out.println("<td align='center' id='tdborder'>" + s_val + "</td>");
					//f_total +=Float.parseFloat(s_val);
				}
				//out.println("<td align='center'>"+ erUtils.round(f_total,2)+ "</td></tr>");
				rowStyle = rowStyle.equals("")?"":"";
%>
	</tr>
<%
			}
		}
%>
	</tbody>
</table>
</div>
</div>
<div class="clearDiv">&nbsp;</div>

	<!-- content ends -->
<%
	}
	else if(h_macro1 != null && h_macro1.size() == 0)
	{
		//out.println("<table width='100%'><tr><td align='center'><b>No data found dass for the current selection</b></td></tr></table>");
		out.println("<table width='100%' height='100%'><tr>	<td align='center' valign='middle'><img src='/images/Light/nomeasures_custom.png' /></td></tr></table>");
	}
%>
</form>

</body>

</html>
<%
	if(pdfPrint!=null && pdfPrint.equalsIgnoreCase("yes"))
	{
		%>
		 <div class="printFooterText"><%=strPrintFooterText%></div>
	<%}%>


<%@ include file = "ErRemoveUser.jsp" %>

<%
	if (!StringUtils.isNull(er_RmDispName)){
		//For Setting the PDf File Name
		er_RmDispName = er_RmDispName.replace(" ","_");
		HashMap paramVal =new HashMap();
		paramVal.put("fileName",er_RmDispName);
		session.setAttribute("parameters", paramVal);
	}
%>



