<!DOCTYPE html>
<html>

<head>
<style>
	/*.gm-style{
		max-width:512px !important;
		height:100% !important;
		margin:auto !important;
		left:auto !important;
		border:0px solid red !important;
		position: relative !important;
	    overflow: hidden;
	}*/
.browserSelection{
		-webkit-user-select: all;  /* Chrome all / Safari all */
		  -moz-user-select: all;     /* Firefox all */
		  -ms-user-select: all;      /* IE 10+ */
		  user-select: all; 
		  word-break: break-all;
		}
.gm-style-iw {
    width: auto !important;
    height: auto !important;
    div {
        width: auto !important;
        height: auto !important;
	}
}
	#map_canvas {
		width: 500;
		height: 350;
		margin: 0px;
		padding: 5px;
		/*background:#252525 !important;*/
	}

	#breadCrumbId
	{
		/*height: 15px;*/
		margin: 0px;
		/*padding: 0px;*/
		position:absolute;
		top:5px;
		left:5px;
		z-index:10000;
	}

	
	#copyright
	{
		display: none !important;
	}
	a[href^="https://maps.google.com/maps"]{display:none !important}

	.gmnoprint a, .gmnoprint span {
		display:none;
	}
	.gmnoprint div {
	
		background:none !important;
	}
	#map-report div.gmnoprint,
	#map-report div.gmnoscreen {
		display: none;      
	}	
	img[src="https://maps.gstatic.com/mapfiles/api-3/images/google_white2.png"] {
		display: none; 
	}

	img[src="https://maps.gstatic.com/mapfiles/google_white.png"] {
		display: none; 
	}
	#map-report a img { display:none; } 	
	.infobox-wrapper {
		display:none;
	}
	.x-tip.yellowTip{background:#414141!important;border-radius:4px!important;opacity:.9;filter:alpha(opacity=90)}
	.x-tip.yellowTip .x-tip-body,.x-tip.yellowTip .x-form-invalid-tip-body{color:#fff!important;padding:0 8px!important;line-height:18px}
	.x-tip.yellowTip .x-tip-anchor{position:absolute;overflow:hidden;border-style:solid;border-width:5px;border-color:none;zoom:1}
	.x-tip.yellowTip .x-tip-anchor-top{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #414141}
	.x-tip.yellowTip .x-tip-anchor-bottom{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #414141}
	.x-tip.yellowTip .x-tip-anchor-left{width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #414141}
	.x-tip.yellowTip .x-tip-anchor-right{width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #414141}

</style>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>


<%@ page import = "com.egurkha.util.StringUtils"%>
<%@ page import = "java.util.ArrayList"%>
<%@ page import = "com.eg.EgUtils"%>
<%@ page import = "com.eg.EgURLEncoder"%>
<%@ page import = "com.eg.IniFile"%>
<%@ page import = "com.eg.EgInstallInfo"%>
<%@ page import = "com.eg.EgDateInfo" %>
<%@ page import = "java.util.Calendar" %>
<%@ page import = "java.util.Date" %>
<%@ page import = "java.util.TimeZone"%>
<%@ page import = "com.egurkha.util.DateUtil"%>
<%@ page import = "com.egurkha.EgUserRole" %>
<%@ page import = "com.egurkha.EgUserPermission"%>
<%@ taglib prefix = "egui" uri = "../WEB-INF/eg-taglib.tld"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
	try
	{
		response.setHeader("Cache-Control", "no-store");
		response.setHeader("Pragma", "no-cache");
		response.setDateHeader("Expires", -1);

		String strInternetAvailable = (String) session.getAttribute("isInternetAvailable");

		boolean isInternetAvailable=false;
		if(strInternetAvailable!=null && strInternetAvailable.trim().length()>0 && (strInternetAvailable.equalsIgnoreCase("true") || strInternetAvailable.equalsIgnoreCase("yes")))
		{
			isInternetAvailable=true;
		}

		String setMonitorHome=request.getParameter("setMonitorHome");
		boolean isMonitorHome=false;
		if(setMonitorHome!=null && setMonitorHome.equals("true"))
			isMonitorHome=true;

		boolean isIE=false;
		String userAgent = request.getHeader("USER-AGENT");
		if (userAgent!=null && userAgent.indexOf("MSIE")==-1)
		{
			isIE=true;
		}
		String isTvModeStr=request.getParameter("isTvMode");
		boolean isTvMode=false;
		if(isTvModeStr!=null && isTvModeStr.equalsIgnoreCase("true"))
			isTvMode=true;
		String reqUrl = request.getRequestURL().toString();
		String baseReqURL = reqUrl.substring(0, reqUrl.length() - request.getRequestURI().length()) + request.getContextPath() + "/";
		String mgrProtocol="http:";
		if(baseReqURL!=null && baseReqURL.startsWith("https://"))
		{
			mgrProtocol="https:";
		}
		String consolidatedDashboard=request.getParameter("consolidatedDashboard");
		String s_iniFile = EgInstallInfo.getInstallDir()+ "/manager/config/eg_customdashboard.ini";
		IniFile customDashboard = new IniFile(s_iniFile);
		String isAnonymousAccessEnabled = customDashboard.getValue("DASHBOARD_SETTINGS","AnonymousAccessEnabled");
		String ddConfigEnabled = customDashboard.getValue("DASHBOARD_SETTINGS","enableDDConfiguration");
		String disableMydashboardPopout=customDashboard.getValue("DASHBOARD_SETTINGS","DisableMydashboardPopout");
		String showTimeline=customDashboard.getValue("DASHBOARD_SETTINGS","showTimeline");
		String highchartForGauge=customDashboard.getValue("DASHBOARD_SETTINGS","EnableHighchartsforGauge");
		String showMeasureStateForTableWidgetStr=customDashboard.getValue("DASHBOARD_SETTINGS","showMeasureStateForTableWidget");
		String showLegandPanelForWidgetsStr=customDashboard.getValue("DASHBOARD_SETTINGS","showLegandPanelForWidgets");
		String hideHeaderForPublishedDashboard=customDashboard.getValue("DASHBOARD_SETTINGS","hideHeaderForPublishedDashboard");
		String showTimelineForPublishedDashboard=customDashboard.getValue("DASHBOARD_SETTINGS","showTimelineForPublishedDashboard");
		String ColorPickerColors=customDashboard.getValue("WIDGETS_COLOR_PALETTE_SETTINGS","Color_Picker_Colors");
		String showDashboardListInGridViewStr=customDashboard.getValue("DASHBOARD_SETTINGS","showDashboardListInGridView");
		String alertDistributionByServerStr=customDashboard.getValue("DASHBOARD_SETTINGS","AlertDistributionByServer");
		String showHealthStatusInLiveBoxStr=customDashboard.getValue("DASHBOARD_SETTINGS","showHealthStatusInLiveBox");
		String eventAnalysistimeline=customDashboard.getValue("Default_HistoricalEvents_Duration","duration");
		if(StringUtils.isNull(eventAnalysistimeline))
		{
			eventAnalysistimeline="1 hour";
		}
		String restrictPublicDashboardsStr = customDashboard.getValue("DASHBOARD_SETTINGS","RestrictPublicDashboards");
		boolean restricPublicDashboards=false;
		if(restrictPublicDashboardsStr!=null && restrictPublicDashboardsStr.equalsIgnoreCase("yes"))
		{
			restricPublicDashboards=true;
		}
		boolean isNeedToHideHeader = false;
		if(hideHeaderForPublishedDashboard!=null && hideHeaderForPublishedDashboard.equalsIgnoreCase("yes"))
		{
			isNeedToHideHeader = true;
		}
		boolean isNeedToShowTimeLine = false;
		if(showTimelineForPublishedDashboard!=null && showTimelineForPublishedDashboard.equalsIgnoreCase("yes"))
		{
			isNeedToShowTimeLine = true;
		}
		boolean isHighchartForGauge = false;
		if(highchartForGauge!=null && highchartForGauge.equals("true"))
		{
			isHighchartForGauge = true;
		}
		boolean isDisablePopupOption=false;
		if(disableMydashboardPopout!=null && disableMydashboardPopout.equalsIgnoreCase("yes"))
		{
			isDisablePopupOption=true;
		}
		boolean displayTimeline=false;
		if(showTimeline!=null && (showTimeline.equalsIgnoreCase("yes") || showTimeline.equalsIgnoreCase("true")))
		{
			displayTimeline=true;
		}
		boolean showMeasureStateForTableWidget=false;
		if(!StringUtils.isNull(showMeasureStateForTableWidgetStr) && showMeasureStateForTableWidgetStr.equalsIgnoreCase("yes")){
			showMeasureStateForTableWidget=true;
		}
		boolean showLegandPanelForWidgetsVal=false;
		if(!StringUtils.isNull(showLegandPanelForWidgetsStr) && showLegandPanelForWidgetsStr.equalsIgnoreCase("yes")){
			showLegandPanelForWidgetsVal=true;
		}
		String autoComponentAssociationEnabled=customDashboard.getValue("DASHBOARD_SETTINGS","EnableComponentAutoAssociation");
		boolean isComponentAutoAssociationEnabled = false;
		if(autoComponentAssociationEnabled!=null && autoComponentAssociationEnabled.equalsIgnoreCase("yes"))
		{
			isComponentAutoAssociationEnabled=true;
		}
		boolean showDashboardListInGridView=false;
		if(!StringUtils.isNull(showDashboardListInGridViewStr) && showDashboardListInGridViewStr.equalsIgnoreCase("yes")){
			showDashboardListInGridView=true;
		}

		boolean alertDistributionByServer=false;
		if(!StringUtils.isNull(alertDistributionByServerStr) && alertDistributionByServerStr.equalsIgnoreCase("yes")){
			alertDistributionByServer=true;
		}

		boolean showHealthStatusInLiveBox=false;
		if(!StringUtils.isNull(showHealthStatusInLiveBoxStr) && showHealthStatusInLiveBoxStr.equalsIgnoreCase("yes")){
			showHealthStatusInLiveBox=true;
		}

		String showOtherUsersDashboardListStr=customDashboard.getValue("DASHBOARD_SETTINGS","showOtherUsersDashboardList");
		boolean showOtherUserDashboardList=false;
		boolean needToShowOtherUserDashboardList=false;
		if(!StringUtils.isNull(showOtherUsersDashboardListStr) && showOtherUsersDashboardListStr.equalsIgnoreCase("yes")){
			needToShowOtherUserDashboardList=true;
		}
		String showComponentTypeFilterStr = customDashboard.getValue("DASHBOARD_SETTINGS","ShowComponentTypeFilter");
		boolean showComponentTypeFilter=false;
		if(showComponentTypeFilterStr!=null && (showComponentTypeFilterStr.equalsIgnoreCase("yes") || showComponentTypeFilterStr.equalsIgnoreCase("true")))
		{
			showComponentTypeFilter=true;
		}
		boolean showAlarmSummary=false;
		String showAlarmSummaryStr = customDashboard.getValue("DASHBOARD_SETTINGS","showAlarmSummary");
		if(!StringUtils.isNull(showAlarmSummaryStr) && showAlarmSummaryStr.equalsIgnoreCase("yes")){
			showAlarmSummary=true;
		}
		String ajaxTimeout=customDashboard.getValue("DASHBOARD_SETTINGS","ajaxTimeout");
		if(StringUtils.isNull(ajaxTimeout))
			ajaxTimeout="600000";

		boolean disableUnitInDigitalChart=false;
		String disableUnitInDigitalChartStr=customDashboard.getValue("DASHBOARD_SETTINGS","hideUnitForDigitalChart");
		if(disableUnitInDigitalChartStr!=null && (disableUnitInDigitalChartStr.equalsIgnoreCase("yes") || disableUnitInDigitalChartStr.equalsIgnoreCase("true")))
		{
			disableUnitInDigitalChart=true;
		}

		String refFactor = customDashboard.getValue("DASHBOARD_SETTINGS","refreshFactor");
		String refFreq = customDashboard.getValue("DASHBOARD_SETTINGS","refreshFrequency");
		boolean isAnonymousUser = false;
		boolean publishedDashboard = false;
		boolean fusionChartsEnabled=false;
		long refreshFrequency = 60 * 1000L; // default refresh frequency 60 secs
		long reloadFrequency = 300;
		String monitor_Skin1 ="gray";
		String loginUsername = null;
		String anonymousUser = request.getParameter("anonymousUser");
		String componentDashboard = request.getParameter("componentDashboard");
		String componentsForDashboard="none";
		if(!StringUtils.isNull(componentDashboard) && componentDashboard.equals("true"))
		{
			componentsForDashboard=request.getParameter("componentsForDashboard");
		}
		String compTypeForConsolidatedDashboard=request.getParameter("compTypeForConsolidatedDashboard");
		String myDashboardHomePage = "None";
		String myDashDateFormat = "";
		String mgrDateFormatForTime = "";
		String csrfToken_temp = "";
		User usr=null;
		String local_timezoneOffsetValue ="";
		String defaultLogoImg="/final/images/eGLogo-mydashboard.png";
		IniUI iniUIObj = IniUI.getInstance();
		String themeIco="eg.ico";
		String strPrefix="eG Manager";
		if(iniUIObj.isHKTThemeEnabled())
		{
			String hktThemeTitle = iniUIObj.getHKTThemeTitle();
			themeIco = iniUIObj.getHKTThemeICO();
			if(!StringUtils.isNull(hktThemeTitle))
			{
				strPrefix=hktThemeTitle;
			}
			if(StringUtils.isNull(strPrefix))
			{
				strPrefix="xMonPlus";
			}
			if(StringUtils.isNull(themeIco))
			{
				themeIco="eg.ico";
			}
		}
		ErUtils erutils = new ErUtils();
		String hktLightThemeLogo="";
		boolean isChartYaxisBasedOnData=false;
		String google_map_key ="";
		String strCSRFPreventionFilter = "";
		boolean isCSRFFilterEnabled = false;
		boolean hideBackButton=true;
		String publishBackBtnUrl="";
		if(anonymousUser!=null && anonymousUser.equalsIgnoreCase("true"))
		{
			String xframeOptionsURI = customDashboard.getValue("DASHBOARD_SETTINGS","X-Frame-Options_URI");
			if(!StringUtils.isNull(xframeOptionsURI) && !xframeOptionsURI.equalsIgnoreCase("none"))
			{
				response.setHeader("X-Frame-Options", xframeOptionsURI);
				response.setHeader("Access-Control-Allow-Origin", "*");
			}
			String myDashLogoImage="/final/images/eGLogo-mydashboard.png";
			
			isAnonymousUser = true;
			String publishedDashboardView = request.getParameter("publishedDashboardView");
			if(publishedDashboardView!=null && publishedDashboardView.equalsIgnoreCase("true"))
			{
				publishedDashboard = true;
			}
			session.setAttribute("Page_IdentifierM", request.getRequestURI());
			String uiFileName = "eg_ui.ini";
			String egInstallDir = EgInstallInfo.getInstallDir()+ "/manager/config/";
			IniFile egUIIni = new IniFile(egInstallDir + uiFileName);
			String enableFusionChartsStr=egUIIni.getValue("GRAPHS","EnableFusion");
			if(enableFusionChartsStr!=null && (enableFusionChartsStr.equalsIgnoreCase("yes") || enableFusionChartsStr.equalsIgnoreCase("true")))
			{
				fusionChartsEnabled=true;
			}
			//Variable to be used in javascript code
			myDashDateFormat = egUIIni.getValue("CURRENT_DATE_FORMAT","selectedDateFormat");
			strCSRFPreventionFilter = egUIIni.getValue("Security_Filters","CSRFPreventionFilter");
			strCSRFPreventionFilter = (strCSRFPreventionFilter==null || strCSRFPreventionFilter.trim().length() == 0 || strCSRFPreventionFilter.trim().equalsIgnoreCase("NULL"))?"":strCSRFPreventionFilter;
			if (strCSRFPreventionFilter!=null && strCSRFPreventionFilter.trim().length()>0 && (strCSRFPreventionFilter.equalsIgnoreCase("yes") || strCSRFPreventionFilter.equalsIgnoreCase("true")))
				isCSRFFilterEnabled = true;
			String profName = request.getParameter("profileName");
			if(!StringUtils.isNull(profName))
			{
				profName=StringUtils.decodeSecurityChar(profName);
			}
			String userId=null;
			ArrayList profWithUser=EgUtils.egTokenizer(profName,"|USRSEP|",false,false,false);
			if ( profWithUser != null && profWithUser.size()==2 )
			{
				userId = (String) profWithUser.get(1);
			}
			if(!StringUtils.isNull(userId))
			{
				ErUserData userData = new ErUserData(userId,false);
				if(userData!=null)
				{
					usr=userData.usr;
					if(usr==null)
					{
						usr = userData.getUser(userId);
					}
				}
			}
			mgrDateFormatForTime = myDashDateFormat;

			EgDateInfo tracker_tdateInfo = new EgDateInfo();
			TimeZone tracker_tz = null;

			if (usr!=null)
			{
				Calendar cal = Calendar.getInstance();
				Date local_date = new Date(tracker_tdateInfo.egetUTCDate());
				cal.setTime(local_date);
				cal.setTimeZone(tracker_tdateInfo.getRealTimeZone());
				String temp1 = (cal.get(cal.MONTH)+1) + "/" + cal.get(cal.DAY_OF_MONTH) + "/" +cal.get(cal.YEAR);
				String mgr_time = cal.get(cal.HOUR_OF_DAY)+":"+cal.get(cal.MINUTE)+":"+cal.get(cal.SECOND);
				String dispDate = DateUtil.changeDateFormat(temp1,"MM/dd/yyyy",myDashDateFormat);
				EgTimeZoneConverter tracker_timeZoneConverter = new EgTimeZoneConverter(dispDate+" "+mgr_time,usr);
				tracker_tz = tracker_timeZoneConverter.getTimeZone();

				long timezoneinMins = (Math.abs((tracker_tz.getRawOffset() / (60 * 1000))));
				long daylighttime = (tracker_tz.getDSTSavings() / (60 * 1000));
				local_timezoneOffsetValue = String.valueOf(Math.abs(timezoneinMins-daylighttime));


				Calendar cal3 = GregorianCalendar.getInstance(tracker_tz);
				int offsetInMillis = tracker_tz.getOffset(cal3.getTimeInMillis());
				int offsetmin = 0;
				if(offsetInMillis<0)
					offsetmin =(Math.abs(offsetInMillis)/1000)/60;
				else
					offsetmin = (offsetInMillis/1000)/60;
				String offset = String.valueOf(offsetmin);

				if(tracker_tz.getRawOffset()>=0)
					local_timezoneOffsetValue="-"+offset;
				else
					local_timezoneOffsetValue="+"+offset;

				String tempLogo=usr.getUserLogo();

				String userLogo[] = StringUtils.getTokens(tempLogo,"\\");
				String temp="";
				String temp_id = usr.getLoginID();
				if(userLogo!=null && userLogo.length==5)
				{
					temp=userLogo[1];
				}
				if(!temp.equals("c"))
				{
					iniUIObj.set_userLogo(tempLogo);
					iniUIObj.set_loginID(usr.getLoginID());
					myDashLogoImage = iniUIObj.getMonitorHomeLogo();
				}
				else if(EgInstallInfo.isSuperManager)
				{
					myDashLogoImage="/final/monitor/eg_images/egsm_monitor.gif";
				}
				else
				{
					
					if(temp_id!=null && temp_id.indexOf("/")>-1)
					{
						String domainName=temp_id.substring(0,temp_id.indexOf("/"));
						String userName=temp_id.substring(temp_id.indexOf("/")+1,temp_id.length());

						//MAS/Grp/Domain Users

						if(userName.indexOf("Grp")>-1)
						{
							userName=userName.substring(userName.indexOf("/")+1,userName.length());
						}
						userName = StringUtils.replace(userName," ","");
						temp_id=domainName.toLowerCase()+"_"+userName;
						
					}
					myDashLogoImage="/final/monitor/eg_images/"+EgURLEncoder.encode(temp_id,"UTF-8")+"_monitor.png";
				}

				if(StringUtils.isNull(myDashLogoImage))
					myDashLogoImage="/final/images/eGLogo-mydashboard.png";

				defaultLogoImg=myDashLogoImage;
				
				monitor_Skin1  = usr.getMonitorSkin();
				String myServerName = request.getScheme() + "://" +request.getServerName();
				String myPort = ""+request.getServerPort();
				String myScheme = request.getScheme();
				if (myScheme.equals("http") && !myPort.equals("80"))
					myServerName += ":"+myPort;
				else if (myScheme.equals("https") && !myPort.equals("443"))
					myServerName += ":"+myPort;
				google_map_key = egUIIni.getValue("ZONE_MAP",myServerName);
				if(google_map_key == null || google_map_key.equals("") || google_map_key.equalsIgnoreCase("None"))
				{
					myServerName = myServerName+ "/";
					google_map_key = egUIIni.getValue("ZONE_MAP",myServerName);
					if(google_map_key == null || google_map_key.equals("") || google_map_key.equalsIgnoreCase("None"))
					{
							google_map_key = egUIIni.getValue("ZONE_MAP","google_map_key");
					}
				}
			}
			else
			{
				tracker_tz = tracker_tdateInfo.getRealTimeZone();

				long timezoneinMins = (Math.abs((tracker_tz.getRawOffset() / (60 * 1000))));
				long daylighttime = (tracker_tz.getDSTSavings() / (60 * 1000));
				local_timezoneOffsetValue = String.valueOf(Math.abs(timezoneinMins-daylighttime));
				
				if(tracker_tz.getRawOffset()>=0)
					local_timezoneOffsetValue="-"+local_timezoneOffsetValue;
				else
					local_timezoneOffsetValue="+"+local_timezoneOffsetValue;
				monitor_Skin1  = usr.getMonitorSkin();
			}
			IniFile reportIni = new IniFile(EgInstallInfo.getInstallDir()+"/manager/config/eg_report.ini");
			String strYaxisBasedOnData = reportIni.getValue("CHART_TYPE","YaxisBasedOnData");
			if(strYaxisBasedOnData!=null && (strYaxisBasedOnData.equalsIgnoreCase("yes") || strYaxisBasedOnData.equalsIgnoreCase("true")))
			{
				isChartYaxisBasedOnData = true;
			}
			if(monitor_Skin1!=null && monitor_Skin1.equalsIgnoreCase("light"))
			{
				hktLightThemeLogo=egUIIni.getValue("HKT_CUSTOM_THEME","PDF_LOGO_NAME");
			}
		}
		else
		{
%>
			<%@ include file = "EgLoginTracker.jsp"%>
<%
			csrfToken_temp = strCsrfToken;
			strCSRFPreventionFilter = egUIIni.getValue("Security_Filters","CSRFPreventionFilter");
			strCSRFPreventionFilter = (strCSRFPreventionFilter==null || strCSRFPreventionFilter.trim().length() == 0 || strCSRFPreventionFilter.trim().equalsIgnoreCase("NULL"))?"":strCSRFPreventionFilter;
			if (strCSRFPreventionFilter!=null && strCSRFPreventionFilter.trim().length()>0 && (strCSRFPreventionFilter.equalsIgnoreCase("yes") || strCSRFPreventionFilter.equalsIgnoreCase("true")))
				isCSRFFilterEnabled = true;
			monitor_Skin1  = monitor_Skin;
			loginUsername = u_ser.getLoginID();
			if(isMonitorHome)
			{
				myDashboardHomePage = customDashboard.getValue("DEFAULT_MYDASHBOARD",u_ser.getLoginID());
			}
			else
			{
				myDashboardHomePage = customDashboard.getValue("DEFAULT_MYDASHBOARD",u_ser.getLoginID());
//				myDashboardHomePage="none";
			}
			myDashDateFormat = dateFormatForDatePicker;
			usr = u_ser;
			mgrDateFormatForTime = dateFormatNew;

			local_timezoneOffsetValue = timezoneOffsetValue;
			String enableFusionChartsStr=egUIIni.getValue("GRAPHS","EnableFusion");
			if(enableFusionChartsStr!=null && (enableFusionChartsStr.equalsIgnoreCase("yes") || enableFusionChartsStr.equalsIgnoreCase("true")))
			{
				fusionChartsEnabled=true;
			}
			isChartYaxisBasedOnData=isYaxisBasedOnData;

			String myServerName = request.getScheme() + "://" +request.getServerName();
			String myPort = ""+request.getServerPort();
			String myScheme = request.getScheme();
			if (myScheme.equals("http") && !myPort.equals("80"))
				myServerName += ":"+myPort;
			else if (myScheme.equals("https") && !myPort.equals("443"))
				myServerName += ":"+myPort;

			google_map_key = egUIIni.getValue("ZONE_MAP",myServerName);
			if(google_map_key == null || google_map_key.equals("") || google_map_key.equalsIgnoreCase("None"))
			{
				myServerName = myServerName+ "/";
				google_map_key = egUIIni.getValue("ZONE_MAP",myServerName);
				if(google_map_key == null || google_map_key.equals("") || google_map_key.equalsIgnoreCase("None"))
				{
						google_map_key = egUIIni.getValue("ZONE_MAP","google_map_key");
				}
			}
		}

		boolean allowToAddDashboard=true;

		if(!StringUtils.isNull(loginUsername))
		{
			String userPrivilage = customDashboard.getValue("USER_DASHBOARD_CREATION_PRIVILEGE",loginUsername);

			if(!StringUtils.isNull(userPrivilage) && userPrivilage.equalsIgnoreCase("no"))
			{
				allowToAddDashboard=false;
			}
			else
			{
				allowToAddDashboard=true;
			}
		}

		if (usr!=null)
		{
			EgUserRole userRole = usr.getUserRole();

			EgUserRole role = EgUserRole.getRoleObject(usr.getLoginType());
			boolean hasAllComponentAccess = role.hasAllComponentAccess();
			boolean hasAdminTab = userRole.hasAnyAdminRole(EgUserPermission.ADMIN);		
			//if(needToShowOtherUserDashboardList && hasAllComponentAccess && hasAdminTab)
			if(needToShowOtherUserDashboardList && hasAllComponentAccess)
			{
				showOtherUserDashboardList = true;
			}
			else
			{
				showOtherUserDashboardList = false;
			}
		}

		if(StringUtils.isNull(ddConfigEnabled))
			ddConfigEnabled = "false";
		boolean isDDConfigDisabled=true;
		if(ddConfigEnabled!=null && (ddConfigEnabled.equalsIgnoreCase("true") || ddConfigEnabled.equalsIgnoreCase("yes")))
		{
			isDDConfigDisabled=false;
		}
		
		String queryString = request.getQueryString();
		queryString=(queryString==null)?"":queryString;
		queryString=queryString.trim();

		String action = request.getParameter("action");
		String listViewMode=request.getParameter("listViewMode");
		if(action==null || action.equals("") || action.equalsIgnoreCase("null"))
		{
			String reloadDashboard=request.getParameter("reloadDashboard");
			boolean isReloadDashboard=false;
			String lastSessionUrl ="";
			if(!isDisablePopupOption)
			{
				lastSessionUrl = (String) session.getAttribute("myDashboardLastSession");
			}
			if(reloadDashboard!=null && reloadDashboard.equalsIgnoreCase("true"))
			{
				isReloadDashboard=true;
				if(StringUtils.isNull(lastSessionUrl))
				{
					lastSessionUrl = (String) session.getAttribute("monitorLastSession");
				}
			}
			if(StringUtils.isNull(lastSessionUrl) || !lastSessionUrl.startsWith("/final/monitor/MyDashboard.jsp"))
			{
				if(!isAnonymousUser && !StringUtils.isNull(myDashboardHomePage) && !myDashboardHomePage.equalsIgnoreCase("None"))
				{
					myDashboardHomePage=StringUtils.encodeSecurityChar(myDashboardHomePage);
					queryString = "comesFrom=myDashboard&action=showMyDashboard&profileName="+EgURLEncoder.encode(myDashboardHomePage,"UTF-8");
					queryString=queryString+"&isDisablePopupOption="+isDisablePopupOption;
					if(isMonitorHome)
					{
						queryString=queryString+"&setMonitorHome=true";
					}
				}
				else
				{
					if(showOtherUserDashboardList)
					{
						listViewMode="otherUsersDashListView";
					}
					else if(showDashboardListInGridView)
					{
						listViewMode="gridlistview";
					}
					else
					{
						listViewMode="tilesview";
					}
					action = "loadMyDashboardListPage";
					queryString = "comesFrom=myDashboard&action=loadMyDashboardListPage&"+queryString+"&listViewMode="+listViewMode;
					queryString=queryString+"&isDisablePopupOption="+isDisablePopupOption;
				}
			}
			else
			{
				if(lastSessionUrl!=null && lastSessionUrl.indexOf("?")>0)
				{
					lastSessionUrl = lastSessionUrl.substring(lastSessionUrl.indexOf("?")+1);
					StringTokenizer stkqStr=new StringTokenizer(lastSessionUrl,"&");
					StringBuffer sbSesQStr=new StringBuffer();
					while(stkqStr.hasMoreTokens())
					{
						String paramWithValue = stkqStr.nextToken();
						if(!StringUtils.isNull(paramWithValue))
						{
							int eqIdx = paramWithValue.indexOf("=");
							String parm = paramWithValue.substring(0,eqIdx);
							if(!isReloadDashboard && (parm!=null && parm.equals("profileName")))
							{
								String val = paramWithValue.substring(eqIdx+1);
								paramWithValue = parm+"="+EgURLEncoder.encode(val,"UTF-8");
							}
							else if(parm!=null && parm.equals("setMonitorHome"))
							{
								String val = paramWithValue.substring(eqIdx+1);
								setMonitorHome=val;
							}
							else if(parm!=null && parm.equals("listViewMode"))
							{
								listViewMode=paramWithValue.substring(eqIdx+1);
							}
						}
						sbSesQStr.append("&"+paramWithValue);
					}
					queryString = sbSesQStr.toString();
				}
				if(setMonitorHome!=null && setMonitorHome.equals("true"))
					isMonitorHome=true;

			}
		}
		if(!StringUtils.isNull(queryString))
		{
			StringBuffer sbSesQStr=new StringBuffer();
			StringTokenizer stkQryStr=new StringTokenizer(queryString,"&");
			while(stkQryStr.hasMoreTokens())
			{
				String paramWithValue = stkQryStr.nextToken();
				if(!StringUtils.isNull(paramWithValue))
				{
					int eqIdx = paramWithValue.indexOf("=");
					String parm = paramWithValue.substring(0,eqIdx);
					if(parm!=null && (parm.equals("componentDashboard") || parm.equals("componentsForDashboard") || parm.equals("consolidatedDashboard") || parm.equals("compTypeForConsolidatedDashboard") ||  parm.equals("com.eg.CSRF_NONCE")))
					{
						continue;
					}
				}

				if(!StringUtils.isNull(paramWithValue))
				{
					int eqIdx = paramWithValue.indexOf("=");
					String parm = paramWithValue.substring(0,eqIdx);
					String value = paramWithValue.substring(eqIdx+1);
					if(parm!=null && parm.equals("addBackBtn"))
					{
					   hideBackButton=false;
					}
					if(parm!=null && parm.equals("backBtnUrl"))
					{
						value=StringUtils.decodeSecurityChar(value);
					    publishBackBtnUrl=value;
					}
				}
				sbSesQStr.append("&"+paramWithValue);
			}
			queryString = sbSesQStr.toString();
		}
		if(refFreq!=null && refFreq.length()>0)
		{
			refreshFrequency =  Long.valueOf(refFreq).longValue() * 1000L;

		}
	
		if(refFactor!=null && refFactor.length()>0)
		{
			if(isIE)
			{
				double refFactorVal=Double.parseDouble(refFactor);
				refFactorVal=(refFactorVal*65/100);
				refFactor=erutils.round(refFactorVal,0);
				//refFactor=""+refFactorVal;
			}
			reloadFrequency=Long.valueOf(refFactor).longValue()*refreshFrequency;
		}

		EgDateInfo egDate = new EgDateInfo();
		Date local_date = new Date(egDate.egetUTCDate());
		Calendar cal = Calendar.getInstance();
		cal.setTime(local_date);
		cal.setTimeZone(egDate.getRealTimeZone());
		String temp = (cal.get(cal.MONTH)+1) + "/" + cal.get(cal.DAY_OF_MONTH) + "/" +cal.get(cal.YEAR);
		
		String dispDate = DateUtil.changeDateFormat(temp,"MM/dd/yyyy",mgrDateFormatForTime);
		String mgr_time = cal.get(cal.HOUR_OF_DAY)+":"+cal.get(cal.MINUTE)+":"+cal.get(cal.SECOND);
		EgTimeZoneConverter timeZoneConverter = new EgTimeZoneConverter(dispDate+" "+mgr_time,usr);
		String loginUserDateTime = (String)timeZoneConverter.getDate(false);
		Date loginUserDate = (Date)timeZoneConverter.getDate(true);
		TimeZone user_tz = (TimeZone)timeZoneConverter.getTimeZone();
		String tzName="";
		if( loginUserDateTime != null && !loginUserDateTime.trim().equals(""))
		{
			dispDate = loginUserDateTime;
			tzName = user_tz.getDisplayName(user_tz.inDaylightTime(loginUserDate), TimeZone.SHORT);
		}
		String isNewWindow=request.getParameter("isNewWindow");
		boolean isNewWin=false;
		if(isNewWindow!=null && isNewWindow.equals("true"))
			isNewWin=true;

		String applyUserThemeForMyDashboard=customDashboard.getValue("DASHBOARD_SETTINGS","applyUserThemeForMyDashboard");
		if(applyUserThemeForMyDashboard!=null && applyUserThemeForMyDashboard.equalsIgnoreCase("yes"))
		{
			monitor_Skin1  = usr.getMonitorSkin();
		}
		else
		{
			String myDashboardTheme=customDashboard.getValue("DASHBOARD_SETTINGS","myDashboardTheme");
			if(myDashboardTheme!=null && myDashboardTheme.equalsIgnoreCase("dark"))
			{
				monitor_Skin1="Dark";
			}
			else if(myDashboardTheme!=null && myDashboardTheme.equalsIgnoreCase("light"))
			{
				monitor_Skin1="Light";
			}
			else
			{
				monitor_Skin1="Dark";
			}
		}
		boolean isLightTheme=false;
		if(monitor_Skin1!=null && monitor_Skin1.equalsIgnoreCase("light"))
		{
			isLightTheme=true;
		}
	//	if(isLightTheme)
		{
			if(monitor_Skin1!=null && monitor_Skin1.equalsIgnoreCase("dark"))
				isLightTheme=false;
		}

		String newsURL=mgrProtocol+"//rss2json.com/gfapi.js";
		//String mapURL=mgrProtocol+"//maps.googleapis.com/maps/api/js?v=3&libraries=places&amp;sensor=false";
		String mapURL=mgrProtocol+"//maps.googleapis.com/maps/api/js?key="+google_map_key+"&v=3&libraries=places&amp;sensor=false&callback=loadMapDepedencyJS";
		String markerURL="/final/scripts/oms.min.js"; //mgrProtocol+"//jawj.github.io/OverlappingMarkerSpiderfier/bin/oms.min.js";
		if(isAnonymousUser && isLightTheme && iniUIObj.isHKTThemeEnabled()) // This is done for HKT to display proper logo in light theme
		{
			defaultLogoImg="/final/images/"+hktLightThemeLogo;

			if(StringUtils.isNull(defaultLogoImg))
				defaultLogoImg="/final/images/eGLogo-mydashboard.png";
		}
		boolean showConfiguredDataInPreview=false;
		String enableConfiguredDataInPreview=customDashboard.getValue("DASHBOARD_SETTINGS","EnableConfiguredDataInPreview");
		if(StringUtils.isNull(enableConfiguredDataInPreview))
			enableConfiguredDataInPreview="yes";
		
		if(enableConfiguredDataInPreview!=null && enableConfiguredDataInPreview.equalsIgnoreCase("yes"))
		{
			showConfiguredDataInPreview=true;
		}
		
		String templateNameForConsolidatedDashboard = "";
		if(!StringUtils.isNull(compTypeForConsolidatedDashboard))
		{
			templateNameForConsolidatedDashboard = request.getParameter("profileName");
			if(!StringUtils.isNull(templateNameForConsolidatedDashboard))
			{
				templateNameForConsolidatedDashboard=StringUtils.decodeSecurityChar(templateNameForConsolidatedDashboard);
			}
		}
		String backToConsolidatedView=request.getParameter("backToConsolidatedView");
%>
<title><%=strPrefix%></title>
<link rel="shortcut icon" href="/final/<%=themeIco%>">
<%
	if(isInternetAvailable)
	{
%>
<!-- script type="text/javascript" src='< % = newsURL % >'></script>
<script type="text/javascript" src='< % = mapURL % >'></script -->
<!-- script language="javascript" type="text/javascript" src="/final/monitor/eg_scripts/infobox.js?1=1"></script>
<script language="javascript" type="text/javascript" src="/final/monitor/eg_scripts/markerwithlabel.js?1=1"></script -->

<%
	}
%>

<%
		if(isAnonymousUser)
		{
%>
<!-- script type="text/javascript" src='< % = newsURL  % >'></script-->
<!-- script type="text/javascript" src=' < % = mapURL  % >'></script-->
<!-- script language="javascript" type="text/javascript" src="/final/monitor/eg_scripts/infobox.js?1=1"></script>
<script language="javascript" type="text/javascript" src="/final/monitor/eg_scripts/markerwithlabel.js?1=1"></script -->
<script language="javascript">
	var timelineLbl='<egui:intnl text="monitor.common.Timeline" />';
	var hrLbl='<egui:intnl text="monitor.common.Hr" />';
	var Tolbl='<egui:intnl text="monitor.common.To" />';
	var fromLbl='<egui:intnl text="monitor.history.From" />';
	var graphLbl='<egui:intnl text="monitor.summary.Graph" />';
	var er_modeInTracker='3D';
	var strSkin='Light';
	var isYaxisBasedOnData=eval('<%=isChartYaxisBasedOnData%>');
</script>
<%
		}
%>
<script>
var monitorSkin = "<%=monitor_Skin1%>";
var publishBackBtnUrl='<%=publishBackBtnUrl%>';
var hideBackButton='<%=hideBackButton%>';
var needToHideBackButton=((hideBackButton!=null && hideBackButton=="true")?true:false);
var isInternetAvailable='<%=isInternetAvailable%>';
var timeZoneOffsetVal='<%=local_timezoneOffsetValue%>';	
// Geo Map - Styling attributes configuration starts here
var isTvModeStr='<%=isTvMode%>'
var	isTvMode=((isTvModeStr!=null && isTvModeStr=="true")?true:false);
var newsURL='<%=newsURL%>';
var mapURL='<%=mapURL%>';
var restricPublicDashboards=eval('<%=restricPublicDashboards%>');
var infoBxURL='/final/monitor/eg_scripts/infobox.js?1=1';
var markerURL='/final/monitor/eg_scripts/markerwithlabel.js?1=1';
var injectedScriptFileArr=[];
var image = 'image.jpeg';
		var labelColor="";
		var bodyColor="";
		if(strSkin=="Dark"){
			labelColor="#e2e2e2";
			bodyColor="#252525";
		}else{
			labelColor="#000";
			bodyColor="#fff";
		}

		var lightStyle =[
		  {
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#e3ebee",
				//"color": "red",
				"visibility": "on"
				//"color": "#e2eaed"
			  }
			]
		  },
		  {
			"elementType": "labels",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"elementType": "labels.icon",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#616161"
			  }
			]
		  },
		  {
			"elementType": "labels.text.stroke",
			"stylers": [
			  {
				"color": "#f5f5f5"
			  }
			]
		  },
		  {
			"featureType": "administrative",
			"elementType": "geometry",
			"stylers": [
			  {
				"visibility": "on"
			  }
			]
		  },
		  {
			"featureType": "administrative.land_parcel",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "administrative.land_parcel",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#bdbdbd"
			  }
			]
		  },
		  {
			"featureType": "administrative.neighborhood",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "poi",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "poi",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#eeeeee"
			  }
			]
		  },
		  {
			"featureType": "poi",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#757575"
			  }
			]
		  },
		  {
			"featureType": "poi.park",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#e5e5e5"
			  }
			]
		  },
		  {
			"featureType": "poi.park",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#9e9e9e"
			  }
			]
		  },
		  {
			"featureType": "road",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "road",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#ffffff"
			  }
			]
		  },
		  {
			"featureType": "road",
			"elementType": "labels.icon",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "road.arterial",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#757575"
			  }
			]
		  },
		  {
			"featureType": "road.highway",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#dadada"
			  }
			]
		  },
		  {
			"featureType": "road.highway",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#616161"
			  }
			]
		  },
		  {
			"featureType": "road.local",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#9e9e9e"
			  }
			]
		  },
		  {
			"featureType": "transit",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "transit.line",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#e5e5e5"
			  }
			]
		  },
		  {
			"featureType": "transit.station",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#eeeeee"
			  }
			]
		  },
		  {
			"featureType": "water",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#ffffff"
			  }
			]
		  },
		  {
			"featureType": "water",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#9e9e9e"
			  }
			]
		  }
		];
		
		var darkStyle = [
		  {
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#212121"
			  }
			]
		  },
		  {
			"elementType": "labels",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"elementType": "labels.icon",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#757575"
			  }
			]
		  },
		  {
			"elementType": "labels.text.stroke",
			"stylers": [
			  {
				"color": "#212121"
			  }
			]
		  },
		  {
			"featureType": "administrative",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#757575"
			  },
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "administrative.country",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#9e9e9e"
			  }
			]
		  },
		  {
			"featureType": "administrative.land_parcel",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "administrative.locality",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#bdbdbd"
			  }
			]
		  },
		  {
			"featureType": "administrative.neighborhood",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "poi",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "poi",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#757575"
			  }
			]
		  },
		  {
			"featureType": "poi.park",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#181818"
			  }
			]
		  },
		  {
			"featureType": "poi.park",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#616161"
			  }
			]
		  },
		  {
			"featureType": "poi.park",
			"elementType": "labels.text.stroke",
			"stylers": [
			  {
				"color": "#1b1b1b"
			  }
			]
		  },
		  {
			"featureType": "road",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "road",
			"elementType": "geometry.fill",
			"stylers": [
			  {
				"color": "#2c2c2c"
			  }
			]
		  },
		  {
			"featureType": "road",
			"elementType": "labels.icon",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "road",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#8a8a8a"
			  }
			]
		  },
		  {
			"featureType": "road.arterial",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#373737"
			  }
			]
		  },
		  {
			"featureType": "road.highway",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#3c3c3c"
			  }
			]
		  },
		  {
			"featureType": "road.highway.controlled_access",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#4e4e4e"
			  }
			]
		  },
		  {
			"featureType": "road.local",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#616161"
			  }
			]
		  },
		  {
			"featureType": "transit",
			"stylers": [
			  {
				"visibility": "off"
			  }
			]
		  },
		  {
			"featureType": "transit",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#757575"
			  }
			]
		  },
		  {
			"featureType": "water",
			"elementType": "geometry",
			"stylers": [
			  {
				"color": "#404040"
			  }
			]
		  },
		  {
			"featureType": "water",
			"elementType": "labels.text.fill",
			"stylers": [
			  {
				"color": "#3d3d3d"
			  }
			]
		  }
		];
		
		var GRAY = {
			strokeColor: "#959595",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#959595",
			fillOpacity: 1
		};

		var GOOD = {
			strokeColor: "#0c9a12",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#0c9a12",
			fillOpacity: 1
		};

		var  LOW = {
			strokeColor: "#ccc100",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#ccc100",
			fillOpacity: 1
		};

		var INTERMEDIATE = {
			strokeColor: "#fa9d1c",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#fa9d1c",
			fillOpacity: 1
		};

		var HIGH = {
			strokeColor: "#cd0f0f",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#cd0f0f",
			fillOpacity: 1
		};

		var UNKNOWN = {
			strokeColor: "#30a1d9",
			strokeOpacity: 1,
			strokeWeight: 1,
			fillColor: "#30a1d9",
			fillOpacity: 1
		};
		
		function getStyle(colorClass) {
			try{
				var wid=0,hit=0;
				if(colorClass.indexOf("1") != -1)
				{
					wid=25/2;
					wid=wid-2;
					hit=24;
				}else if(colorClass.indexOf("2") != -1){
					wid=29/2;
					wid=wid-3;
					hit=30;
				}else if(colorClass.indexOf("3") != -1){
					wid=38/2;
					wid=wid-3;
					hit=38;
				}else if(colorClass.indexOf("4") != -1){
					wid=45/2;
					wid=wid-4;
					hit=45;
				}else if(colorClass.indexOf("5") != -1){
					wid=51/2;
					wid=wid-7;
					hit=51;
					//hit=hit-1;
				}else{
					wid=25;
					hit=24;
				}
			}catch(e){
				wid= 0;
				hit=0;
				console.log(e)
			}

			var colPos = new Object();
			colPos.width=wid;
			colPos.height=hit;

			return colPos;
		}

// Geo Map - Styling attributes configuration ends here
</script>

<script language="javascript">
var listViewMode='<%=listViewMode%>';
var ajaxTimeoutVal='<%=ajaxTimeout%>';
var hKT_ThemeEnabled='<%=iniUIObj.isHKTThemeEnabled()%>';
var isHKT_ThemeEnabled=(hKT_ThemeEnabled=='true'?true:false);
var legendCheckBoxChangedParams = null;
var isOtherUsersDBDrilldown = false;
var iAjax = null;
var isResize =false;
var fromNavigation =false;
var fromPage =false;
strSkin=monitorSkin;
var loginUser = "<%=loginUsername%>";
var moduleEntry='monitor';
var defaultLogoImg='<%=defaultLogoImg%>';
var isLightTheme=eval('<%=isLightTheme%>');
var paramsForDefaultLoad = "<%=queryString%>";
var fusionChartsEnabled=eval('<%=fusionChartsEnabled%>');
var isHighchartForGauge=eval('<%=isHighchartForGauge%>');
var showOtherUserDashboardList=('<%=showOtherUserDashboardList%>'=='true'?true:false);
var hideShowOtherUsersDBList=('<%=showOtherUserDashboardList%>'=='true'?false:true);
var hideShowAddDashboardBtn=('<%=allowToAddDashboard%>'=='true'?false:true);
var publicJson;
var noDashboardOtherUsersExistMsg = '<egui:intnl text="monitor.dashboard.No dashboards configured by other users" />!';
var usersDashboardGridTitle = '<egui:intnl text="monitor.common.Dashboards created by other users"/>';
var usersDashboardMainTitle = '<egui:intnl text="monitor.common.DASHBOARDS CREATED BY OTHER USERS"/>';
var noAlarmFound='<egui:intnl text="monitor.common.No alarms found for current search" />';
var noAlarmFoundMsg='<egui:intnl text="monitor.common.No alarms found" />';
var lastvisible='';
var selectWidgetAlert='<egui:intnl text="monitor.common.Please choose a widget" />';
var selectGraphTypeAlert='<egui:intnl text="monitor.common.Please choose a chart type" />';
var notApplicable = '<egui:intnl text="monitor.common.Not Applicable" />';
var noServersAssociatedMsg = '<egui:intnl text="monitor.common.No servers are associated" />';
var ddColsnotApplicableAlertMsg = '<egui:intnl text="monitor.common.DD columns are empty for this combination" />';
var WidgetNotConfigMsg ='<egui:intnl text="monitor.common.Widget Not Configured" />';
var testAlertMsg = '<egui:intnl text="monitor.measure.Please choose a test" />';
var measureAlertMsg = '<egui:intnl text="monitor.common.Please choose a measure" />';
var topNMeasureLbl = '<egui:intnl text="monitor.common.TopN Priority Measure" />';
var choosedashboardtypeLbl = '<egui:intnl text="monitor.common.CHOOSE DASHBOARD TYPE" />';
var compTypAlertMsg = '<egui:intnl text="reporter.common.Please choose a component type" />';
var componentAlertMsg = '<egui:intnl text="monitor.common.Please choose a component" />';
var customTemplateLb = '<egui:intnl text="monitor.common.Here you can create your dashboards using Graphical library and Widget library" />';
var oneClickLb = '<egui:intnl text="monitor.common.Here you can create your dashboards using templates with One-Click" />';
var descriptorAlertMsg = '<egui:intnl text="monitor.common.Please choose a descriptor" />';
var deleteAlertMsg = '<egui:intnl text="monitor.dashboard.Please select a dashboard to delete" />';
var noMeasuresFoundMsg='<egui:intnl text="monitor.common.No measures available" />';
var noDashboardExistMsg = '<egui:intnl text="monitor.dashboard.No dashboards configured" />!';
var dataViewNoDashboardExistMsg = '<egui:intnl text="monitor.dashboard.No dashboards found for" />';
var multiDashboardDeleteMsg = '<egui:intnl text="monitor.dashboard.Selected dashboards has been deleted" />';
var componentDashboard='<%=componentDashboard%>';
var isComponentDashboard=false;
var isMapAPILoaded=false;
var componentsForDashboard='<%=componentsForDashboard%>';
var singleDashboardDeleteMsg = '<egui:intnl text="monitor.dashboard.Selected dashboard has been deleted" />';
var dashboardExistAlertMsg = '<egui:intnl text="monitor.dashboard.Dashboard name already exists"/>';
var dashboardCloneMsg = '<egui:intnl text="monitor.dashboard.Dashboard Cloned Successfully"/>';
var dashboardSplCharacterAlertMsg = '<egui:intnl text="monitor.dashboard.Please give dashboard name without special characters"/>';
var refreshFreqSplAlertMsg = '<egui:intnl text="monitor.dashboard.Please give Refresh Frequency name with Numeric value"/>';
var validRefreshFreqAlertMsg = '<egui:intnl text="monitor.dashboard.Please enter the valid refresh Frequency"/>';
var minRefreshFreqAlertMsg = '<egui:intnl text="monitor.dashboard.Refresh Frequency must not be less than 30 seconds"/>';
var measureSplCharacterAlertMsg = '<egui:intnl text="monitor.dashboard.Please give measure display name without special characters"/>';
var editNameAlertMsgForHyphen = '<egui:intnl text="monitor.dashboard.Please give display name without hyphen symbol "/>';
var dashboardBlankNameAlertMsg = '<egui:intnl text="monitor.dashboard.Please enter the dashboard name"/>';
var dashboardChkSpaceAlertMsg = '<egui:intnl text="monitor.dashboard.Please give dashboard name without space"/>';
var dashboardSharingAlertMsg = '<egui:intnl text="monitor.dashboard.Please select atleast one shared user"/>';
var emptyHeadrMsg = '<egui:intnl text="monitor.dashboard.Header cannot be empty"/>';
var measureEmptyMsg = '<egui:intnl text="monitor.dashboard.Measure display name cannot be empty"/>';
var componentEmptyMsg = '<egui:intnl text="monitor.dashboard.Header cannot be empty"/>';
var thresholdLbl = '<egui:intnl text="monitor.common.Thresholds"/>';
var myDashboardMask = null;
var iniDateFormat = '<%=myDashDateFormat%>';
var combinationChartDesc='<egui:intnl text="monitor.common.Plots an combination chart for the chosen measures and server" />';
var heatMapChartDesc='<egui:intnl text="monitor.common.Plots an Heat Map chart for the chosen measures and server" />';
var trendGraphDesc='<egui:intnl text="monitor.common.Plots an Trend graph for the chosen measures and server" />';
var scatterGraphDesc='<egui:intnl text="monitor.common.Plots an scatter graph for the chosen measures and server" />';
var lastReloadTime=new Date().getTime();
var reloadFrequency = parseInt('<%=reloadFrequency%>');
var refFactor = parseInt('<%=refFactor%>');
var refrshTask = null;
var lastRefrshDateTime = new Date().getTime();
var maximizedViewEnabled = false;
var maximizedBlockId = '';
var isNewWin=eval('<%=isNewWin%>');
var isCSRFFilterEnabled = <%=isCSRFFilterEnabled%>;
var uploadMsgAlert= '<egui:intnl text="monitor.common.Are you sure you want to upload and set the image as background"/>';
var uploadErrorMsgAlert= '<egui:intnl text="monitor.common.You are not authorized to upload and set the image as background"/>';
var uploadErrorTitle= '<egui:intnl text="monitor.common.File upload - Not authorized"/>';
var uploadBtnMsg= '<egui:intnl text="monitor.common.Not authorized to choose file"/>';
var deleteBlockMsg= '<egui:intnl text="monitor.common.Are you sure you want to delete this widget"/>';
var deleteDashboardsMsg= '<egui:intnl text="monitor.common.Are you sure you want to delete the selected dashboards"/>';
var setAsDefaultDashboardsMsg= '<egui:intnl text="monitor.common.Are you sure you want to set the selected dashboard as home"/>';
var uploadProfileMsgAlert= '<egui:intnl text="monitor.common.Are you sure you want to upload and set the image as profile"/>';
var deleteDashboardMsg= '<egui:intnl text="monitor.common.Are you sure you want to delete the selected dashboard"/>';
var dashboardConfigureMsg= '<egui:intnl text="monitor.common.Please configure this dashboard"/>';
var deletColumnAlertMsg= ' <egui:intnl text="monitor.dashboard.Are you sure you want to remove this column"/>?';
var selectionsLbl =  '<egui:intnl text="monitor.common.Selection Details"/>';
var allVMsSelectonAlert='<egui:intnl text="monitor.common.Individual VMs cannot be choosen if All VMs option selected" />';
var allVmsAlert =  '<egui:intnl text="monitor.common.All the Vm(s) are configured already"/>';
var noConfigAvailableMsg =  '<egui:intnl text="monitor.common.No configuration available"/>';
var allDescriptors =  '<egui:intnl text="monitor.common.All Descriptors"/>';
var vmNameLable =  '<egui:intnl text="monitor.common.Virtual Machine(s)"/>';
var allVms =  '<egui:intnl text="monitor.common.All VMs"/>';
var allServers =  '<egui:intnl text="monitor.common.All Servers"/>';
var showLbl =  '<egui:intnl text="monitor.common.Show"/>';
var displayLbl =  '<egui:intnl text="monitor.common.Display"/>';
var viewLbl =  '<egui:intnl text="monitor.common.View"/>';
var modifyDashLbl =  '<egui:intnl text="monitor.common.Edit"/>';
var homeTooltipLbl =  '<egui:intnl text="monitor.common.Home"/>';
var helpTooltip =  '<egui:intnl text="monitor.common.Help"/>';
var popoutTooltip =  '<egui:intnl text="monitor.common.Dashboard Popout"/>';
var sharingGridTitle = '<egui:intnl text="monitor.common.Dashboards shared by other users"/>';
var measureNameAlreadyExists = '<egui:intnl text="monitor.dashboard.Measure name already exists"/>';
var compNameAlreadyExists = '<egui:intnl text="monitor.dashboard.component name already exists"/>';
var compnameSpecialCharacterAlert = '<egui:intnl text="monitor.dashboard.Please give component display name without space characters"/>';
var availableUsersLbl = '<egui:intnl text="monitor.common.Available Users"/>';
var selectedUserslbl = '<egui:intnl text="monitor.common.Selected Users"/>';
var addDashLbl = '<egui:intnl text="monitor.common.Add Dashboard"/>';
var myDashboardAlertLbl = '<egui:intnl text="monitor.common.My Dashboard" />';
var myDashboardDeleteAlertLbl = '<egui:intnl text="monitor.common.DELETE" />';
var anonymousUser = '<%=isAnonymousUser%>';
var dashBrdNameLbl = '<egui:intnl text="monitor.common.Name" />';
var publishLbl = '<egui:intnl text="monitor.common.Publish" />';
var editSettingsLbl = '<egui:intnl text="monitor.common.Edit" />';
var changeBgrndLbl = '<egui:intnl text="monitor.common.Change Background" />';
var setAsHomeLbl = '<egui:intnl text="monitor.common.Set As Home" />';
var addWidgetLbl = '<egui:intnl text="monitor.common.Add Custom widget" />';
var unPublishLbl = '<egui:intnl text="monitor.common.Unpublish" />';
var publishUrlLbl = '<egui:intnl text="monitor.common.Publish Url" />';
var publishDashboardLbl = '<egui:intnl text="monitor.common.Publish Dashboard" />';
var unPublishDashboardLbl = '<egui:intnl text="monitor.common.Unpublish Dashboard" />';
var rmvColLbl = '<egui:intnl text="monitor.common.Remove column" />';
var rmvBlkLbl = '<egui:intnl text="monitor.common.Remove Widget" />';
var editWidgetLbl = '<egui:intnl text="monitor.common.Edit Widget" />';
var componentTypeLbl = '<egui:intnl text="monitor.common.Component Type" />';
var changeGraphColorPaletteLbl = '<egui:intnl text="monitor.common.Change Color Palette" />';
var alarmFilterIconTooltip = '<egui:intnl text="monitor.common.Click here to filter alarms" />';
var changeColorPickerLbl = '<egui:intnl text="monitor.common.Change Color Picker" />';
var availableUserAlertLbl = '<egui:intnl text="monitor.common.No users available to associate" />';
var selectedUserAlertLbl = '<egui:intnl text="monitor.common.No users available to disassociate" />';
var metricsDeleteAlertMsg = '<egui:intnl text="monitor.common.Are you sure you want to delete this configuration" />?';
var noConfigSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose the configuration to delete" />';
var noDDColSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose a dd column" />';
var noSummarizeDDColSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose a Summarize dd column" />';
var noZoneSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose a zone" />';
var segmentLbl = '<egui:intnl text="monitor.common.Segment" />';
var noSegmentSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose a segment" />';
var noServiceSelectedAlertMsg = '<egui:intnl text="monitor.common.Please choose a service" />';
var invalidMeasAlertMsg = '<egui:intnl text="monitor.common.Please choose a measures with same unit" />';
var pieChartTemplateAlertMsg = '<egui:intnl text="monitor.common.Please choose a pie chart template" />';
var chartAlertMsg = '<egui:intnl text="monitor.common.Dial,Digital charts can configured only with 3 or 4 columns dashboard layout" />';
var aggEnabledLbl = '<egui:intnl text="monitor.common.Is Aggregation Enabled" />';
var aggEnableAlertMsg = '<egui:intnl text="monitor.common.Metric aggregation must be enabled for stacked chart" />.<egui:intnl text="monitor.common.Please enable aggregation for all metrics" />';
var dataforView ="";
var aggFuncLbl = '<egui:intnl text="monitor.common.Aggregate Function" />';
var chartTypeLbl = '<egui:intnl text="monitor.common.Chart Type" />';
var descDispLbl = '<egui:intnl text="monitor.common.Descriptor" />';
var compDispLbl = '<egui:intnl text="monitor.common.Component" />';
var testDispLbl = '<egui:intnl text="monitor.common.Test" />';
var measDispLbl = '<egui:intnl text="monitor.common.Measure" />';
var searchDispLbl = '<egui:intnl text="monitor.common.Search" />';
var addDashboardBtn = '<egui:intnl text="monitor.common.Add Dashboard" />';
var descriptionDispLbl = '<egui:intnl text="monitor.common.Description" />';
var toolList= '<egui:intnl text="monitor.quickinsight.List"/>';
var toolDelete= '<egui:intnl text="monitor.common.Delete"/>';
var toolDeleteAll= '<egui:intnl text="monitor.common.Delete All"/>';
var addColumnLbl= '<egui:intnl text="monitor.dashboard.Add Column"/>';
var addMetricsTitle= '<egui:intnl text="monitor.dashboard.Widget Configuration"/>';
var addDispBtn= '<egui:intnl text="monitor.livegraph.Add"/>';
var updateDispBtn= '<egui:intnl text="monitor.livegraph.Update"/>';
var toolDescriptor= '<egui:intnl text="monitor.measuresComparison.Descriptor"/>';
var componentDispLbl= '<egui:intnl text="monitor.common.Component"/>';
var myDashboardTitle='<egui:intnl text="monitor.dashboard.List Of Dashboards Title"/>';
var templateAlertMsg='<egui:intnl text="monitor.common.Please choose a template"/>';
var allServersAlertMsg='<egui:intnl text="monitor.common.Individual Servers cannot be selected if All Servers are selected"/>!';
var allDescriptorsAlertMsg='<egui:intnl text="monitor.common.Individual Descriptors cannot be selected if All Descriptors are selected"/>!';
var toolDialchart= '<egui:intnl text="monitor.dashboard.Dial Chart"/>';
var toolDigitalchart= '<egui:intnl text="monitor.dashboard.Digital Chart"/>';
var toolPiechart= '<egui:intnl text="monitor.dashboard.Pie Chart"/>';
var toolActivitychart= '<egui:intnl text="monitor.dashboard.Activity Chart"/>';
var toolBarGraph= '<egui:intnl text="monitor.dashboard.Bar Graph"/>';
var toolTable= '<egui:intnl text="monitor.dashboard.Table"/>';
var toolLineChart= '<egui:intnl text="monitor.dashboard.Line Chart"/>';
var toolTimelineChart= '<egui:intnl text="monitor.dashboard.Timeline Chart"/>';
var toolDD= '<egui:intnl text="monitor.dashboard.Detailed Diagnosis"/>';
var toolAreaChart= '<egui:intnl text="monitor.dashboard.Area Chart"/>';
var toolCombinationChart= '<egui:intnl text="monitor.dashboard.Combination Chart"/>';
var tableHeaderTitle= '<egui:intnl text="monitor.dashboard.Table"/>';
var textHeaderTitle= '<egui:intnl text="monitor.dashboard.Text Widget"/>';
var barchartHeaderTitle= '<egui:intnl text="monitor.dashboard.BarChart Header"/>';
var MetricDDTitle= '<egui:intnl text="monitor.dashboard.DD Metrics"/>';
var adddataSourceContent= '<egui:intnl text="monitor.dashboard.Click here to add data source"/>';
var showTopNLbl= '<egui:intnl text="monitor.dashboard.ShowTopN"/>';
var toolModify= '<egui:intnl text="reporter.common.Modify"/>';
var toolThin= '<egui:intnl text="monitor.dashboard.Thin"/>';
var toolNormal= '<egui:intnl text="monitor.dashboard.Normal"/>';
var toolWide= '<egui:intnl text="monitor.dashboard.Wide"/>';
var toolGrant= '<egui:intnl text="monitor.dashboard.Grant"/>';
var toolRevoke= '<egui:intnl text="monitor.dashboard.Revoke"/>';
var requestTimeoutMsg= '<egui:intnl text="monitor.dashboard.Request Timed Out"/> ';
var onlineLbl ='<egui:intnl text="monitor.common.Online"/>';
var offlineLbl ='<egui:intnl text="monitor.common.Offline"/>';
var maintenanceLbl = '<egui:intnl text="monitor.common.Maintenance"/>';
var maxDashbrdLengthAlert= '<egui:intnl text="monitor.dashboard.Maximum allowed length for a dashboard name is 32 characters"/> ';
var maxDashbrdDesLengthAlert= '<egui:intnl text="monitor.dashboard.Maximum allowed length for a dashboard description is 100 characters"/> ';
var modifyDashSettingsMsg = '<egui:intnl text="monitor.dashboard.Dashboard settings has been modified successfully" />';
var currentDateFormat = '<%=myDashDateFormat%>';
var refreshTxtBoxLbl='<egui:intnl text="monitor.common.Refresh Frequency" /> (<egui:intnl text="monitor.common.secs" />)';
var secsLbl='<egui:intnl text="monitor.common.secs"/>';
var refreshFreqBlankAlert='<egui:intnl text="monitor.common.Blank space not allowed in refresh frequency" />';
var showDescriptorsLbl='<egui:intnl text="monitor.common.Show Descriptors" />';
var showValuesLbl='<egui:intnl text="monitor.common.Show Values" />';
var showLegendStyleLbl='<egui:intnl text="monitor.common.Legend Style" />';
var weightedAverageLbl='<egui:intnl text="monitor.common.Weighted Average"/>';
var isAnonymousUserAccess = false;
var isVmOnlyUser = false;
var publishedDashboard = eval('<%=publishedDashboard%>');
var isPublishedDashboard = false;
var descLbl = '<egui:intnl text="monitor.common.Descriptor" />';
var refFreqInLong = 60000;
var hideDDDragIcon = true;
var defaultMyDashboard = "None";
var ddConfigDisabled = eval('<%=isDDConfigDisabled%>');
var saveBlocksPosition = false;
var myDashApp = null;
refFreqInLong = parseInt("<%=refreshFrequency%>");
var displayTimeline=eval('<%=displayTimeline%>');
var eventAnalysistimeline='<%=eventAnalysistimeline%>';
var addingWidget=false;
var weightedAverageLbl='<egui:intnl text="monitor.common.Weighted Average" />';
var displayTypeAlertMsg='<egui:intnl text="monitor.common.Please choose a display type" />';
var legendTypeAlertMsg='<egui:intnl text="monitor.common.Please choose a legend display option" />';
var disableMydashboardPopout=eval('<%=isDisablePopupOption%>');
var tableDescription='<egui:intnl text="monitor.common.Tabulates real-time metrics for servers" />';
var ddDescription='<egui:intnl text="monitor.common.Tabulates latest detailed diagnostics of a chosen measure" />';
var alertDesc='<egui:intnl text="monitor.common.Lists current alarms" />';
var vmAlertDesc='<egui:intnl text="monitor.common.Lists current VM alarms" />';
var liveMeasDesc='<egui:intnl text="monitor.common.Displays real-time metrics reported by a chosen test for selected servers" />';
var gaugeMeterDesc='<egui:intnl text="monitor.common.Depicts real-time metrics for server" />';
var digitalChartDesc='<egui:intnl text="monitor.common.Depicts real-time metrics for server in Digital display" />';
var pieChartDesc='<egui:intnl text="monitor.common.Depicts how chosen measures are distributed for selected templates" />';
var activityChartDesc='<egui:intnl text="monitor.common.Depicts how chosen measures are distributed for selected templates" />';
var barChartDesc='<egui:intnl text="monitor.common.Compares real-time metrics across servers" />';
var lineChartDesc='<egui:intnl text="monitor.common.Plots Min,Max and Avg of metrics for servers" />';
var timeLineChartDesc='<egui:intnl text="monitor.common.Plots a timeline chart for the chosen measure and server" />';
var topologyChartDesc='<egui:intnl text="monitor.common.Plots segment/service Topology" />';
var areaChartDesc='<egui:intnl text="monitor.common.Plots an Area chart for the chosen measure and server" />';
var combinationChartDesc='<egui:intnl text="monitor.common.Plots an combination chart for the chosen measures and server" />';
var healthsummaryDesc='<egui:intnl text="monitor.common.Displays stacked bars indicating current health of chosen components" />';
var tierHealthDesc='<egui:intnl text="monitor.common.Displays stacked bars indicating current health of chosen components" />';
var serviceHealthDesc='<egui:intnl text="monitor.common.Displays a pie chart indicating current health of chosen service" />';
var networkHealthDesc='<egui:intnl text="monitor.common.Displays a pie chart indicating current network health of chosen Entity" />';
var infrastructureHealthDesc='<egui:intnl text="monitor.common.Displays a pie chart indicating current health of chosen infrastructure" />';
var infrastructureHealthChartTitle='<egui:intnl text="monitor.common.Infrastructure Health" />';
var proActiveAlertsChartTitle='<egui:intnl text="monitor.common.Pro Active Alerts" />';
var incidentsSummaryChartTitle='<egui:intnl text="monitor.common.Problem Distribution" />';
var weatherTitle='<egui:intnl text="monitor.common.Weather" />';
var zonemapTitle='<egui:intnl text="monitor.common.Zone Map" />';
var settingsLbl='<egui:intnl text="monitor.common.Settings" />';
var weatherDataFailureMsg='<egui:intnl text="monitor.common.Unable to get weather forecast for" />';
var weatherDataFailureMsg1='<egui:intnl text="monitor.common.Unable to get weather forecast for your location Please select a location" />';
var newsDataFailureMsg='<egui:intnl text="monitor.common.Unable to get news for selected country Please select different country" />';
var newsDataFailureMsgTab='<egui:intnl text="monitor.common.Unable to get news for " />';
var weatherDesc='<egui:intnl text="monitor.common.Provides weather updates for configured city" />';
var newsDesc='<egui:intnl text="monitor.common.Displays top news in panels" />';
var legendDisplayLbl='<egui:intnl text="monitor.common.Legend Display" />';
var showOptionsLblforTable='<egui:intnl text="monitor.common.Show" />';
var invalidImageTypeAlert='<egui:intnl text="monitor.common.Please choose a png or jpg or gif image file type" />!';
var netWorkAvailabilityMsg='<egui:intnl text="monitor.dashboard.Please connect with internet to configure this widget."/>';
var alarmsAlertMsg='<egui:intnl text="monitor.dashboard.Alarms widget is only allowed once per dashboard"/>';
var healthSummaryAlertMsg='<egui:intnl text="monitor.dashboard.Health summary widget is only allowed once per dashboard"/>';
var tierHealthAlertMsg='<egui:intnl text="monitor.dashboard.Tier Health widget is only allowed once per dashboard"/>';
var healthAlertMsg='<egui:intnl text="monitor.dashboard.Health widget is only allowed once per dashboard"/>';
var networkhealthAlertMsg='<egui:intnl text="monitor.dashboard.Network Health widget is only allowed once per dashboard"/>';
var newsAlertMsg='<egui:intnl text="monitor.dashboard.News widget is only allowed once per dashboard"/>';
var weatherAlertMsg='<egui:intnl text="monitor.dashboard.Weather widget is only allowed once per dashboard"/>';
var MapsAlertMsg='<egui:intnl text="monitor.dashboard.Maps widget is only allowed once per dashboard"/>';
var userExperAlertMsg='<egui:intnl text="monitor.dashboard.User Experience widget is only allowed once per dashboard"/>';
var zoneMapsAlertMsg='<egui:intnl text="monitor.dashboard.Zone Maps widget is only allowed once per dashboard"/>';
var isPanelRefreshing=false;
var lastRefreshedTime=new Date().getTime();
var publishDashAlert='<egui:intnl text="monitor.common.Dashboard published successfully" />';
var unPublishDashAlert='<egui:intnl text="monitor.common.Dashboard unpublished successfully" />';
var tabluarViewTitle='<egui:intnl text="monitor.common.Table" />';
var barChartTitle='<egui:intnl text="monitor.common.Bar Graph" />';
var lineChartTitle='<egui:intnl text="monitor.common.Line Chart" />';
var timeLineChartTitle='<egui:intnl text="monitor.common.Timeline Chart" />';
var toplogyWidgetTitle='<egui:intnl text="monitor.common.Topology" />';
var topologyAlertMsg='<egui:intnl text="monitor.common.Please configure Topology" />';
var areaChartTitle='<egui:intnl text="monitor.common.Area Chart" />';
var combinationChartTitle='<egui:intnl text="monitor.common.Combination Chart" />';
var heatMapChartTitle='<egui:intnl text="monitor.common.Heat Map" />';
var trendGraphTitle='<egui:intnl text="monitor.common.Trend Graph" />';
var topNChartTitle='<egui:intnl text="monitor.common.TopN Analysis" />';
var scatterPlotTitle='<egui:intnl text="monitor.common.Scatter Plot" />';
var ddTableTitle='<egui:intnl text="monitor.common.Detailed Diagnosis" />';
var alertsTitle='<egui:intnl text="monitor.common.Alerts" />';
var vmAlarmsTitle='<egui:intnl text="monitor.common.VM Alerts" />';
var liveMeasTitle='<egui:intnl text="monitor.common.Live Measures" />';
var guageChartTitle='<egui:intnl text="monitor.common.Gauge Meter" />';
var digitalChartTitle='<egui:intnl text="monitor.common.Digital Chart" />';
var pieChartTitle='<egui:intnl text="monitor.common.Pie Chart" />';
var activityChartTitle='<egui:intnl text="monitor.common.Activity Chart" />';
var infrastructureHealthChartTitle='<egui:intnl text="monitor.common.Infrastructure Health" />';
var infrastructureHealthWindowTitle='<egui:intnl text="monitor.common.Infrastructure Health - configuration" />';
var healthPieChartTitle='<egui:intnl text="monitor.common.Health" />';
var networkhealthPieChartTitle='<egui:intnl text="monitor.common.Network Health" />';
var healthsummaryTitle='<egui:intnl text="monitor.common.Health-Executive" />';
var tierHealthTitle='<egui:intnl text="monitor.common.Tier Health" />';
var weatherTitle='<egui:intnl text="monitor.common.Weather" />';
var placesLbl='<egui:intnl text="monitor.common.Places" />';
var MapsTitle='<egui:intnl text="monitor.common.Map Widget" />';
var healthTitle='<egui:intnl text="monitor.common.Health" />';
var ServerHealthTitle='<egui:intnl text="monitor.common.Health - By Metrics" />';
var servicehealthAddMetricsTitle= '<egui:intnl text="monitor.dashboard.Health-Executive - Configuration"/>';
var userExperienceTitle='<egui:intnl text="monitor.common.User Experience" />';
var newsTitle='<egui:intnl text="monitor.common.News" />';
var kpiWidgetTitle='<egui:intnl text="monitor.common.KPI Widget" />';
var allVMsCannotAdd='<egui:intnl text="monitor.common.All VMs cannot be added if individual VMs are added already" />';
var individualVMsCannotAdd='<egui:intnl text="monitor.common.Individual VMs cannot be added if AllVMs are selected" />';
var individualCompTypsCannotAdd='<egui:intnl text="monitor.common.Individual Component Types cannot be selected if All Component Types are selected" />';
var selAlreadyExt='<egui:intnl text="monitor.common.selection already exists" />';
var addVMs='<egui:intnl text="monitor.common.Please add VM" />';
var showStackedAreaLbl='<egui:intnl text="monitor.common.Stack Area Chart" />';
var showStackedBarLbl='<egui:intnl text="monitor.common.Stack Bar Chart" />';
var showChartSummaryLbl='<egui:intnl text="monitor.common.Show Summary" />';
var DateErrorMsg = '<egui:intnl text="monitor.common.Start date should be lesser than end date" />';
var timeErrorMsg = '<egui:intnl text="monitor.common.From date should be lesser than Current date" />';
var miscWidgetMsg='<egui:intnl text="monitor.dashboard.Above widgets requires internet connectivity."/>';
var widgetTitleEditor=null;
var configurationMsg='<egui:intnl text="monitor.common.Metrics configuration" />';
var mapConfigurationMsg='<egui:intnl text="monitor.common.configuration" />';
var newsConfTitle='<egui:intnl text="monitor.common.News - Widget Configuration" />';
var vmAlarmsPopupTitle='<egui:intnl text="monitor.common.Alarm Details for" />';
var csrfToken = '<%=csrfToken_temp%>';
var allowRWShar='<egui:intnl text="monitor.common.Allow R/W sharing" />';
var rwShareAvailUser='<egui:intnl text="monitor.common.Available users for R/W sharing" />';
var selectType='<egui:intnl text="monitor.common.Select Type" />';
var compType='<egui:intnl text="monitor.common.Component Type" />';
var managedItem='<egui:intnl text="monitor.common.Managed Items" />';
var unManagedItem='<egui:intnl text="monitor.common.Unmanaged Items" />';
var managedItem1='<egui:intnl text="monitor.common.Associated Elements" />';
var unManagedItem1='<egui:intnl text="monitor.common.Dissociated Elements" />';
var managedItem2='<egui:intnl text="monitor.common.Associated Descriptors" />';
var unManagedItem2='<egui:intnl text="monitor.common.Dissociated Descriptors" />';
var noElementsAvail='<egui:intnl text="monitor.common.No elements available" />';
var atleastOneDesc='<egui:intnl text="monitor.common.Please choose atleast one descriptor" />';

var setasHome='<egui:intnl text="monitor.common.Do you want to set this dashboard as home" />';
var cloneDashbrdLbl='<egui:intnl text="monitor.dashboard.CLONE MY DASHBOARD" />';
var dashNameLbl='<egui:intnl text="monitor.dashboard.New Dashboard Name" />';
var removeWidgetAlert='<egui:intnl text="monitor.common.Do you want to remove this widget" />';
var selectRWSharinguser = '<egui:intnl text="monitor.common.Please choose user(s) for R/W sharing" />';
var widgetAddedAlertMsg = '<egui:intnl text="monitor.common.Widget has been added successfully" />';
var widgetRemoveAlertMsg = '<egui:intnl text="monitor.common.Widget has been Removed successfully" />';
var addWidgetAlerMsg = '<egui:intnl text="monitor.common.Adding widgets to  the dashboard makes it Read- only" />.<egui:intnl text="monitor.common.Any changes made to the template will not be reflected" />.<egui:intnl text="monitor.common.Do you want to continue" />?';
var advSettingsLbl='<egui:intnl text="monitor.common.Advance settings" />';
var searchDashLbl='<egui:intnl text="monitor.common.Search Dashboard" />';
var healthAddMetricsTitle= '<egui:intnl text="monitor.dashboard.Health - Key Metrics Configuration"/>';
var infraHealthAddMetricsTitle= '<egui:intnl text="monitor.dashboard.Server/Application Health - Key Metrics Configuration"/>';
var healthDesc='<egui:intnl text="monitor.common.Tabulates current health of chosen component" />';
var compFieldLbl=componentDispLbl+" (s)";
var isOneClickDashboard = 'no';
var legendPnlTootltip = '<egui:intnl text="monitor.common.Click here to view legends"/>';
var legendPnlHideTootltip = '<egui:intnl text="monitor.common.Click here to hide legends"/>';
var descriptorExcludeAlertMsg = '<egui:intnl text="monitor.dashboard.Please enter a valid descriptor pattern "/>';
var excludeDescriptorLbl='<egui:intnl text="monitor.common.Exclude Descriptor(s)" />';
var lastUpdatedTime='<egui:intnl text="monitor.common.Last updated time" />';
var excludeDescriptorEmptLbl='<egui:intnl text="monitor.common.Descriptor(s)" />';
var applyStateColorLbl='<egui:intnl text="monitor.common.Apply State Color" />';
var showMeasureStateForTableWidget=('<%=showMeasureStateForTableWidget%>'=='true'?true:false);
var showLegandPanelForWidgetsVal=('<%=showLegandPanelForWidgetsVal%>'=='true'?true:false);
var showDashboardListInGridView=('<%=showDashboardListInGridView%>'=='true'?true:false);
var alertDistributionByServer=('<%=alertDistributionByServer%>'=='true'?true:false);
var showHealthStatusInLiveBox=('<%=showHealthStatusInLiveBox%>'=='true'?true:false);
var metricsConfiguredAlert='<egui:intnl text="monitor.common.Metrics are added successfully" />';
var xAxisComponentTypeAlert='<egui:intnl text="monitor.common.Please choose a x axis component type" />';
var yAxisComponentTypeAlert='<egui:intnl text="monitor.common.Please choose a y axis component type" />';
var xAxisComponentAlert='<egui:intnl text="monitor.common.Please choose a x axis component" />';
var yAxisComponentAlert='<egui:intnl text="monitor.common.Please choose a y axis component" />';
var xAxisTestAlert='<egui:intnl text="monitor.common.Please choose a x axis test" />';
var yAxisTestAlert='<egui:intnl text="monitor.common.Please choose a y axis test" />';
var xAxisMeasureAlert='<egui:intnl text="monitor.common.Please choose a x axis measure" />';
var yAxisMeasureAlert='<egui:intnl text="monitor.common.Please choose a y axis measure" />';
var xAxisDescriptorAlert='<egui:intnl text="monitor.common.Please choose a x axis descriptor" />';
var yAxisDescriptorAlert='<egui:intnl text="monitor.common.Please choose a y axis descriptor" />';
var noDDDataMsg='<egui:intnl text="monitor.common.No Detailed Measures Available" />';
var viewTypeLbl='<egui:intnl text="monitor.common.View Type" />';
var distributionLbl='<egui:intnl text="monitor.common.Show Distribution As Pct(%)" />';
var statisticsLbl='<egui:intnl text="monitor.common.Statistics" />';
var minMaxLbl='<egui:intnl text="monitor.common.Min/Max" />';
var avgLbl='<egui:intnl text="monitor.common.Avg" />';
var sumLbl='<egui:intnl text="monitor.common.Sum" />';
var componentsLbl='<egui:intnl text="monitor.common.Components" />';
var availDashboardMsg='<egui:intnl text="monitor.dashboard.AVAILABLE DASHBOARDS" />';
var addNewLbl='<egui:intnl text="monitor.dashboard.Add New" />';
var customDashLbl='<egui:intnl text="monitor.dashboard.Custom Dashboard" />';
var oneClickDashLbl='<egui:intnl text="monitor.dashboard.One-Click Dashboard" />';
var readOnlyLbl='<egui:intnl text="monitor.dashboard.Read Only" />';
var readWriteLbl='<egui:intnl text="monitor.dashboard.Read" />/<egui:intnl text="monitor.dashboard.Write" />';

var performanceAlertLbl='<egui:intnl text="monitor.dashboard.Enabling historical view for more metrics will affect the dashboard performance" />';
var createLbl='<egui:intnl text="monitor.dashboard.CREATE" />';
var expandViewLbl='<egui:intnl text="monitor.dashboard.Select Expand View" />';
var alreadyExistLbl='<egui:intnl text="monitor.dashboard.Selected DD column already choosen in summarize dd data by option" />';
//var searchComLbl='<egui:intnl text="monitor.dashboard.Search Component" />(<egui:intnl text="monitor.dashboard.s" />)';
var searchCompFieldLbl=searchDispLbl+' '+componentDispLbl+'('+'<egui:intnl text="monitor.dashboard.s" />'+')';
var chooseTemplateLbl='<egui:intnl text="monitor.dashboard.Choose Template" />';
var defaultLbl='<egui:intnl text="monitor.dashboard.Default" />';
var myTemplatesLbl='<egui:intnl text="monitor.dashboard.My Templates" />';
var iconLLibraryLbl='<egui:intnl text="monitor.dashboard.ICON LIBRARY" />';
var changeImageLbl='<egui:intnl text="monitor.dashboard.Change Image" />';
var uploadYourOwnLbl='<egui:intnl text="monitor.dashboard.Upload Your Own" />';
var chooseFileLbl='<egui:intnl text="monitor.dashboard.Choose File" />';
var noFileChosenLbl='<egui:intnl text="monitor.dashboard.No file chosen" />';
var uploadLbl='<egui:intnl text="monitor.dashboard.Upload" />';
var closeLbl='<egui:intnl text="monitor.dashboard.CLOSE" />';
var selectLbl='<egui:intnl text="monitor.dashboard.SELECT" />';
var noImgLbl='<egui:intnl text="monitor.dashboard.No image found for" />';
var searchLbl='<egui:intnl text="monitor.dashboard.search" />';
var SLbl='<egui:intnl text="monitor.dashboard.S" />';
var MLbl='<egui:intnl text="monitor.dashboard.M" />';
var LLbl='<egui:intnl text="monitor.dashboard.L" />';
var XLLbl='<egui:intnl text="monitor.dashboard.XL" />';
var selectSmlLbl='<egui:intnl text="monitor.dashboard.Select" />';
var customLbl='<egui:intnl text="monitor.dashboard.Custom" />';
var unConfiguredMsg='<egui:intnl text="monitor.dashboard.Widget Not Configured" />';
var addDashboardMsg = '<egui:intnl text="monitor.dashboard.Click here to Add dashboard" />';
var screenLabelsObj={};
screenLabelsObj['chooseGrouping']='<egui:intnl text="monitor.common.Please choose a grouping" />';
screenLabelsObj['FilterBy']='<egui:intnl text="monitor.common.Filter By" />';
screenLabelsObj['PriorityLbl']='<egui:intnl text="monitor.common.Priority" />';
screenLabelsObj['AlarmFilterSettingsLbl']='<egui:intnl text="monitor.common.Alarm Filter Settings" />';
screenLabelsObj['Clone']='<egui:intnl text="monitor.common.Clone" />';
screenLabelsObj['Add a Widget']='<egui:intnl text="monitor.common.Add a Widget" />';
screenLabelsObj['Change']='<egui:intnl text="monitor.common.Change" />';
screenLabelsObj['Change']='<egui:intnl text="monitor.common.Change" />';
screenLabelsObj['Set As Default']='<egui:intnl text="monitor.common.Set As Default" />';
screenLabelsObj['Data Source']='<egui:intnl text="monitor.common.Data Source" />';
screenLabelsObj['Refresh']='<egui:intnl text="monitor.common.Refresh" />';
screenLabelsObj['Edit']='<egui:intnl text="monitor.common.Edit" />...';
screenLabelsObj['Remove from dashboard']='<egui:intnl text="monitor.common.Remove from dashboard" />';
screenLabelsObj['Shared']='<egui:intnl text="monitor.common.Shared" />';
screenLabelsObj['Personal']='<egui:intnl text="monitor.common.Personal" />';
screenLabelsObj['yMaxLimit-Non-NumericAlertMsg']='<egui:intnl text="monitor.common.Please give a numeric value for y-Axis Max Limit" />';
screenLabelsObj['More']='<egui:intnl text="monitor.common.More" />';
screenLabelsObj['Options']='<egui:intnl text="monitor.common.Options" />';
screenLabelsObj['No data found for']='<egui:intnl text="monitor.common.No data found for" />';
screenLabelsObj['Distribution']='<egui:intnl text="monitor.common.Distribution" />';
screenLabelsObj['Offline']='<egui:intnl text="monitor.common.Offline" />';
screenLabelsObj['Online']='<egui:intnl text="monitor.common.Online" />';
screenLabelsObj['Maintenance']='<egui:intnl text="monitor.common.Maintenance" />';
screenLabelsObj['World News']='<egui:intnl text="monitor.common.World News" />';
screenLabelsObj['Stock']='<egui:intnl text="monitor.common.Stock" />';
screenLabelsObj['Life']='<egui:intnl text="monitor.common.Life" />';
screenLabelsObj['Sports']='<egui:intnl text="monitor.common.Sports" />';
screenLabelsObj['No topics to display']='<egui:intnl text="monitor.common.No topics to display" />';
screenLabelsObj['Displaying']='<egui:intnl text="monitor.common.Displaying" />';
screenLabelsObj['of']='<egui:intnl text="monitor.common.of" />';
screenLabelsObj['Percentage']='<egui:intnl text="monitor.common.Percentage" />';
screenLabelsObj['Change Image']='<egui:intnl text="monitor.common.Change Image" />';
screenLabelsObj['BackBtnLbl']='<egui:intnl text="monitor.common.Back" />';







var isMonitorHome=eval('<%=isMonitorHome%>');
var consolidatedDashboard='<%=consolidatedDashboard%>';
var compTypeForConsolidatedDashboard='<%=compTypeForConsolidatedDashboard%>';
var isConsolidatedDashboard=false;
var disableUnitInDigitalChart=('<%=disableUnitInDigitalChart%>'=='true'?true:false);
var consolidatedDashURL='';
var templateNameForConsolidatedDashboard='<%=templateNameForConsolidatedDashboard%>';
var backToConsolidatedView='<%=backToConsolidatedView%>';
var showComponentTypeFilter=('<%=showComponentTypeFilter%>'=='true'?true:false);
var showAlarmSummary=('<%=showAlarmSummary%>'=='true'?true:false);
var ColorPickerColors='<%=ColorPickerColors%>';
var showConfiguredDataInPreview=('<%=showConfiguredDataInPreview%>'=='true'?true:false);
var hideHeaderForPublishedDashboard = eval('<%=isNeedToHideHeader%>');
var showTimelineForPublishedDashboard = eval('<%=isNeedToShowTimeLine%>');
var preSelectedTestForDD=null;
var isComponentAutoAssociationEnabled = eval('<%=isComponentAutoAssociationEnabled%>');

screenLabelsObj['My Widgets']='<egui:intnl text="monitor.dashboard.My Widgets" />';
screenLabelsObj['MyWidgetsTabDescription']='<egui:intnl text="monitor.dashboard.Widgets built by you or shared by others" />';
screenLabelsObj['WidgetsGallery']='<egui:intnl text="monitor.dashboard.Widgets Gallery" />';
screenLabelsObj['WidgetsGalleryDescription']='<egui:intnl text="monitor.dashboard.Pre-built widgets" />';
screenLabelsObj['ConfigurableWidgets']='<egui:intnl text="monitor.dashboard.Configurable Widgets" />';
screenLabelsObj['ConfigurableWidgetsDescription']='<egui:intnl text="monitor.dashboard.Widgets can be configured as required" />';
screenLabelsObj['AddWidgetPopupTitle']='<egui:intnl text="monitor.dashboard.Add Widgets" />';
screenLabelsObj['MyWidgetsEmptyMsg']='<egui:intnl text="monitor.dashboard.There are no widgets owned by you or shared by others" />';
screenLabelsObj['AddToDashboardButtonLabel']='<egui:intnl text="monitor.dashboard.Add To Dashboard" />';
screenLabelsObj['RemoveFromDashboardButtonLabel']='<egui:intnl text="monitor.dashboard.Remove From Dashboard" />';
screenLabelsObj['DoneButtonLabel']='<egui:intnl text="monitor.dashboard.Done" />';
screenLabelsObj['ExcludeDescriptors']='<egui:intnl text="monitor.dashboard.Exclude Descriptors" />';
screenLabelsObj['Drill_Down_URL']='<egui:intnl text="monitor.dashboard.Drill Down URL" />';
screenLabelsObj['ColorPalette']='<egui:intnl text="monitor.dashboard.Color Palette" />';
screenLabelsObj['ConfigureMetrics']='<egui:intnl text="monitor.dashboard.Configure Metrics" />';
screenLabelsObj['Measures']='<egui:intnl text="monitor.dashboard.Measures" />';
screenLabelsObj['SearchMeasures']='<egui:intnl text="monitor.dashboard.Search Measures(s)" />';
screenLabelsObj['SearchComponents']='<egui:intnl text="monitor.dashboard.Search Components(s)" />';
screenLabelsObj['SearchDescriptors']='<egui:intnl text="monitor.dashboard.Search Descriptors(s)" />';
screenLabelsObj['AddBtnLbl']='<egui:intnl text="monitor.dashboard.Add" />';
screenLabelsObj['FinishBtnLbl']='<egui:intnl text="monitor.dashboard.Finish" />';
screenLabelsObj['ConfigureBtnLbl']='<egui:intnl text="monitor.dashboard.Configure" />';
screenLabelsObj['UseExternalDS']='<egui:intnl text="monitor.dashboard.Use external data sources" />';
screenLabelsObj['AggregateType']='<egui:intnl text="monitor.dashboard.Please choose aggregate type" />';
screenLabelsObj['WidgetConfigLbl']='<egui:intnl text="monitor.dashboard.Widget Configuration" />';
screenLabelsObj['ChooseIconLbl']='<egui:intnl text="monitor.dashboard.Choose Icon" />';
screenLabelsObj['Data Source Configuration']='<egui:intnl text="monitor.dashboard.Data Source Configuration" />';
screenLabelsObj['Data Source Name']='<egui:intnl text="monitor.dashboard.Data Source Name" />';
screenLabelsObj['Type']='<egui:intnl text="monitor.dashboard.Type" />';
screenLabelsObj['No Data Source Available']='<egui:intnl text="monitor.dashboard.No Data Source Available" />';
screenLabelsObj['No Data available']='<egui:intnl text="monitor.dashboard.No Data available" />';
screenLabelsObj['No Headers Available']='<egui:intnl text="monitor.dashboard.No Headers Available" />';
screenLabelsObj['REST Integration']='<egui:intnl text="monitor.dashboard.REST Integration" />';
screenLabelsObj['Please choose the headers to delete']='<egui:intnl text="monitor.dashboard.Please choose the headers to delete" />';
screenLabelsObj['Are you sure you want to delete selected header']='<egui:intnl text="monitor.dashboard.Are you sure you want to delete selected header" />';
screenLabelsObj['Alert']='<egui:intnl text="monitor.dashboard.Alert" />';
screenLabelsObj['Existing']='<egui:intnl text="monitor.dashboard.Existing" />';
screenLabelsObj['Select a Data Source']='<egui:intnl text="monitor.dashboard.Select a Data Source" />';
screenLabelsObj['Enter DSN Name']='<egui:intnl text="monitor.dashboard.Enter DSN Name" />';
screenLabelsObj['Integration Options']='<egui:intnl text="monitor.dashboard.Integration Options" />';
screenLabelsObj['REST']='<egui:intnl text="monitor.dashboard.REST" />';
screenLabelsObj['SQL']='<egui:intnl text="monitor.dashboard.SQL" />';
screenLabelsObj['EXCEL']='<egui:intnl text="monitor.dashboard.EXCEL" />';
screenLabelsObj['CSV']='<egui:intnl text="monitor.dashboard.CSV" />';
screenLabelsObj['Header Row']='<egui:intnl text="monitor.dashboard.Header Row" />';
screenLabelsObj['Data']='<egui:intnl text="monitor.dashboard.Data" />';
screenLabelsObj['Save']='<egui:intnl text="monitor.dashboard.Save" />';
screenLabelsObj['Next']='<egui:intnl text="monitor.dashboard.Next" />';
screenLabelsObj['Enter SQL Query']='<egui:intnl text="monitor.dashboard.Enter SQL Query" />';
screenLabelsObj['Enter REST URL']='<egui:intnl text="monitor.dashboard.Enter REST URL" />';
screenLabelsObj['Http Method']='<egui:intnl text="monitor.dashboard.Http Method" />';
screenLabelsObj['GET']='<egui:intnl text="monitor.dashboard.GET" />';
screenLabelsObj['POST']='<egui:intnl text="monitor.dashboard.POST" />';
screenLabelsObj['Port No']='<egui:intnl text="monitor.dashboard.Port No" />';
screenLabelsObj['User Authentication Required']='<egui:intnl text="monitor.dashboard.User Authentication Required" />';
screenLabelsObj['Yes']='<egui:intnl text="monitor.dashboard.Yes" />';
screenLabelsObj['No']='<egui:intnl text="monitor.dashboard.No" />';
screenLabelsObj['User name']='<egui:intnl text="monitor.dashboard.User name" />';
screenLabelsObj['Password']='<egui:intnl text="monitor.dashboard.Password" />';
screenLabelsObj['Header Required']='<egui:intnl text="monitor.dashboard.Header Required" />';
screenLabelsObj['Key']='<egui:intnl text="monitor.dashboard.Key" />';
screenLabelsObj['Value']='<egui:intnl text="monitor.dashboard.Value" />';
screenLabelsObj['AddHeader']='<egui:intnl text="monitor.dashboard.AddHeader" />';
screenLabelsObj['click here to Add']='<egui:intnl text="monitor.dashboard.click here to Add" />';
screenLabelsObj['Headers']='<egui:intnl text="monitor.dashboard.Headers" />';
screenLabelsObj['x-www-form-urlencoded']='<egui:intnl text="monitor.dashboard.x-www-form-urlencoded" />';
screenLabelsObj['raw']='<egui:intnl text="monitor.dashboard.raw" />';
screenLabelsObj['AddBody']='<egui:intnl text="monitor.dashboard.AddBody" />';
screenLabelsObj['Body (raw Json)']='<egui:intnl text="monitor.dashboard.Body (raw Json)" />';
screenLabelsObj['Save DSN']='<egui:intnl text="monitor.dashboard.Save DSN" />';
screenLabelsObj['click here to save']='<egui:intnl text="monitor.dashboard.click here to save" />';
screenLabelsObj['GetData']='<egui:intnl text="monitor.dashboard.GetData" />';
screenLabelsObj['click here to GetData']='<egui:intnl text="monitor.dashboard.GetData" />';
screenLabelsObj['DataPreviewLbl']='<egui:intnl text="monitor.dashboard.Data Preview" />';
screenLabelsObj['emptyDBHostNameAlert']='<egui:intnl text="monitor.dashboard.Please enter Database IP" />/<egui:intnl text="monitor.common.Host name" />';
screenLabelsObj['emptyPortAlert']='<egui:intnl text="monitor.dashboard.Please enter port" />';
screenLabelsObj['emptyDBUNameAlert']='<egui:intnl text="monitor.dashboard.Please enter database user name" />';
screenLabelsObj['emptyDBPassAlert']='<egui:intnl text="monitor.dashboard.Please enter database password" />';
screenLabelsObj['emptyDBNameAlert']='<egui:intnl text="monitor.dashboard.Please enter database name" />';
screenLabelsObj['emptyDBSIDAlert']='<egui:intnl text="monitor.dashboard.Please enter oracle database sid" />';
screenLabelsObj['DSNTitle']='<egui:intnl text="monitor.dashboard.Data Source Configuration" />';
screenLabelsObj['loadingMsg']='<egui:intnl text="monitor.dashboard.Loading" /> ..';
screenLabelsObj['selectQryAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter valid sql select query" />';
screenLabelsObj['emptyQryAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter sql query" />';
screenLabelsObj['emptyDSNAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter DSN name" />';
screenLabelsObj['specialCharsDSNAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter DSN name without special characters" />';
screenLabelsObj['emptyRESTURLAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter REST URL" />';
screenLabelsObj['invalidHTTPKeyAlertMsg']='<egui:intnl text="monitor.dashboard.is not a valid HTTP header field key" />';
screenLabelsObj['invalidJSONyAlertMsg']='<egui:intnl text="monitor.dashboard.Invalid JSON Body" />';
screenLabelsObj['gridlisttooltip']='<egui:intnl text="monitor.dashboard.Grid View" />';
screenLabelsObj['tilelisttooltip']='<egui:intnl text="monitor.dashboard.Tile View" />';
screenLabelsObj['nodashboardsavailable']='<egui:intnl text="monitor.dashboard.No Dashboards available" />!';
screenLabelsObj['noweatherData']='<egui:intnl text="monitor.dashboard.Unable to get Weather Data" />!';
screenLabelsObj['noNewsData']='<egui:intnl text="monitor.dashboard.Unable to get News Data" />!';
screenLabelsObj['mapAPINotLoaded']='<egui:intnl text="monitor.dashboard.Unable to load Google Maps" />!';
screenLabelsObj['Preparing_Layout']='<egui:intnl text="monitor.dashboard.Please wait while preparing Layout" />....';
screenLabelsObj['gridlisttooltip']='<egui:intnl text="monitor.dashboard.Grid View" />';
screenLabelsObj['usersDBtooltip']='<egui:intnl text="monitor.dashboard.All Dashboards (Other Users)" />';
screenLabelsObj['tilelisttooltip']='<egui:intnl text="monitor.dashboard.Tile View" />';
screenLabelsObj['nodashboardsavailable']='<egui:intnl text="monitor.dashboard.No Dashboards available" />!';
screenLabelsObj['saving_Layout']='<egui:intnl text="monitor.dashboard.Please wait while saving Layout" />....';
screenLabelsObj['autoAssociateCompsLbl']='<egui:intnl text="monitor.dashboard.Auto-associate all components" />';
screenLabelsObj['autoAssociateCompsErrMsg']='<egui:intnl text="monitor.dashboard.individual servers cannot be selected if Auto-associate components are already enabled" />';
screenLabelsObj['Health_Executive_PopupTitle']='<egui:intnl text="monitor.dashboard.Health summary" />';
screenLabelsObj['HealthForLbl']='<egui:intnl text="monitor.dashboard.Health For" />';
screenLabelsObj['criticalStateLbl']='<egui:intnl text="monitor.history.Critical" />';
screenLabelsObj['majorStateLbl']='<egui:intnl text="monitor.history.Major" />';
screenLabelsObj['minorStateLbl']='<egui:intnl text="monitor.history.Minor" />';

</script>
<link rel="stylesheet" href="/final/scripts/jodit-editor/jodit.min.css" media="all" />
<!-- fancy Scroll-->
<script>
if(strSkin!=null && strSkin=='Dark')
{
	document.write('<link rel="stylesheet" href="/final/resources/css/ext-eg.css"  media="all"/>');
	document.write('<link rel="stylesheet" href="/final/styles/eGDarkTheme.css" media="all" />');
	document.write('<link rel="stylesheet" href="/final/styles/eGDarkThemeIcons.css"  media="all" />');
	document.write('<link rel="stylesheet" href="/final/styles/iconLibrary.css" media="all" />');
}
else
{
	document.write('<link rel="stylesheet" href="/final/resources/css/ext-eg.css"  media="all"/>');
	document.write('<link rel="stylesheet" href="/final/styles/eGLightTheme.css" media="all" />');
	document.write('<link rel="stylesheet" href="/final/styles/eGLightThemeIcons.css"  media="all" />');
	document.write('<link rel="stylesheet" href="/final/styles/iconLibrary.css" media="all" />');
}
</script>
<style>

.highlight { background-color: 	#6d7d94 }
</style>

<style>
	.highcharts-tooltip {
		pointer-events: auto !important
	}
	.highcharts-tooltip > span {
		max-height:100px;
		overflow-y: auto;
	}
	ul.servicehealth_widget li{
		margin:0px 0px;
		line-height:12px;
		padding:2px;
		
	}
</style>

</head>

<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" scroll="no" id="inner_bg" class="content-frame">

<div id="myDashboardMask" class="x-mask-msg x-layer x-mask-msg-default" style="z-index: 19001;left:45%;top:35%;"><div class="x-mask-loading" style="position:relative">Loading...</div></div>
</body>

<script type="text/javascript" src="/final/jquery/jquery.js"></script>
<script type="text/javascript" src="/final/scripts/jodit-editor/jodit.min.js"></script>
<script type="text/javascript" src="/final/scripts/gauge.min.js"></script>
<!--<script src="/final/FusionCharts/scripts/FusionCharts.js"></script>-->

<script src="/final/scripts/eg_DateUtil.js"></script>

<script src="/final/scripts/utilities/er_validator.js"></script>
<script src="/final/monitor/eg_scripts/eg_date.js"></script>
<script language="JavaScript1.2" src="/final/Highcharts/js/highstock.js"></script>
<script type="text/javascript" src="/final/Highcharts/js/modules/exporting.js"></script>
<script src="/final/Highcharts/js/highcharts-more.js"></script>
<script src="/final/Highcharts/js/solid-gauge.src.js"></script>
<!--<script type="text/javascript" src="/final/scripts/jquery-ui.js"></script>-->
<script src="/final/monitor/eg_scripts/EgHighChart.js"></script>
<script src="/final/monitor/eg_scripts/ajaxutils.js" type="text/javascript"></script>
<script type="text/javascript" src="/final/scripts/d3.min.js"></script>
<script type="text/javascript" src="/final/scripts/regression.js"></script>

<%
	if(isInternetAvailable)
	{
%>
	<script src='<%=markerURL%>'></script>

<%
	}
%>

<script src="/final/monitor/eg_scripts/GeoJSON.js"></script>

<link rel="stylesheet" href="/final/scripts/gridstack/dist/gridstack-extra.min.css"/>
<link rel="stylesheet" href="/final/scripts/gridstack/dist/gridstack.css"/>
<script src="/final/scripts/gridstack/dist/jquery-ui.js"></script>
<script src="/final/scripts/gridstack/dist/lodash.min.js"></script>
<script src="/final/scripts/gridstack/dist/gridstack.js"></script>
<script src="/final/scripts/gridstack/dist/gridstack.jQueryUI.js"></script>
<link rel="stylesheet" href="/final/scripts/gridstack/dist/gridstack.css"/>
<script>
if(strSkin!=null && strSkin=='Dark')
{
	document.write('<link rel="stylesheet" href="/final/styles/egMyDashboard.css" media="all" />');
}
else
{
	document.write('<link rel="stylesheet" href="/final/styles/egMyDashboardLightTheme.css" media="all" />');
}
if(isHKT_ThemeEnabled)
{
	document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"/final/styles/HKTBlueTheme.css\" />');
}
</script>
<style>
.grid-stack >.grid-stack-item >.grid-stack-item-content,
.grid-stack .grid-stack-item .placeholder-content {
    left: 5px;

    right: 5px;
 
}
</style>
<script type="text/javascript" src="/final/jquery/jquery.scrollTo.js"></script> <!--Added -->
<egui:loadApp baseDir="/final/monitor/eg_scripts" appName="myDashboard"/>
		<!-- ** EXTJS ** -->

<script>
var mgrDateFormat = getExtjsDateFormat(iniDateFormat);
var mgrDisplayDateFormat='<%=mgrDateFormatForTime%>';
Ext.onReady(function(){
Ext.Msg.bodyPadding="10 0";
Ext.Msg.cls="adminAlert";

iAjax = Ext.Ajax;
iAjax.on('beforerequest', function(connection,options){
	try
	{
		if(typeof(options.params) == 'object')
		{
			for (var a in options.params)
			{
				var p_v = options.params[a];
				if(a == 'sort')
				{
					var re_form = Ext.decode(p_v);
					try
					{
						var sortParams = re_form[0];
						for(var b in sortParams)
							options.params[b]=sortParams[b];
						delete options.params[a];
					}
					catch (e)
					{
					}
				}
			}
		}
	}
	catch (e)
	{
	}
});
Ext.Ajax.extraParams = {"com.eg.CSRF_NONCE" : csrfToken, "componentDashboard" : componentDashboard, "componentsForDashboard" : componentsForDashboard, "consolidatedDashboard" : consolidatedDashboard, 'compTypeForConsolidatedDashboard' : compTypeForConsolidatedDashboard};
Ext.data.Connection.prototype.extraParams = {"com.eg.CSRF_NONCE" : csrfToken};
Ext.data.ScriptTagProxy.prototype.extraParams = {"com.eg.CSRF_NONCE" : csrfToken};

iAjax.on('requestexception', function (conn, response, options) {
			var errorStr = response.responseText;
			if(typeof callWindow == 'undefined' || typeof callWindow == null){
					location.reload();
			}
			if (errorStr != undefined && errorStr != 'undefined' && errorStr.indexOf("customerror") != -1)
			{
				if (errorStr.indexOf("user-session-invalid") != -1)
				{
					callWindow(1);
				}
				else if (errorStr.indexOf("user-deleted") != -1)
				{
					callWindow(2);
				}
				else if (errorStr.indexOf("user-timedout") != -1)
				{
					callWindow(3);
				}
			}
		});

function isContainsOnlyDigits( str ) {
 return /^[0-9]+$/.test(str);
}

	Ext.data.Types.FLOATORSTRING = {
			convert : function(v) {

				if(!isContainsOnlyDigits(v))
				{
					return v;
				}
				if(v.lastIndexOf(".") > v.indexOf(".")) // this is to fix ip addr values sorting
				{
					return v;
				}
				var n = parseFloat(String(v).replace(Ext.data.Types.stripRe, ''), 10);
				return isNaN(n) ? v : n;
			},
			sortType : function(cellVal)
			{
				if(cellVal=="-" || cellVal=="NA")
				{
					return -1;
				}
				else
				{
					var parsedStrng = (String(cellVal).replace(Ext.data.Types.stripRe, ''));
					var n1 = parseFloat(parsedStrng, 10);
					if( isNaN(n1))
					{
						var cVal = parsedStrng;
						if(cVal!=null && cVal!='')
						{
							return cVal;
						}
						else
						{
							return 0;
						}
					}
					else
					{
						return n1;
					}
				}

			}
			
	};

	
myDashboardMask = new Ext.LoadMask(Ext.getBody(), {
							msg : "Loading ..."
						}); });
function goToHealthPopup(blockId,compName,compState,componentType)
{
	if(myDashApp!=null)
	{
		if(!Ext.isEmpty(publicJson) && publicJson.hasOwnProperty('myDashboardConfigDetails'))
		{
			var profileName=publicJson['myDashboardConfigDetails']['profileName'];
			myDashApp.getController("Main").goToHealthPopup(blockId,compName,compState,componentType);
		}
	}
}
function loadcomponentMeasureTabset(Url)
{
	Url=encodeURI(Url);
	this.loadPopup(Url);
}

function loadVmLinkPopup(Url)
{
	Url=encodeURI(Url);
	this.loadPopup(Url);
}
var newPopup=null;
function loadPopup(qUrl)
{	 
	if(qUrl != null && qUrl.indexOf("ManualUrl_")>-1)
	{
		var urlValue=qUrl.substring(qUrl.indexOf("ManualUrl_")+10);
		wayToManualURL(urlValue);
		return;
	}
	if(newPopup==null)
	{
		newPopup=window.open(qUrl,"My Dashboard","toolbar=no,menubar=no,location=no,status=no,width=998,height=650,left=10,top=10,screenx=0,screeny=0,resizable=yes,scrollbars=1,scrollbars=yes");
	}
	else
	{
		if(newPopup!=null)
		{
			newPopup.close();
			newPopup=null;
		}
		newPopup=window.open(qUrl,"My Dashboard","toolbar=no,menubar=no,location=no,status=no,width=998,height=650,left=10,top=10,screenx=0,screeny=0,resizable=yes,scrollbars=1,scrollbars=yes");
	}
	newPopup.focus();
}
var helpwin=null;
function HelpWin()
{
	if (Ext.getBody().getViewSize().width < 1100)
	{
		var cwidth1=Ext.getBody().getViewSize().width-64; 
		var leftPosition = 25;
		var left = (Ext.getBody().getViewSize().width/2)-(cwidth1/2);						    
	}
	else
	{
		var cwidth1=Ext.getBody().getViewSize().width-154;
		var leftPosition = 78;
		var left = (Ext.getBody().getViewSize().width/2)-(cwidth1/2);
	}
	var cwidth2=(cwidth1/2);						
	var cheight=Ext.getBody().getViewSize().height-240;
	var top = (Ext.getBody().getViewSize().height/2)-(cheight/2);
	HelpWinOth("/final/eghelp/EgHelpApp.jsp?forwardPage=EgMHelp.jsp", cwidth1, cheight, left, top, left, top);
}


var isIE = false;
var isFireFox = false;
var isChrome = false;
/*code to support endsWith() and startsWith() methods in IE  starts*/
if (!String.prototype.endsWith) {
String.prototype.endsWith = function(searchString, position) {
var subjectString = this.toString();
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
        position = subjectString.length;
      }
      position -= searchString.length;
      var lastIndex = subjectString.indexOf(searchString, position);
      return lastIndex !== -1 && lastIndex === position;
  };
}
if (!String.prototype.startsWith) {
    String.prototype.startsWith = function(searchString, position){
      position = position || 0;
      return this.substr(position, searchString.length) === searchString;
  };
}
/*code to support endsWith() and startsWith() methods in IE ends*/
function checkBrowserType()
{
	Ext.onReady(function(){
		isIE =  Ext.isIE ||  Ext.isIE6 ||  Ext.isIE7 || Ext.isIE8;
		isFireFox =  Ext.isGecko ||  Ext.isGecko2 ||  Ext.isGecko3;
		isChrome =  Ext.isChrome;
	});
	
}
var metaRefreshUrl = '';
var httpRequest = false;
var refreshURL ="";
var pageURL = "";


function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function dialOnClick(dchartId)
{
	Ext.onReady(function(){
			var dchartObj = 	Ext.getCmp(dchartId);
			if(!Ext.isEmpty(dchartObj))
			{
				var durl = dchartObj.layerModelUrl;
				if(durl!=null && (durl!="" && durl!="undefined" && durl!="-"))
				{
					wayToLayerModel(durl);
				}
			}
	});
}

function loadVmAlarmDetailsPopup(){
	
	var VmAlarmDetailsWindow=new Ext.Window({
		cls:'myDashboardwindow',
		header:{
				height:32,
				padding:'0 10',
				margin:0,
				style:{'border-bottom':'#2b2b2b 1px solid !important'}
				},
		closeAction : "destroy",
		title: 'Distribution',
		width : 350,
		height : 200,
		//html : htmlstr,
		autoShow: false,
		autoScroll:true,
		resizable:false,
		draggable:true,
		ghost:false,
		frame:true,
		padding:0,
		border:true,
		layout: {
				type: 'vbox',
				align: 'stretch'
				},
		})
}
function loadDistrPopup(state){
	if(state!=null && state =="Available")
	{
		Ext.getCmp('network_fieldset_offline').hide();
		Ext.getCmp('network_fieldset_maintenance').hide();
		Ext.getCmp('network_fieldset_online').show();
		$('#OfflineText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#maintnceText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#OnlineText').removeClass('networkHealthStateHighlightTrans').addClass('networkHealthStateHighlight');
	}
	else if(state!=null && state =="NonAvailable")
	{
		Ext.getCmp('network_fieldset_online').hide();
		Ext.getCmp('network_fieldset_maintenance').hide();
		Ext.getCmp('network_fieldset_offline').show();
		$('#OnlineText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#maintnceText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#OfflineText').removeClass('networkHealthStateHighlightTrans').addClass('networkHealthStateHighlight');
	}
	else if(state!=null && state =="Maintenance")
	{
		Ext.getCmp('network_fieldset_online').hide();
		Ext.getCmp('network_fieldset_offline').hide();
		Ext.getCmp('network_fieldset_maintenance').show();
		$('#OnlineText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#OfflineText').removeClass('networkHealthStateHighlight').addClass('networkHealthStateHighlightTrans');
		$('#maintnceText').removeClass('networkHealthStateHighlightTrans').addClass('networkHealthStateHighlight');
	}

}
/*function loadDistrPopupWindow(serversarr,e1,e2){
	var htmlstr ="" ;
	var stateclass ="";
	for(var i = 0; i<serversarr.length;i++)
	{
		if(serversarr[i]['state']=='Available')
		{
			stateclass = "state_GOOD";
		}
		else if(serversarr[i]['state']=='NonAvailable')
		{
			stateclass = "state_HIGH";
		}

		htmlstr = htmlstr + " " +'<div style="float:left;width:170px;padding:4px;"><a href=\'javascript:wayToLayerModel("' +serversarr[i]['drilldownurl']  + '")\'><span style="float:left;margin-right:4px;width:20px" class='+stateclass+'></span><span style ="width:150px;-o-text-overflow: ellipsis;text-overflow: ellipsis;white-space: nowrap;" >' +serversarr[i]['hostserver']+'</span></a></div>';
	}
	var pieChartNetworkHealthWindow=new Ext.Window({
		cls:'myDashboardwindow',
		header:{
				height:32,
				padding:'0 10',
				margin:0,
				style:{'border-bottom':'#2b2b2b 1px solid !important'}
				},
		closeAction : "destroy",
		title: 'Distribution',
		width : 350,
		height : 200,
		html : htmlstr,
		autoShow: false,
		autoScroll:true,
		resizable:false,
		draggable:true,
		ghost:false,
		frame:true,
		padding:0,
		border:true,
		layout: {
				type: 'vbox',
				align: 'stretch'
				},
		listeners:{
			afterlayout:function(){
			Ext.getCmp('networkhealth').setDisabled(true);
			this.mon(Ext.getBody(), 'click', function(el, e){
			this.close(this.closeAction);
			}, this, { delegate: '.balckouterpanel'});
			$('.x-draw-text').click(function(event){
						event.stopPropagation();
					});
				},
			close:function(){
				Ext.getCmp('networkhealth').setDisabled(false);
			}
		}

	}).showAt([e1,e2]);
}*/
/*
  This function opens new window to show rss feed link data
*/
function newsWindow(openlnk){
	 var a=new Ext.Window({
    	modal : true,
	ghost : false,
	bodyCls : "background_whitecls",
	closeAction : "destroy",
	title: 'News',
	width : 1100,
	height : 550,
	id:'viewwindow',
	autoScroll : false,
	layout : {
		type : "vbox",
		align : "stretch"
	},
	defaults : {
		margin : "0 0 0 0"
	},
	layout: 'fit',
    items: [{
        xtype: 'box',
        autoEl: {
            tag: 'iframe',
            src: openlnk,
        },
    }]
   }).show();
}
function filterEncode(text)
{
	//['%;()=]
	var filterEncodeChar = ['[',']','(',')','=','%','\'','&',';','"'];
	var filterDecodeText = ['|lsbr|','|rsbr|','|lbr|','|rbr|','|eq|','|per|','|squot|','|ampsnd|','|scol|','|dqt|'];
	try
	{
		if(text != null && text != undefined && !Ext.isEmpty(text))
		{
			for(var a in filterEncodeChar)
			{
				var encode_char = filterEncodeChar[a];
				var decode_char = filterDecodeText[a];
				do
				{
					text=text.replace(encode_char,decode_char);
				}
				while (text.indexOf(encode_char)>-1);
			}
		}
	}
	catch (e)
	{
	}
	return text;
}
function goToCompListPage(url)
{
	try
	{
		var backBtnPrms="&profileName="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		if(isMonitorHome)
		{
			backBtnPrms+="&setMonitorHome=true";
		}
		if(disableMydashboardPopout)
		{
			backBtnPrms+="&isDisablePopupOption=true";
		}
		if(isComponentDashboard)
		{
			backBtnPrms+="&componentDashboard=true&componentsForDashboard="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		}
		if(isOtherUsersDBDrilldown)
		{
			backBtnPrms+="&otherUsersDB=true";
		}
		backBtnPrms=filterEncode(backBtnPrms);
		url=url+"&backBtnUrl="+encodeURIComponent(backBtnPrms);
		goToDrilldownView(url);
	}
	catch (error)
	{
		window.open(url); 
	}
}
function goToLayerModel(url)
{
	if(url!=null && url=='-')
		return;

	if(url != null && url.indexOf("ManualUrl_")>-1)
	{
		var urlValue=url.substring(url.indexOf("ManualUrl_")+10);
		wayToManualURL(urlValue);
		return;
	}

	if(url!=null && url.indexOf("?")>0)
	{
		url=encodeURI(url);
		var backBtnPrms="&profileName="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		if(isMonitorHome)
		{
			backBtnPrms+="&setMonitorHome=true";
		}
		if(disableMydashboardPopout)
		{
			backBtnPrms+="&isDisablePopupOption=true";
		}
		if(isComponentDashboard)
		{
			backBtnPrms+="&componentDashboard=true&componentsForDashboard="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		}
		if(isOtherUsersDBDrilldown)
		{
			backBtnPrms+="&otherUsersDB=true";
		}
		backBtnPrms=filterEncode(backBtnPrms);
		url=url+"&backBtnUrl="+encodeURIComponent(backBtnPrms);
	}
	var xmlhttp=GetXmlHttpObject();

	if(xmlhttp==null)
		return;
	
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status == 200)
			{
				goToDrilldownView(url);
			}
		}
	}
	var sessionDelURL = '/final/monitor/EgAlarmSessionDel.jsp';
	xmlhttp.open('POST',sessionDelURL, true);
	xmlhttp.setRequestHeader("Content-Type","text/html;charset=UTF-8");
	if(!disableMydashboardPopout && !isMonitorHome)
	{
		if(window.parent.opener!=null)
			window.parent.opener.focus();
	}
	xmlhttp.send(null);
}

function wayToManualURL(url)
{
	if(url!=null && url.indexOf("?")>0 && url.indexOf("publishedDashboard")>0)
	{
		if(!isAnonymousUserAccess)
		{		
			var pageUrl=url.substring(0,url.indexOf("?"));
			var urlPrms=url.substring(url.indexOf("?")+1);
			if(urlPrms!=null && urlPrms.indexOf("\\")>0)
			{
				urlPrms=urlPrms.replace("\\","\\\\");
				url=pageUrl+"?"+urlPrms;
			}
			var backBtnPrms="comesFrom=myDashboard&action=showMyDashboard&profileName="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
			if(isMonitorHome)
			{
				backBtnPrms+="&setMonitorHome=true";
			}
			if(disableMydashboardPopout)
			{
				backBtnPrms+="&isDisablePopupOption=true";
			}
			if(isComponentDashboard)
			{
				backBtnPrms+="&componentDashboard=true&componentsForDashboard="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
			}
			if(isOtherUsersDBDrilldown)
			{
				backBtnPrms+="&otherUsersDB=true";
			}
			backBtnPrms=filterEncode(backBtnPrms);
			url=url+"&addBackBtn=yes";
			url=url+"&backBtnUrl="+encodeURIComponent(backBtnPrms);
		}
	}
	window.location.href=url;
}

function wayToLayerModel(url)
{
	if(url != null && url.indexOf("ManualUrl_")>-1)
	{
		var urlValue=url.substring(url.indexOf("ManualUrl_")+10);
		wayToManualURL(urlValue);
		return;
	}
	
	if(url!=null && url.indexOf("?")>0)
	{
		var pageUrl=url.substring(0,url.indexOf("?"));
		var urlPrms=url.substring(url.indexOf("?")+1);
		if(urlPrms!=null && urlPrms.indexOf("\\")>0)
		{
			urlPrms=urlPrms.replace("\\","\\\\");
			url=pageUrl+"?"+urlPrms;
		}
		var backBtnPrms="&profileName="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		if(isMonitorHome)
		{
			backBtnPrms+="&setMonitorHome=true";
		}
		if(disableMydashboardPopout)
		{
			backBtnPrms+="&isDisablePopupOption=true";
		}
		if(isComponentDashboard)
		{
			backBtnPrms+="&componentDashboard=true&componentsForDashboard="+encodeURIComponent(publicJson['myDashboardConfigDetails']['profileName']);
		}
		if(isOtherUsersDBDrilldown)
		{
			backBtnPrms+="&otherUsersDB=true";
		}
		backBtnPrms=filterEncode(backBtnPrms);
		url=url+"&backBtnUrl="+encodeURIComponent(backBtnPrms);
	}
	checkBrowserType();
	var xmlhttp=GetXmlHttpObject();

	if(xmlhttp==null)
		return;
	
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status == 200)
			{
				goToDrilldownView(url);
			}
		}
	}
	var sessionDelURL = '/final/monitor/EgAlarmSessionDel.jsp';
	xmlhttp.open('POST',sessionDelURL, true);
	xmlhttp.setRequestHeader("Content-Type","text/html;charset=UTF-8");
	if(!disableMydashboardPopout && !isMonitorHome)
	{
		if(window.parent.opener!=null)
			window.parent.opener.focus();
	}
	xmlhttp.send(null);
}
function goToDrilldownView(url)
{
	goToDrilldownView(url,false);
}
function goToDrilldownView(url,fromBackNavigation)
{
	try
	{
		if(url!=null && url.indexOf("/MyDashboard.jsp")>-1)
		{
			var isFromConsolidatedDashboard=isConsolidatedDashboard;
			if(isConsolidatedDashboard && !Ext.isEmpty(compTypeForConsolidatedDashboard))
			{
				templateNameForConsolidatedDashboard=filterEncode(templateNameForConsolidatedDashboard);
				consolidatedDashURL="/final/monitor/MyDashboard.jsp?comesFrom=myDashboard&action=showMyDashboard&templateOnChange=true&fromHomepage=true&consolidatedDashboard=true&profileName="+templateNameForConsolidatedDashboard+"&templateName="+templateNameForConsolidatedDashboard+"&compTypeForConsolidatedDashboard="+encodeURIComponent(compTypeForConsolidatedDashboard)+"&backToConsolidatedView=true";
				fromBackNavigation=true;
			}
			consolidatedDashboard='';
			componentDashboard='';
			componentsForDashboard='';
			compTypeForConsolidatedDashboard='';
			isConsolidatedDashboard=false;
			isComponentDashboard=false;

			if(Ext.isEmpty(fromBackNavigation) || fromBackNavigation==false || fromBackNavigation=="undefined")
			{
				history.pushState({page:url},'',null);
			}

			var urlPrms='';
			if(url!=null && url.indexOf("?")>-1)
			{
				urlPrms=url.substring(url.indexOf("?")+1,url.length);
			}
			var vars = urlPrms.split("&");
			for (var i=0;i<vars.length;i++) {
				var pair = vars[i].split("=");
				if(pair!=null && pair.length==2)
				{
					if(pair[0]=='consolidatedDashboard')
					{
						consolidatedDashboard=decodeURIComponent(pair[1]);
						if(consolidatedDashboard!=null && consolidatedDashboard.toLowerCase()=="true")
						{
							isConsolidatedDashboard=true;
						}
					}
					else if(pair[0]=='componentDashboard')
					{
						componentDashboard=decodeURIComponent(pair[1]);
						if (componentDashboard != null && componentDashboard.toLowerCase() == "true") {
							isComponentDashboard = true;
						}
					}
					else if(pair[0]=='componentsForDashboard')
					{
						componentsForDashboard=decodeURIComponent(pair[1]);
					}
					else if(pair[0]=='compType')
					{
						compTypeForConsolidatedDashboard=decodeURIComponent(pair[1]);
					}
				}
			}
			if(!Ext.isEmpty(urlPrms))
			{
				var templateListObj=Ext.getCmp('templatesList');
				var templateName='';
				if(!Ext.isEmpty(templateListObj))
				{
					templateName=templateListObj.getValue();
				}
				if(isFromConsolidatedDashboard)
				{
					
					if(urlPrms.indexOf("&templateName=")>-1)
					{
						var urlPart1=urlPrms.substring(0,urlPrms.indexOf("&templateName="));
						var urlPart2=urlPrms.substring(urlPrms.indexOf("&templateName=")+14,urlPrms.length);
						urlPrms=urlPart1+urlPart2;
					}
					
					if(!Ext.isEmpty(templateName))
					{
						urlPrms=urlPrms+"&templateName="+encodeURIComponent(templateName);
					}
				}
			}
			Ext.Ajax.abortAll();
			Ext.Ajax.extraParams = {"com.eg.CSRF_NONCE" : csrfToken, "componentDashboard" : componentDashboard, "componentsForDashboard" : componentsForDashboard, "consolidatedDashboard" : consolidatedDashboard, 'compTypeForConsolidatedDashboard' : compTypeForConsolidatedDashboard};
			myDashApp.getController("Main").clearRefreshTasks();
			Ext.Ajax.request({
			url : '/final/servlet/com.eg.EgMonitorRequestDispatcher',
			method : 'POST',
			params: urlPrms,
			scope:this,
			success: function(response)
			{					
				var jsonText = response.responseText;
				if(jsonText!=null && jsonText!='')
				{
					/*var mainPageView = myDashApp.getController("Main").getMain();
					mainPageView.clearManagedListeners();
					mainPageView.remove('dashboardLayout',true);
					mainPageView.remove('dashboardLayoutObj',true);
					mainPageView.remove('backBtnObj',true);
					Ext.EventManager.removeAll('myDashMainPanel');
					Ext.EventManager.removeAll('myDashListPageView');
					Ext.EventManager.removeAll('backBtnObj');
					for (var keys in Ext.getCmp('myDashMainPanel'))
					{
						if(!Ext.getCmp('myDashMainPanel')[keys]){
							mainPageView.remove(keys,true);
							delete Ext.getCmp('myDashMainPanel')[keys];
						}
					}*/
					
					var viewPortObj=Ext.getCmp('myDashboardViewPort');
					viewPortObj.remove('myDashMainPanel',true);
					Ext.EventManager.removeAll('myDashMainPanel');
					for (var keys in Ext.getCmp('myDashboardViewPort'))
					{
						if(!Ext.getCmp('myDashboardViewPort')[keys]){
							viewPortObj.remove(keys,true);
							delete Ext.getCmp('myDashboardViewPort')[keys];
						}
					}
					viewPortObj.removeAll();
					var mainPnlObj = Ext.create('MyDashBoard.view.Main');
					publicJson = Ext.decode(jsonText);
					viewPortObj.suspendLayouts();
					viewPortObj.add(mainPnlObj);
					viewPortObj.resumeLayouts();
					viewPortObj.doComponentLayout();
					viewPortObj=null;
					delete viewPortObj,mainPnlObj;
				}
				jsonText=null;
				delete jsonText;
			}
			});
		}
		else
		{
			if(disableMydashboardPopout || isMonitorHome)
			{
				document.location=url;
			}
			else
			{
				var iframeDoc = window.parent.opener.document;
				var iFrameId;
				if(isIE)
				{
					iFrameId = iframeDoc.all['main'];
				}
				else 
				{
					iFrameId = iframeDoc.getElementById('main');
				}
				iFrameId.src=url;
			}
		}
	}
	catch (error)
	{
		window.open(url); 
	}
}

function openNewView(url)
{
	Ext.onReady(function(){
	var win=null;
	win = window.open(url,"","toolbar=no,menubar=no,location=no,status=no,width="+Ext.getBody().getViewSize().width+",height="+Ext.getBody().getViewSize().height+",left=10,top=10,screenx=0,screeny=0,resizable=yes,scrollbars=1,scrollbars=yes");
	win.focus();

	});
}

var maxTableId = 0;
var maxTextWidgetId = 0;
var maxCombinedChartId = 0;
var maxHeatMapChartId = 0;
var maxTrendGraphId = 0;
var maxScatterPlotId = 0;
var maxSummaryHealthId = 0;
var maxBarChartId = 0;
var maxTimelineChartId = 0;
var maxTopologyWidget = 0;
var maxDDTableId = 0;
var	maxDialChartId = 0;
var	maxDigitalChartId = 0;
var	maxPieChartId = 0;
var	maxActivityChartId = 0;
var	maxAreaChartId = 0;
var	liveMeasuresBoxId = 0;
var	groupMeasuresBoxId = 0;
var	maxCombinationChartId = 0;
var maxWeatherId=0;
var maxVmAlarmsWidget=0;
var fluidDashboard=false;
var isViewTypeChanged=false;
var dashboardRefFreq= null;
//var showChartCurrentValue="";
var showCharLegend="";
var refreshIntervalTaskObj=new Object();
var isNewsApiLoaded=false;
var maxTopNGuageChartId=0;
var maxTopNDigitalChartId=0;
var maxMapWidgetId=0;
var healthId = 0;
var maxTopNChartId=0;
var maxKPIWidgetId=0;
var maxServiceHealthWidgetId=0;
/*window.onbeforeunload = confirmExit;
function confirmExit(){
   // alert("confirm exit is being called");
    return false;
}*/

var dispMgrDate = '<%=dispDate%>';

	var MONTH_NAMES_JS=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var MONTH_INT_JS=new Array('0','1','2','3','4','5','6','7','8','9','10','11');
	function getMonthValue(mon_text)
	{
		var index_mon=-1;
		try
		{
			index_mon = MONTH_NAMES_JS.indexOf(mon_text);
		}
		catch (e)
		{
			if(index_mon==null || index_mon>0)
			{
				index_mon = MONTH_INT_JS.indexOf(mon_text); 
			}
		}

		try
		{
			if(index_mon==null || index_mon>0)
			{
				index_mon = MONTH_INT_JS.indexOf(mon_text); 
			}
		}
		catch(ee)
		{}
		
		return index_mon;
	}

/*	 var s_mon = <%//=cal.get(cal.MONTH)%>;
    var s_day = <%//=cal.get(cal.DAY_OF_MONTH)%>;
    var s_hr = <%//=cal.get(cal.HOUR_OF_DAY)%>;
    var s_min = <%//=cal.get(cal.MINUTE)%>;
    var s_sec = <%//=cal.get(cal.SECOND)%>;*/
    var s_yr = <%=timeZoneConverter.getYear(true)%>;
    var s_mon = getMonthValue('<%=timeZoneConverter.getMonth()%>');
    var s_day = <%=timeZoneConverter.getDay()%>;
    var s_hr = <%=timeZoneConverter.getHour()%>;
    var s_min = <%=timeZoneConverter.getMinute()%>;
    var s_sec = <%=timeZoneConverter.getSecond()%>;
    var eday = new Date(s_yr,s_mon,s_day,s_hr,s_min,s_sec);


	var user_id = '<%=usr.getLoginID()%>';

	function egClock1()
	{
		
		var timediff = eday.getUTCMilliseconds();
		
		
		if(Ext.isChrome || Ext.isFireFox)
		{
			timediff = timediff + 1012;
		}
		else
		{
			timediff = timediff + 1003;
		}
		eday.setUTCMilliseconds(timediff);
		
		hourNow = eday.getHours();
		mnNow = eday.getMinutes();
		scNow = eday.getSeconds();
		miNow = eday.getTime();
		monNow = (eday.getMonth()+1);
		dayNow = eday.getDate();
		if(monNow <= 9)
		{
			mon = "0" + monNow;
		}
		else
		{
			mon = monNow;
		}
		if(dayNow <= 9)
		{
			day = "0" + dayNow;
		}
		else
		{
			day = dayNow;
		}
		if(hourNow <= 9)
		{
			hour = "0" + hourNow;
		}
		else
		{
			hour = hourNow;
		}
		if(mnNow <= 9)
		{
			min = "0" + mnNow;
		}
		else
		{
			min = mnNow;
		}
		if (scNow <= 9)
		{
			secs = "0" + scNow;
		}
		else
		{
			secs = scNow;
		}
		
		var display_date_time  = dispMgrDate+" "+hour + ":" + min + ":" + secs + ' <%=tzName%>';
		return display_date_time;
	}

	function browResize()
	{
		if(myDashApp!=null)
		{
			var defaultAction = publicJson['action'];
			if (defaultAction != null && defaultAction == 'showMyDashboard' || defaultAction == "loadMyDashboardConfig") {
				if(!Ext.isEmpty(publicJson) && publicJson.hasOwnProperty('myDashboardConfigDetails'))
				{
					var profileName=publicJson['myDashboardConfigDetails']['profileName'];
					if(!Ext.isEmpty(profileName))
					{
						profileName=filterEncode(profileName);
					}
					var urlParams="comesFrom=myDashboard&action="+defaultAction+"&profileName=" + encodeURIComponent(profileName);
					if(isAnonymousUserAccess)
					{
						urlParams=urlParams+"&anonymousUser=true";
					}
					Ext.Ajax.abortAll();
					myDashApp.getController("Main").clearRefreshTasks();
					Ext.Ajax.request({
					url : '/final/servlet/com.eg.EgMonitorRequestDispatcher',
					method : 'POST',
					params: urlParams,
					scope:this,
					success: function(response)
					{					
						var jsonText = response.responseText;
						if(jsonText!=null && jsonText!='')
						{
							var gridsterPnlObj=Ext.getCmp('gridsterpanel');
							if(!Ext.isEmpty(gridsterPnlObj))
							{
								//gridsterPnlObj.getEl().dom.innerHTML =""; 
								$('#gridsterpanel').empty();
							}
							if (!Ext.isEmpty(gridsterPnlObj))
							{
								Ext.destroy(gridsterPnlObj);
							}
							var gridsterLayoutObj=Ext.getCmp('gridsterLayout');
							if (!Ext.isEmpty(gridsterLayoutObj))
							{
								Ext.destroy(gridsterLayoutObj);
							}
							gridsterPnlObj=null;
							delete gridsterPnlObj;
							gridsterLayoutObj=null;
							delete gridsterLayoutObj;
							var viewPortObj=Ext.getCmp('myDashboardViewPort');
							viewPortObj.removeAll();
							main = Ext.create('MyDashBoard.view.Main');
							publicJson = Ext.decode(jsonText);
							viewPortObj.suspendLayouts();
							viewPortObj.add(main);
							viewPortObj.resumeLayouts();
							viewPortObj.doComponentLayout();
							viewPortObj=null;
							delete viewPortObj,main;
						}
						jsonText=null;
						delete jsonText;
					}
					});
			}
		}
		}
	}
	function showHideSeries(configPanl,srsCntr,spanId)
	{
		var lineChartObj= $('#ChartPnl_'+configPanl);
		var blockType = '';
		if (configPanl != null && configPanl.indexOf("_") > 0) {
			blockType = configPanl.substr(0, configPanl.indexOf("_"));
		}
		if(blockType!=null && (blockType=='combinationChart' || blockType=='areaChart'))
		{
			if(!Ext.isEmpty(lineChartObj))
			{
				var seriesObj = lineChartObj.highcharts().series[srsCntr];
				if (seriesObj.visible) {
					Ext.fly(spanId).setOpacity(.45, {duration: .5});
					seriesObj.hide();
				} else {
					Ext.fly(spanId).clearOpacity();
					seriesObj.show();
				}
				seriesObj=null;
				delete seriesObj;
			}
		}
		else
		{
			var unitMappingObj=null;
			var seriesUnitMappingObj=null;
			var configPnlObj=Ext.getCmp(configPanl);
			if(!Ext.isEmpty(configPnlObj))
			{
				seriesUnitMappingObj=configPnlObj.seriesUnitMappingObj;
				unitMappingObj=configPnlObj.unitMappingObj;
			}
			if(!Ext.isEmpty(lineChartObj))
			{
			//	var seriesTotalCnt=lineChartObj.highcharts().series.length;
				var unitForSeries=seriesUnitMappingObj[srsCntr];
				var allSeriesObj=lineChartObj.highcharts().series;
				var seriesObj = lineChartObj.highcharts().series[srsCntr];
				if (seriesObj.visible)
				{
					if(unitMappingObj!=null && unitMappingObj.hasOwnProperty(unitForSeries))
					{
						Ext.fly(spanId).setOpacity(.45, {duration: .5});
						var seriesUnitMap=unitMappingObj[unitForSeries];
						if(seriesUnitMap!=null && seriesUnitMap.length==1)
						{
							seriesObj.hide();
							seriesObj.yAxis.axisTitle.hide();
						}
						else
						{
							seriesUnitMap[srsCntr]='hidden';
							seriesObj.hide();
							var isShowYAxis=false;
							for(var ser in seriesUnitMap)
							{
								if(seriesUnitMap[ser]=='visible')
								{
									isShowYAxis=true;
									break;
								}
							}
							if(!isShowYAxis)
							{
								for(var ser in seriesUnitMap)
								{
									allSeriesObj[ser].yAxis.axisTitle.hide();
									break;
								}
							}
							else
							{
								seriesObj.yAxis.axisTitle.show();
								seriesObj.yAxis.axisLine.show();
							}
						}
					}
				}
				else
				{
					Ext.fly(spanId).clearOpacity();
					if(unitMappingObj!=null && unitMappingObj.hasOwnProperty(unitForSeries))
					{
						var seriesUnitMap=unitMappingObj[unitForSeries];
						if(seriesUnitMap!=null && seriesUnitMap.length==1)
						{
							allSeriesObj[srsCntr].show();
							allSeriesObj[srsCntr].yAxis.axisTitle.show();
						}
						else
						{
							seriesUnitMap[srsCntr]='visible';
							var isShowYAxis=false;
							for(var ser in seriesUnitMap)
							{
								if(seriesUnitMap[ser]=='visible')
								{
									isShowYAxis=true;
									break;
								}
							}
							allSeriesObj[srsCntr].yAxis.axisTitle.show();
							allSeriesObj[srsCntr].show();
						}
					}
					else
					{
						allSeriesObj[srsCntr].show();
						allSeriesObj[srsCntr].yAxis.axisTitle.show();
					}
				}
				seriesObj=null;
				delete seriesObj;
			}
			
		}
		lineChartObj=null;
		delete lineChartObj;
	}	
	function goToAlarmHistory(url,isCustomDashboard)
	{
		var qstring=new Array();
		var urlPage="";
		var qstr="";
		var newUrl="";
		if(url!=null && url.indexOf("?")>0)
		{
			urlPage=url.substr(0,url.indexOf("?"));
			qstr=url.substr(url.indexOf("?")+1);
		}
		qstring=qstr.split("&");
		
		for(var i=0;i<qstring.length;i++)
		{
			var qkey=qstring[i].substr(0,qstring[i].indexOf("="));
			var qvalue=qstring[i].substr(qstring[i].indexOf("=")+1);
			newUrl+=qkey+"="+qvalue+"&";
		}
		var prfNam=publicJson['myDashboardConfigDetails']['profileName'];
		if(!Ext.isEmpty(prfNam))
		{
			prfNam=filterEncode(prfNam);
		}
		if(isCustomDashboard)
		{
			window.parent.location.href=urlPage+"?"+newUrl+"&profileName="+prfNam;
		}
		else
		{
			window.location.href=url+"&profileName="+prfNam;
		}
		//window.location.href=urlPage+"?"+newUrl;
	}
	function publishURLSelection(selection){			
			var alltables = document.getElementsByTagName("body");
			function enableSelection(element) {
				element.onselectstart = function() {
					return true;
				};
				element.unselectable = "off";
				element.style.MozUserSelect = "normal";
				element.style.cursor = "default";
			}
			function disableSelection(element) {
				element.onselectstart = function() {
					return false;
				};
				element.unselectable = "on";
				element.style.MozUserSelect = "none";
				element.style.cursor = "default";
			}

			for (var i = 0; i < alltables.length; i++) {
				if(selection=='enable'){
					enableSelection(alltables[i]);
				}else{
					disableSelection(alltables[i]);
				}
			}		  	
	}   

function getDonutChartsInstance1(container_Id,chartHeight,chartWidth){
var drawChart = true;
 var maxValue = null;
 if (container_Id.indexOf('summary')>-1)
 {
	 maxValue = 100;
 }
 var ErHighStockChart = {
	highchart: null,
	defaults: {
		chart: {
			height:chartHeight,
			width:chartWidth,
			plotBorderWidth: 0,
			//plotBorderColor : '#C0C0C0',
			backgroundColor: 'transparent',
			plotBackgroundColor: 'transparent',
			plotShadow: false,
			shadow: false,
			zoomType:'xy',
			ignoreHiddenSeries:false,
			spacing:[10, 10, 10, 10],
			events: {
				load: function(event) {
					jQuery('.highcharts-legend-item rect').attr('height', '8').attr('y', '5');
					jQuery('.highcharts-legend-item rect').attr('width', '8').attr('x', '8');
				}
			}
		},
		rangeSelector: {
			enabled: false
		},
		global: {
			useUTC: true,
			//timezoneOffset: timezoneOffsetValue
		},
		navigator: {
			enabled: false
		},
		yAxis: {
               // min: 0,
			endOnTick: true,
			showFirstLabel: true,
			startOnTick: true,
			max:maxValue,
			border :0,
			lineWidth:1,
			labels: {
			    formatter: function() {
					var val = Highcharts.numberFormat (this.value,4, '.','');
					val = (parseFloat(val));
					/*var val_ar = val.split('.');
					if(val_ar.length>1)
					{
						if(val_ar[1]=='0000')
							val = val_ar[0];
					}*/
					return val;
				},
				style: {
					color : 'black',
					
					fontFamily: 'Lucida Grande Bold',
					fontSize: '11px',
				},
			},
			showLastLabel: true,
		},
		scrollbar: {
			enabled: false
		},
		legend: {
			verticalAlign: 'top',
			align:'center',
			layout: 'horizontal',
			borderWidth: 0,
			y:5,
			x:5,
			width: 300,
			adjustChartSize: false,
			navigation: {
				arrowSize: 5
			},
			itemStyle: {
				//color : 'black',
				//fontFamily: 'Lucida Grande Bold',
				//fontSize: '11px',
			},
			symbolWidth: 15,
		},
		labels :{
			itemStyle: {
				//color : 'black',
				//fontFamily: 'Lucida Grande Bold',
				//fontSize: '11px',
			},
		},
		tooltip: {
			shared: true,
			borderColor: null,
			valueDecimals: 4,
			style: {
					//color : '#c0c0c0',
					//padding: 10,
					//fontFamily: 'Lucida Grande Bold',
					//fontSize: '11px',
				},
		},
		exporting: {
			enabled: false
		},
		credits: {
			enabled: false
		},
		xAxis: {
            tickWidth: 0,
			border :1,
			lineWidth: 1,
			minPadding:0.02,
			maxPadding:0.02,
			ordinal: false,
			endOnTick: true,
			showFirstLabel: true,
			startOnTick: true,
			labels: {
				style: {
					//color : '#c0c0c0',
					//fontFamily: 'LucidaGrandeRegular',
                    //fontSize: '11px',
				},
				overflow: 'justify',
				showLastLabel: true,
				endOnTick: true,
				showFirstLabel: true,
				startOnTick: false,
				useHTML: false,
				tickPixelInterval: 50,
			},
			title: {
				enabled: true,
			}
		},
		title: {
				text: '',
				offset: '',
				margin: 0
			},
		series: {
		}
	},
	setData: function (jsonData, currentDateFormat, maxURL, ctype) {
		var isMyDashboardHealthPieChart=false;
		var bigPieChart=false;
		var isDoNut=false;
		if(ctype!=null && ctype=='healthPieChart')
		{
			ctype='pie';
			isMyDashboardHealthPieChart=true;
		}
		else if(ctype!=null && ctype=='bgdonut')
		{
			ctype='pie';
			isDoNut = true;
			bigPieChart = true;
		}
		else if(ctype!=null && ctype=='donut')
		{
			ctype='pie';
			isDoNut = true;
		}
		//console.log("jsonData=-=-=->",jsonData)
	  var isEndOntick = ( Ext.isEmpty( jsonData['tick'] ) )?true:jsonData['tick'];
	  jsonData = (!Ext.isEmpty(jsonData.dataXML))?jsonData.dataXML:jsonData;
	  var toolTipFmt = '';
	  var chartType = ( Ext.isEmpty(ctype))?'bar':ctype;
	  var isStackedColumn = false;
	  if (chartType == 'stackedColumn')
	  {
		  isStackedColumn = true;
	  }
	  var isStackedBar = false;
	  if (chartType == 'stackedBar')
	  {
		  isStackedBar = true;
	  }
	  var setMinPointLength=0;
	  var setPointWidth = null;
	  var maxVal = null;
	  if (jsonData['MaxValue']!=null && jsonData['MaxValue']!="" && jsonData['MaxValue']!=undefined && jsonData['MaxValue']!='undefined')
	  {
		maxVal = jsonData['MaxValue'];
	  }
	  var labelStep = 0;
	  if(isStackedColumn && jsonData['labelStep']!=null && jsonData['labelStep']!=undefined && jsonData['labelStep']!='')
	  {
		labelStep = jsonData['labelStep'];
	  }

		var pieSize='80%';
		var pieInnerSizeL='';
		var pieOuterSizeL='';
		var cursorVal = 'pointer';
		 var enableDrilldownLink=true;
		 if((jsonData['enableDrilldownLink']!=null) && !Ext.isEmpty(jsonData['enableDrilldownLink']))
		 {
			   enableDrilldownLink = jsonData['enableDrilldownLink'];
		 }
		 if(enableDrilldownLink == false || enableDrilldownLink == 'false')
		 {
			 cursorVal = 'default';
		 }

		if(jsonData['innersize']!=null && jsonData['innersize']!=undefined && jsonData['innersize']!=''){
			pieInnerSizeL=jsonData['innersize'];
		}else{
			pieInnerSizeL='155%';
		}
		
		if(jsonData['outersize']!=null && jsonData['outersize']!=undefined && jsonData['outersize']!=''){
			pieOuterSizeL=jsonData['outersize'];
		}else{
			pieOuterSizeL='190%';
		}

		var pieDataLabelsEnable=true;
		var showMonitorHomeBottomPanel=true;
		showMonitorHomeBottomPanel = (Ext.isEmpty(jsonData['showMonitorHomeBottomPanel']))?false:jsonData['showMonitorHomeBottomPanel'];
		var isLogonDonut = (Ext.isEmpty(jsonData['logonDonut']))?false:jsonData['logonDonut'];
		var pieVerticalAlign="";
		var pieAllowPointSelect=true;
		var pieMargin=15;
		var tooltipFontSize=12;
		if(isDoNut)
		{
			pieSize=pieOuterSizeL;
			pieInnerSize=pieInnerSizeL;
			pieDataLabelsEnable = (Ext.isEmpty(jsonData['dataLabels']))?false:jsonData['dataLabels'];
			pieVerticalAlign = "middle";
			pieMargin=0;
			pieAllowPointSelect=false;
			tooltipFontSize = jsonData['tooltipFontSize'];
		}

		tooltipFontSize=(tooltipFontSize==null || tooltipFontSize==undefined)?12:tooltipFontSize;
		var fontFamilyStyle = 'LucidaGrandeRegular'; 
		var enableToolTip = false;
		var pieBorderWidth =0;
		var hoverEnableVal = true;
		if(jsonData['fromHealthSummaryWidget']!=null && jsonData['fromHealthSummaryWidget']!=undefined && jsonData['fromHealthSummaryWidget']!=''){
			if(jsonData['fromHealthSummaryWidget'])
			{
				if(!jsonData['toolTipForDonut']){
					enableToolTip = false;
				}else{
				enableToolTip = true;
				}								
				fontFamilyStyle = 'Roboto';
				pieBorderWidth = 2;
				cursorVal ='pointer';
				hoverEnableVal = false;
			}
		}

	  var barStyleAttrbs=new Object();
	  barStyleAttrbs['fontFamily']='LucidaGrandeRegular';
	  barStyleAttrbs['fontSize']='10px';
	  barStyleAttrbs['yFontClr']='#636363';
	  barStyleAttrbs['xfontClr']='#636363';
	  barStyleAttrbs['yfontFmy']='LucidaGrandeRegular';
	  barStyleAttrbs['xfontFmy']='LucidaGrandeRegular';
	  barStyleAttrbs['yfontSize']='10px';
	  barStyleAttrbs['xfontSize']='10px';
	  barStyleAttrbs['xfontWgt']='normal';
	  barStyleAttrbs['yfontWgt']='normal';

	  barStyleAttrbs['ylabelFontClr']='#636363';
	  barStyleAttrbs['xlabelfontClr']='#636363';
	  barStyleAttrbs['ylabelfontFmy']='LucidaGrandeBold';
	  barStyleAttrbs['xlabelfontFmy']='LucidaGrandeRegular';
	  barStyleAttrbs['ylabelfontSize']='10px';
	  barStyleAttrbs['xlabelfontSize']='10px';
	  barStyleAttrbs['ylabelfontWgt']='bold';
	  barStyleAttrbs['xlabelfontWgt']='normal';

	  barStyleAttrbs['legFontClr']='#2a292a';
	  barStyleAttrbs['legFontFmy']='LucidaGrandeRegular';
	  barStyleAttrbs['legFontSize']='10px';
	  barStyleAttrbs['legFontWgt']='normal';

	  //barStyleAttrbs['capFontClr']='#000';
	  barStyleAttrbs['capFontClr']=( (strSkin=='Dark' || strSkin=='dark') )?'#c6c6c6':'#2a292a';
	  barStyleAttrbs['capFontFmy']=fontFamilyStyle;
	  barStyleAttrbs['capFontSize']='22px';
	  barStyleAttrbs['capFontWgt']='bold';
	  barStyleAttrbs['LegendPosition']='center';

	  var yaxisTitle ='',xLabel='',showLegend=false;
	  showLegend = (Ext.isEmpty(jsonData['showLegend']))?false:jsonData['showLegend'];
	 
	  barStyleAttrbs['bgColor'] = jsonData['bgColor'];
	  barStyleAttrbs['plotBgColor'] = jsonData['plotBgColor'];
	  barStyleAttrbs['fontColor'] = jsonData['fontColor'];
	  barStyleAttrbs['gridLineColor'] = jsonData['gridLineColor'];
	  barStyleAttrbs['LegendFont '] = jsonData['LegendFont'];
	  xLabel = jsonData['xAxisLabel'];
	 if( Ext.isEmpty(jsonData['styles']))
	 {
		barStyleAttrbs['fontFamily'] = jsonData['fontName'];
		barStyleAttrbs['fontSize'] = jsonData['fontsize'];
		yaxisTitle = jsonData['yAxisLabel'];
		xaxisTitle = jsonData['xAxisLabelName'];
		barStyleAttrbs['LegendPosition'] = jsonData['LegendPosition'];
		if (jsonData.hasOwnProperty('showlegendFont'))
		{
			showLegend = eval(jsonData['showlegendFont']);
		}
	 }
	 else
	 {
	 	barStyleAttrbs['fontFamily'] = jsonData['fontName'];
        barStyleAttrbs['fontSize'] = jsonData['fontsize'];
        yaxisTitle = jsonData['yAxisLabel'];
		xaxisTitle = jsonData['xAxisLabelName'];
        barStyleAttrbs['LegendPosition'] = jsonData['LegendPosition'];
        if (jsonData.hasOwnProperty('showlegendFont')) {
            showLegend = eval(jsonData['showlegendFont']);
        }
        var stylesJson = jsonData['styles'];
		if(!Ext.isEmpty(stylesJson['legendStyle']))
		{
			barStyleAttrbs['legFontClr'] = stylesJson['legendStyle'].COLOR;
			barStyleAttrbs['legFontFmy'] = stylesJson['legendStyle'].FAMILY;
			barStyleAttrbs['legFontSize'] = stylesJson['legendStyle'].SIZE;
			barStyleAttrbs['legFontWgt'] = stylesJson['legendStyle'].WEIGHT;
		}
		if(!Ext.isEmpty(stylesJson['title']))
		{
			barStyleAttrbs['capFontClr'] = stylesJson['title'].COLOR;
			barStyleAttrbs['capFontFmy'] = stylesJson['title'].FAMILY;
			barStyleAttrbs['capFontSize'] = stylesJson['title'].SIZE;
			barStyleAttrbs['capFontWgt'] = stylesJson['title'].WEIGHT;
		}
		
		if(!Ext.isEmpty(stylesJson['yaxis']))
		{
			barStyleAttrbs['yfontClr'] = stylesJson['yaxis'].COLOR;
			barStyleAttrbs['yfontFmy'] = stylesJson['yaxis'].FAMILY;
			barStyleAttrbs['yfontSize'] = stylesJson['yaxis'].SIZE;
			barStyleAttrbs['yfontWgt'] = stylesJson['yaxis'].WEIGHT;
		}
		if(!Ext.isEmpty(stylesJson['xaxis']))
		{
			barStyleAttrbs['xfontClr'] = stylesJson['xaxis'].COLOR;
			barStyleAttrbs['xfontFmy'] = stylesJson['xaxis'].FAMILY;
			barStyleAttrbs['xfontSize'] = stylesJson['xaxis'].SIZE;
			barStyleAttrbs['xfontWgt'] = stylesJson['xaxis'].WEIGHT;
		}
		if(!Ext.isEmpty(stylesJson['yaxislabel']))
		{
			barStyleAttrbs['ylabelfontClr'] = stylesJson['yaxislabel'].COLOR;
			barStyleAttrbs['ylabelfontFmy'] = stylesJson['yaxislabel'].FAMILY;
			barStyleAttrbs['ylabelfontSize'] = stylesJson['yaxislabel'].SIZE;
			barStyleAttrbs['ylabelfontWgt'] = stylesJson['yaxislabel'].WEIGHT;
		}
		if(!Ext.isEmpty(stylesJson['xaxislabel']))
		{
			barStyleAttrbs['xlabelfontClr'] = stylesJson['xaxislabel'].COLOR;
			barStyleAttrbs['xlabelfontFmy'] = stylesJson['xaxislabel'].FAMILY;
			barStyleAttrbs['xlabelfontSize'] = stylesJson['xaxislabel'].SIZE;
			barStyleAttrbs['xlabelfontWgt'] = stylesJson['xaxislabel'].WEIGHT;
		}
	}
	if(barStyleAttrbs['bgColor']==null || barStyleAttrbs['bgColor']=="" || barStyleAttrbs['bgColor']=="null")
	{
		//barStyleAttrbs['bgColor']="#ffffff";
		barStyleAttrbs['bgColor']="transparent";
		//fbfbfb
	}
	if(barStyleAttrbs['plotBgColor']==null || barStyleAttrbs['plotBgColor']=="" || barStyleAttrbs['plotBgColor']=="null")
	{
		barStyleAttrbs['plotBgColor'] ="#ffffff";
	}
	if(barStyleAttrbs['fontColor']==null || barStyleAttrbs['fontColor']=="" || barStyleAttrbs['fontColor']=="null")
	{
	   barStyleAttrbs['fontColor'] ="#c0c0c0";
	}
	if(barStyleAttrbs['gridLineColor']==null || barStyleAttrbs['gridLineColor']=="" || barStyleAttrbs['gridLineColor']=="null")
	{
		barStyleAttrbs['gridLineColor']="#C0C0C0";
	}
	yaxisTitle =(yaxisTitle == null || yaxisTitle == '')?'':yaxisTitle;
	xaxisTitle =(xaxisTitle == null || xaxisTitle == '')?'':xaxisTitle;
	legx=90,legy=100;
	legAlign='right';
	var itemMarginTopVal=5;
	var itemMarginBottomVal=5;
	var legendLayout='vertical';
	var legendMaxHeight=null;
	if(barStyleAttrbs['LegendFont']==null || barStyleAttrbs['LegendFont']=="" || barStyleAttrbs['LegendFont']=="null")
	{
		barStyleAttrbs['LegendFont']='LucidaGrandeRegular';
	}
	if(chartType!=null && chartType=='bar')
	{
		  dataLabelColor='#c0c0c0';
		  setMinPointLength=10;
		  setPointWidth=21;
		  legx=0;
		  legy=0;
		  legAlign = 'top';
	}
	else if(chartType!=null && chartType=='column')
	{
		legx=0;
		legy=0;
		itemMarginTopVal=0;
		itemMarginBottomVal=0;
		legAlign = 'top';
		legendLayout='horizontal';
		legendMaxHeight=40;
	}
	var subTitle = ( Ext.isEmpty( jsonData.subTitle ) )?'':jsonData.subTitle;
	yaxisTitle =(yaxisTitle == null || yaxisTitle == '')?((!Ext.isEmpty(jsonData['yAxisLabel']))?jsonData['yAxisLabel']:''):yaxisTitle;
	xaxisTitle =(xaxisTitle == null || xaxisTitle == '')?((!Ext.isEmpty(jsonData['xAxisLabelName']))?jsonData['xAxisLabelName']:''):xaxisTitle;
	xLabel =(xLabel == null || xLabel == '')?'':xLabel;
	legendWidth = (barStyleAttrbs['LegendPosition'] == 'right')?190:300;
	needLegendFormat = (barStyleAttrbs['LegendPosition'] == 'right')?'true':'false';
	maxLegendHeight = (barStyleAttrbs['LegendPosition'] == 'right')?null:50;
	valign = (barStyleAttrbs['LegendPosition'] == 'right')?'middle':'top';
	var titVal = "";
	//if(!Ext.isEmpty(jsonData['centerTitleNeeded']) && jsonData['centerTitleNeeded'])
		//titVal = jsonData['value'];
	//console.log("jsonData['title']=-9201=-=>",jsonData['title'])
	if (jsonData['title'] != null && jsonData['title'] != undefined && jsonData['title'] != '')
	{
		titVal = jsonData['title'];
	}
	
	if(!Ext.isEmpty(jsonData['showTotalValinDonut']) && !jsonData['showTotalValinDonut'])
		titVal = "";

	//var chartTitle =jsonData['title'];
	if (jsonData['setTitle'] != undefined && jsonData['setTitle'] != null && jsonData['setTitle'])
	{
		try
		{
			if(!Ext.isEmpty(jsonData['sessionGraphs']) && jsonData['sessionGraphs'])
			{
				var thandsymbol='',tchangeTabView='',ttitle='',ttest_org='',tmeasure_org='',tfun='';
				thandsymbol = 'ctxMouse';
				tchangeTabView = jsonData['changeTabView'];
				ttitle = jsonData['title'];
				ttest_org = jsonData['test_org'];
				tmeasure_org = jsonData['measure_org'];
				tfun =  "onclick=loadView('UED','','','"+ttest_org+"')";
				if(ttitle == 0)
					titVal = "";
				else
					titVal = "<span style='margin-left:-1px;margin-top:7px;display:block;' class='"+thandsymbol+"' "+tfun+" >"+ttitle+"</span>";		
			}
			else
			{
				var thandsymbol='',tchangeTabView='',ttitle='',ttest_org='',tmeasure_org='',tfun='';
				thandsymbol = jsonData['handSymbol'];
				tchangeTabView = jsonData['changeTabView'];
				ttitle = jsonData['title'];
				ttest_org = jsonData['test_org'];
				tmeasure_org = jsonData['measure_org'];
				tfun =  "onclick=loadView('"+tchangeTabView+"','','','"+ttest_org+"','"+tmeasure_org+"')";

				titVal = "<span style='margin-top:-7px;display:block;' class='"+thandsymbol+"' "+tfun+" >"+ttitle+"</br><span style='letter-spacing:0px' class='font_normal11'>Secs</span></span>";		
			}
		}
		catch (e1)
		{
			if(!Ext.isEmpty(jsonData['sessionGraphs']) && jsonData['sessionGraphs']){
				titVal = jsonData['title'];
			}else{
				titVal = jsonData['title']+"</br><span style='letter-spacing:0px' class='font_normal11'>Secs</span>";
			}
		}
				
	}
	
	var chartTitle =titVal;

	var isHtmlTitle = ( Ext.isEmpty( jsonData['useHtml'] ) )?false:jsonData['useHtml'];
	chartTitle =(chartTitle == null || chartTitle == '')?'':chartTitle;
	var marginTopVal = ( chartType == 'bar' && chartTitle != '' )?45:25;
	if(chartType!=null && chartType=='column')
	{
		marginTopVal=50;
	}
	var fromPage = jsonData['fromPage'];
	var chartContObj=document.getElementById(container_Id);
	var stackingVal='normal';
	var rotateDegree = 0;
	var setGroupPadding=-0.065;
	var setPointPadding=0.1;// default value
	var data=jsonData['DataSet'];
	var enableClick = (Ext.isEmpty(jsonData['enableClick']))?false:jsonData['enableClick'];
	var insideVal = false;
	barStyleAttrbs['plotBgColor'] = 'transparent';	
	var tipColor = ( (strSkin=='Dark' || strSkin=='dark') )?'#c0c0c0':'#2a292a';
	var tipFormat = ( (strSkin=='Dark' || strSkin=='dark') )?'<span style="color:white">{point.y}</span> ':'<span style="color:{point.color}">{point.y}</span> ';
	var rotYval = 0;
	var rotXval = 0;
	var pieBorderColor=(strSkin == 'Light')?"#ffffff":'#404040';
	if(chartType!=null && chartType=='column')
	{
		stackingVal=null;
	//	rotateDegree=-90;
		rotYval=25;
		//marginTopVal=100;
	}
	
	if (isStackedColumn)
	{
		rotateDegree = 270;
		rotYval = 30;
		rotXval = 2;
		chartType = 'column';
		stackingVal='normal';
		insideVal = true;
	//	barStyleAttrbs['xlabelfontSize'] = '12px';
		var marginTop1=jsonData['marginTop'];
		if(marginTop1==null || marginTop1=="undefined" || marginTop1=="")
			marginTopVal = 60;
			
		marginTopVal=marginTop1;
	}
	else if (isStackedBar)
	{
		rotateDegree = 0;
		chartType = 'bar';
		stackingVal='normal';
		//barStyleAttrbs['xlabelfontSize'] = '12px';
		marginTopVal = 40;
		insideVal = true;
		dataLabelColor='#c0c0c0';
	    setMinPointLength=10;
		setPointWidth=21;
		rotXval = -5;
	}
	else if( chartType == 'bar')
	{
		rotXval = -5;
		barStyleAttrbs['fontColor'] = (strSkin == 'Light')?"#2a292a":'#red';	  
	}
  if(chartType!=null && chartType=='pie')
  {
	  barStyleAttrbs['fontColor'] = (strSkin == 'Light')?"#2a292a":'#c0c0c0';	
	  strpointFormat='';
	 // console.log("chartTitle=-9273=-=>",chartTitle)
	  if(chartTitle!=null && chartTitle!="")
		{
			chartTitle = ( Ext.isEmpty( jsonData['unit'] ) )?chartTitle:chartTitle+'('+jsonData['unit']+')';
			//console.log("chartTitle=-9277=-=>",chartTitle)
		}
  }
  else
  {
   strpointFormat='<b>:{point.y}</b>';
  }
	if(data!=null && data.length>=1)
	{
		calx = (chartWidth/data.length)+40;
		var xx=data[0].data;
		//calBarwidth=21+((chartHeight-((xx.length*21)+50))/xx.length)/10
		//if(xx.length==1)
		if(xx.length<3)
		{
			setGroupPadding=0.2;
			setPointPadding=0.4;
		}
	}
	var yAxisLineWidth = 1;
	if(jsonData!=null && (jsonData.hasOwnProperty('hideTopGridLine') && jsonData['hideTopGridLine']=="true"))
	{
		yAxisLineWidth=0;
	}
	var space = [10, 10, 10, 10];
	var marginbottom=null;
	var marginright=null;
	var mychartwidth=chartWidth;
	var mychartheight=chartHeight;
	var marginTop=null;
	var isMyDashboard=false;
	if(fromPage!=null && fromPage=="MyDashboard")
	{
		isMyDashboard=true;
	}
	if( !isMyDashboard && Ext.isEmpty( jsonData['isStateBar'] ))
	{
		var isMaxView = jsonData['isMax'];
		marginTop=20;
		if(xLabel.length>=6)
		{
			isMaxView=eval(isMaxView);
			//marginbottom = ( isMaxView )?(chartHeight-40-(xLabel.length)*(setPointWidth+1)):(chartHeight-20-(xLabel.length)*(setPointWidth+1));
			//marginbottom = ( isMaxView && mychartheight <= 400 )?null:(chartHeight-40-(xLabel.length)*(setPointWidth+1));
			if( isMaxView )
				marginbottom = ( mychartheight <= 400 )?null:(chartHeight-40-(xLabel.length)*(setPointWidth+1));
			else
				marginbottom = (chartHeight-20-(xLabel.length)*(setPointWidth+1));
		}
		if(chartType!=null && chartType=='column')
		{
			marginbottom=null;
			if(chartContObj!=null)
				chartContObj.style.height = '97%';
			if(xLabel.length>=6)
				marginright=chartWidth-20-(xLabel.length)*(setPointWidth+5);
		}
		if(chartType!=null && chartType=='bar')
		{
			mychartwidth=chartWidth;
			if(chartContObj!=null)
				chartContObj.style.width = '97%';
		}
	}
	if(isMyDashboard)
		marginbottom=null;
	
	if(isMyDashboardHealthPieChart || isLogonDonut || bigPieChart)
	{
		//space=[0,0,0,0];
		marginTopVal=null;
	}
	var isRumPie = ( Ext.isEmpty( jsonData['rumPie'] ) )?false:true;
	var spie = false;
	
	//alert("legendMaxHeight=-=-=->"+legendMaxHeight)
	//legendMaxHeight = 100;

	//console.log("chartType=-=9352-=>",chartType)
   var chartingOptions = {
   chart:{
		height:mychartheight,
		width:mychartwidth,
		type : chartType,
		spacing:space,
		borderWidth:0,
		marginBottom: marginbottom,
		//backgroundColor : barStyleAttrbs['bgColor'],
		//plotBackgroundColor : barStyleAttrbs['plotBgColor'],
		//plotBorderColor: barStyleAttrbs['gridLineColor'],
		marginTop: marginTopVal,
					events:
					{
						click: function (e)
						{
							if (e.target.firstChild == null || e.target.firstChild == undefined)
							{
								if (maxURL != 'null' && maxURL != 'undefined' && maxURL != '' && maxURL != undefined && maxURL != 'close')
									loadMaximizedView(maxURL);
								else if (maxURL == 'close')
									closeMaximizedView();
							}
						}
					}
    },
    title: {
		useHTML:isHtmlTitle,
		text: chartTitle,
		offset: '',
		margin: pieMargin,
		y:18,
		style:
		{
			textAlign:'center',
			color:barStyleAttrbs['capFontClr'],
			fontFamily:barStyleAttrbs['capFontFmy'],
			fontSize:barStyleAttrbs['capFontSize'],
			letterSpacing:'-0.13em'
		},
		verticalAlign: pieVerticalAlign,
		floating: true,
		zIndex:'-10000'
   },
   subtitle:{
	text: subTitle,
	style:
		{
			//color:barStyleAttrbs['capFontClr'],
			//fontFamily:barStyleAttrbs['capFontFmy'],
			//fontSize:barStyleAttrbs['capFontSize']
		}
   },
   tooltip: {
		valueDecimals: 4,
		hideDelay: 100,
		enabled:enableToolTip,
		style:{padding: '5px'},
		//formatter: function() {
			/*if( !Ext.isEmpty(this.point) ){
				return (Ext.isEmpty(this.point.legendLabel))?'<span style="color:'+this.point.color+'">'+this.point.name+': <b>'+this.point.y+'</b></span> ':'<span style="color:'+this.point.color+'">'+ this.point.legendLabel +'</span>';
			}*/
			formatter: function() {
						var s ='';
						var val = Highcharts.numberFormat (this.y,4, '.','');
						var val_ar = val.split('.');
						if(val_ar.length>1)
						{
							if(val_ar[1]=='0000')
								val = val_ar[0];
						}
						if(isMyDashboardHealthPieChart)
						{
							s += '<span style="color:'+this.point.color+'">'+this.point.name+'</b></span>';
						}
						else
						{
							if( Ext.isEmpty(this.point) )
							{
								if(this.x == "" || this.x == 'null' || this.x == 'undefined' || this.x == undefined)
								{
									s += '<b><span style="color:'+tipColor+'">'+val+'</span></b>';
								}else
									s += '<b><span style="color:'+tipColor+'">'+ this.x +'  :  '+val+'</span></b>';
							}
							else
							{
								var tpn = (Ext.isEmpty(this.point.legendLabel))?this.point.name:this.point.legendLabel;
								var perTip="";
								if( isRumPie )
								{
									if( tpn.indexOf("(") > -1 )
									{
										var tpnfr = tpn.substring(0,tpn.indexOf("("));
										var tpnsr = tpn.substring(tpn.indexOf(")")+1);
										if(tpn!=null && tpn.indexOf("%")>-1)
										{
											perTip=" %";
											tpn = tpnfr+tpnsr;
										}
										else
										{
											tpn = tpnfr+tpnsr;
										}
									}
								}
								else
								{
									tpn = (Ext.isEmpty(this.point.legendLabel))?this.point.name:this.point.legendLabel;
								}

								if(isDoNut)
								{
									s += (Ext.isEmpty(this.point.legendLabel))?'<span style="font-size:'+tooltipFontSize+'px;color:'+this.point.color+'">'+tpn+': <b style="font-size:'+tooltipFontSize+'px;color:black">'+this.point.y+perTip+'</b></span> ':'<span >'+ tpn +'</span>';
								}
								else
								{
									s += (Ext.isEmpty(this.point.legendLabel))?'<span style="color:'+this.point.color+'">'+tpn+': <b>'+this.point.y+perTip+'</b></span> ':'<span >'+ tpn +'</span>';
								}
							}
						}
						return s;
					}
		//}
   },
   yAxis: {
	 max:maxVal,
	 gridLineWidth: 1,
	 endOnTick: isEndOntick,
	 lineWidth : yAxisLineWidth,
	 startOnTick: true,
	// gridLineColor: barStyleAttrbs['gridLineColor'],
	// lineColor: barStyleAttrbs['gridLineColor'],
     labels: {
		style: {
			//fontFamily: barStyleAttrbs['yfontFmy'],
			//fontSize: barStyleAttrbs['yfontSize'],
			//color : barStyleAttrbs['yfontClr']
		}
	},
     title: {
      text: yaxisTitle,
      style: {
       //color : barStyleAttrbs['ylabelfontClr'],
       //fontFamily: barStyleAttrbs['ylabelfontFmy'],
       fontSize: barStyleAttrbs['ylabelfontSize'],
                        }
      },
		tickPositioner: function(min,max){
				if (!isStackedColumn && !isStackedBar)
				{
					var act = min,
					ticks = [];
					this.tickAmount=1;
					var flag=false;
					var interval=this.tickInterval;
					var second=0;
					if(min==max)
					{
						if(max>1)
							max=max+1;
						else if(max==0){
							max=max+1;
							second=0
							flag=true;
						}
						else
						{
							max=max+0.1;
						}
					}
					var cc=1
					while(act <= max){
						if(cc==2 && flag)
							ticks.push(second);
						else
							ticks.push(act);
						act+= interval;
						cc++;
					}
					if(!flag)
						ticks.push(act);
				  return ticks;  
				}
			}
    },
    xAxis: {
     categories: xLabel,
	 min: 0,
	 tickWidth:0,
     gridLineWidth: 0,
     //gridLineColor: barStyleAttrbs['gridLineColor'],
     //lineColor: barStyleAttrbs['gridLineColor'],
     lineWidth:1,
	tickPixelInterval: 75,
	tickLength: 0,
	endOnTick: true,
	showFirstLabel: true,
	startOnTick: true,
	labels: {
		 rotation:rotateDegree,
		 tickmarkPlacement: 'on',
		 x: rotXval,
		 y:rotYval,
		step:labelStep,
		 style: {
				width:'100px',
				//fontFamily: barStyleAttrbs['xfontFmy'],
				//fontSize: barStyleAttrbs['xfontSize'],			
				//color : barStyleAttrbs['xfontClr'],
				whiteSpace: 'nowrap'
			},
			formatter: function() {
				var charLen = ( !Ext.isEmpty( fromPage ) && ( fromPage.toLowerCase() == 'insideview' || fromPage.toLowerCase() == 'virtualtab' || fromPage.toLowerCase() == 'vlive' ))?16:32;
				/*if( fromPage == 'dashboard')
				{
					charLen = 20;
				}*/
				charLen = ( fromPage == 'dashboard' )?20:16;
				var val=this.value;
				var val2=val.toString();
				if(val != null )
				{
					var firstChar = val2.charAt(0);
					if( firstChar == firstChar.toUpperCase()){
						var defLength=11;
						if(isMyDashboard)
						{
							defLength=mychartwidth*0.04;
							defLength=Ext.util.Format.round(defLength, 0);
							if(defLength<11)
								defLength=11;
						}
						if( val.length > defLength )
						{
							var val2=val.substring(defLength);
							if(val2.length>3)
								val=val.substring(0,defLength)+'...'
						}
					}
					else
					{
						var defLength=charLen;
						if(isMyDashboard)
						{
							defLength=mychartwidth*0.06666;
							defLength=Ext.util.Format.round(defLength, 0);
							if(defLength<16)
								defLength=16;
						}
						if(val!=null && val.length> defLength)
						{
							var val2=val.substring(defLength);
							if(val2.length>3)
								val=val.substring(0,defLength)+'...'
						}
					}
				}
				return val;
			}
	},
	title: {
	  text: '21',
	   align: 'center',
		verticalAlign: 'middle',
		y: 40,
	  },
    
    },
   plotOptions: {
      pie: {
			//size: '200%',
			//borderWidth:0,
			borderColor:pieBorderColor,
			borderWidth:pieBorderWidth,
			size:pieSize,
			allowPointSelect: pieAllowPointSelect,
			cursor: cursorVal,
			//innerSize:'165%',
			innerSize:pieInnerSize,
			dataLabels: {
				//connectorColor: '#C0C0C0',
				softConnector: false,
				enabled: pieDataLabelsEnable,
				distance: 7,
				style: {
					//color : barStyleAttrbs['fontColor'],
					//fontFamily:barStyleAttrbs['fontFamily'],
					fontSize: '11px',
				}
			},
			showInLegend: false,
//			tooltip: {
//				valueDecimals: 4,
//				 pointFormat: '<span style="color:{point.color}">{point.y}</span> ',
//				formatter: function() {
//					if( !Ext.isEmpty(this.point)){
//						if(this.point.hasOwnProperty('legendLabel'))
//						{
//							return (Ext.isEmpty(this.point.legendLabel))?'<span style="color:'+this.point.color+'">'+this.point.name+': <b>'+this.point.y+'</b></span> ':'<span style="color:'+this.point.color+'">'+ this.point.legendLabel +'</span>';
//						}
//					}
//				}
//		   },
		   point: {
			events: {
			  click: function() {
//				  if(isDoNut)
//				 {
//					  return false;
//				 }

				  if(enableDrilldownLink)
				  {
					  var QString=this.options;
					  if(QString!=null && QString.hasOwnProperty('diagnosisUrl'))
					  {
						  var diagnosisUrl=QString['diagnosisUrl'];
						  var openInNewWindow=QString['openInNewWindow'];
						  if(diagnosisUrl!=null && diagnosisUrl!="-")
						  {
							  if(openInNewWindow)
							  {
								loadPopup(diagnosisUrl);
							  }
							  else
							  {
								wayToLayerModel(diagnosisUrl);
							  }
						  }
					  }
				  }
				/*  var QString=this.options.url;
			 if(QString == "" || QString == 'null' || QString == 'undefined' || QString == undefined)
			   {
			   }
			   else if(chartType!=null && chartType=='pie')
			   {
				openInNewWin(QString);
				   }
				else if(chartType!=null && chartType=='bar')
			   {
			  //   document.location=QString;
						  openInNewWin(QString);
	 
			   }
				*/
			  }
		   },
		   }
      },
       series: {
				//borderWidth: 0,
				shadow: false,
				stacking: stackingVal,
				groupPadding:setGroupPadding,
				pointPadding:setPointPadding,
			 dataLabels: {
				enabled: pieDataLabelsEnable,
				inside:insideVal,
				//color:barStyleAttrbs['fontColor'],
				//fontFamily:barStyleAttrbs['fontFamily']
			},
			states: {
				hover: {
					enabled: hoverEnableVal,
				 halo: {
					size: 4,                       
				}
				}
           },
			minPointLength:setMinPointLength
		}
    },
//   legend: {
//	layout: legendLayout,
//	//width : (chartWidth-20),
//	align: legAlign,
//	verticalAlign: 'middle',
//	y: 0,
//	x:225,
//   //	itemMarginTop: 5,
//   // itemMarginBottom: 5,
//    //enabled: showLegend,
//    enabled:false,
//	//maxHeight : legendMaxHeight,
//    itemStyle: {
//		//color:barStyleAttrbs['legFontClr'],
//		//fontFamily:barStyleAttrbs['legFontFmy'],
//		//fontSize:barStyleAttrbs['legFontSize'],
//     },
//     labelFormatter: function() {
//      var retrunvar = this.name;
//      if(retrunvar.length>30 && needLegendFormat == 'true')
//      {
//       c=0;
//       strval=''
//       while(c<retrunvar.length)
//       {
//        strval+=retrunvar.substring(c,c+30)+'<br>';
//        c=c+30;
//       }
//      retrunvar= strval;
//      }
//      return retrunvar;
//     },
//    }
   };

	
	var myhtml = '<table width="100%" height="80%"><tr><td align="center" valign="middle">'+errImgSrc+'</td></tr></table>';
	var chartContObj=document.getElementById(container_Id);
	
//  this.highchart.chart.renderTo = container_Id;
	var chartData=[];
	//console.log("DataSet=-=-=>",jsonData['DataSet']);
	if(jsonData['DataSet'] == "" || jsonData['DataSet'] == 'null' || jsonData['DataSet'] == 'undefined' || jsonData['DataSet'] == undefined || jsonData.DataSet[0].data == "" || jsonData.DataSet[0].data == 'null' || jsonData.DataSet[0].data == 'undefined' || jsonData.DataSet[0].data == undefined)
	{
		drawChart = false;
		if(chartContObj!=null)
		{
			if(!Ext.isEmpty(jsonData['measureTitle']))
			{
				
				var errHtml = '<center><div style="padding:5px;border:0px solid red;font-family:LucidaGrandeBold;font-size:12px;"><b>'+jsonData['measureTitle']+'</b></div><span ><img style="margin:20% 0 auto 0" src="/final/images/spacer.gif" class="iconAlert"/></span><span class="rumGraphErrorMsgText">No Traffic Detected</span></center>';
				chartContObj.innerHTML=errHtml;
			}
			else
			{
				chartContObj.innerHTML='<div class="rumErrorPanelBg" style="height:320px;display:block;padding-top:140px;"><table align="center"><tr><td><img style="margin-top:-1px" src="/final/images/spacer.gif" class="iconAlert"/></td><td>&nbsp;<span class="rumGraphErrorMsgText">No Traffic Detected</span></td><tr></table></div>';
			}
		}
	}
	else
	{
		this.highchart= jQuery.extend(true, this.defaults, chartingOptions);
		//console.log("jsonData['DataSet']=-=->",jsonData['DataSet'])
		this.highchart.series=jsonData['DataSet'];
		this.highchart.chart.renderTo = container_Id;
	}
 },
 drawChart: function() {
  if(drawChart)
  {
   Highcharts.setOptions({
    lang: {
      thousandsSep: ''
     }
   });
   Highcharts.setOptions({
    global: {
     useUTC: true,
     timezoneOffset: timeZoneOffsetVal
    }
   });
	Highcharts.seriesTypes.line.prototype.drawLegendSymbol =  Highcharts.seriesTypes.area.prototype.drawLegendSymbol;
	//this.highchart= jQuery.extend(true, this.highchart, getUserThemeFor(strSkin));
	this.highchart= jQuery.extend(true, this.highchart, null);
   new Highcharts.Chart(this.highchart);
  }
 }
};

return ErHighStockChart;
	
}



	

</script>
<script>


var resizeTimer;
/* Ext.EventManager.onWindowResize(function(){ 

			  clearTimeout(resizeTimer);
			  resizeTimer = setTimeout(function() {
				browResize();
			  }, 250);
			
			Ext.tip.QuickTipManager.unregister(Ext.select('div, td, span'));
		});	*/
jQuery.fn.highlight = function(pat) {
function innerHighlight(node, pat) {
  var skip = 0;
  if (node.nodeType == 3) {
   var pos = node.data.toUpperCase().indexOf(pat);
   pos -= (node.data.substr(0, pos).toUpperCase().length - node.data.substr(0, pos).length);
   if (pos >= 0) {
    var spannode = document.createElement('span');
    spannode.className = 'highlight';
    var middlebit = node.splitText(pos);
    var endbit = middlebit.splitText(pat.length);
    var middleclone = middlebit.cloneNode(true);
    spannode.appendChild(middleclone);
    middlebit.parentNode.replaceChild(spannode, middlebit);
    skip = 1;
   }
  }
  else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
   for (var i = 0; i < node.childNodes.length; ++i) {
    i += innerHighlight(node.childNodes[i], pat);
   }
  }
  return skip;
}
return this.length && pat && pat.length ? this.each(function() {
 innerHighlight(this, pat.toUpperCase());
}) : this;
};
 
jQuery.fn.removeHighlight = function() {
return this.find("span.highlight").each(function() {
  this.parentNode.firstChild.nodeName;
  with (this.parentNode) {
   replaceChild(this.firstChild, this);
   normalize();
  }
}).end();
};

function loadMapDepedencyJS()
{
	if(typeof google === "undefined"){
				return;
		}
		var fileref=document.createElement('script');
		fileref.setAttribute("id",'infoBxScriptTag');
		fileref.setAttribute("type","text/javascript");
		fileref.setAttribute("src", infoBxURL);
		fileref.setAttribute("async",false);
		fileref.async=false;

		if (typeof fileref!="undefined")
		{
			document.getElementsByTagName("head")[0].appendChild(fileref);
			
		}
		var fileref1=document.createElement('script');
		fileref1.setAttribute("id",'markerURLTag');
		fileref1.setAttribute("type","text/javascript");
		fileref1.setAttribute("src", markerURL);		
		fileref1.setAttribute("async",false);
		fileref1.async=false;

		if (typeof fileref1!="undefined")
		{
			document.getElementsByTagName("head")[0].appendChild(fileref1);
		}
		isMapAPILoaded=true;
}
function loadjsfile(apiType,apiFilePath)
{
	//console.log("injectedScriptFileArr",injectedScriptFileArr);
	if(injectedScriptFileArr!=null && Ext.Array.contains(injectedScriptFileArr,apiFilePath))
	{
		return;
	}
	if(Ext.isEmpty(apiFilePath))
		return;

	/*	$.getScript( apiFilePath )
		  .done(function( script, textStatus ) {
			console.log(" script file appended successfully---->",apiFilePath+"  "+new Date());
				if(apiType!=null && apiType=='news')
				{
					isNewsApiLoaded=true;
				}
				injectedScriptFileArr.push(apiFilePath);
		  })
		  .fail(function( jqxhr, settings, exception ) {
			console.log("Failed to load "+apiType+"---->",apiFilePath);
		});*/
	


	var fileref=document.createElement('script');
	fileref.setAttribute("id",apiType);
	fileref.setAttribute("type","text/javascript");
	fileref.setAttribute("src", apiFilePath);	
	fileref.setAttribute("async",false);
	fileref.async=false;

    if (typeof fileref!="undefined")
	{
		if(apiType!=null && apiType=='news')
		{
			document.getElementsByTagName("head")[0].appendChild(fileref);
			injectedScriptFileArr.push(apiFilePath);
			isNewsApiLoaded=true;
		}
		else if(apiType!=null && apiType=='map')
		{
			var newsScrTag=document.getElementById(apiType);
			 if(!Ext.isEmpty(newsScrTag))
			{
				 newsScrTag.parentNode.insertAfter(fileref, newsScrTags);
			}
			else
			{
				 document.getElementsByTagName("head")[0].appendChild(fileref);
				injectedScriptFileArr.push(apiFilePath);
			}
		}
	}
}
</script>
</html>

<%
	}
	catch(Throwable t)
	{
		t.printStackTrace();
	}
%>