<!doctype html>
<!-- The DOCTYPE declaration above will set the    -->
<!-- browser's rendering engine into               -->
<!-- "Standards Mode". Replacing this declaration  -->
<!-- with a "Quirks Mode" doctype may lead to some -->
<!-- differences in layout.                        -->
<%@page import="ibase.utility.CommonConstants"%>  
<%@page import = "java.io.*,java.util.*,java.text.SimpleDateFormat" %>
<!--Changed by Amrapali Ahire on 15-nov-2010 [set the date format dynamically ][WI01SUN020] -->
<%@page import="ibase.utility.*"%>
<%@page import="ibase.utility.UserInfoBean"%>
<%@page import="ibase.bean.*"%>

<%@ page import="java.util.*"%>
<%@ page import="java.io.File"%>
<%@ page import="java.io.IOException"%>
<%@ page import="java.util.List"%>

<jsp:useBean id="changePasswordBean" class="ibase.bean.ChangePasswordBean" scope="page"/>
<%@page import="ibase.ejb.CommonDBAccessRemote"%>
<%@page import="ibase.ejb.CommonDBAccessEJB"%>
<%@ page  import="javax.servlet.http.HttpSession" %> 
<%@page import="ibase.utility.BaseLogger"%>

<%!

//javax.servlet.jsp.JspWriter localOut;


%>
<%
String action = E12GenericUtility.checkNull( (String)request.getSession().getAttribute("ACTION") );
String userCode = E12GenericUtility.checkNull( (String)request.getSession().getAttribute("USER") );
String macAddress = E12GenericUtility.checkNull( (String)request.getSession().getAttribute("MAC_ADDRESS") );
System.out.println("---------@@@@calling BaseE12.jsp action:["+action+"]");
System.out.println("---------@@@@calling BaseE12.jsp userCode:["+userCode+"]");
System.out.println("---------@@@@calling BaseE12.jsp macAddress:["+macAddress+"]");
//Commented userName set cookie on 15-Feb-22 Start
//Added by sunny soni for set username cookie after login on 17-Dec-21 [Start]
//Cookie userCodeNameCookie = new Cookie("userName", userCode);
//Added by Pankaj T. on 07-01-2022 for removing vulnerability set httponly and secure flag for cookie - start
//userCodeNameCookie.setPath("; HttpOnly;");
//userCodeNameCookie.setSecure(true);
//Added by Pankaj T. on 07-01-2022 for removing vulnerability set httponly and secure flag for cookie - end
//response.addCookie( userCodeNameCookie );
//Added by sunny soni for set username cookie after login on 17-DEC-21 [End]
//Commented userName set cookie on 15-Feb-22 End		
%>
<html>
  <head>
    <!--CSS for loading message at application Startup-->
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <!-- <meta name="referrer" content="no-referrer"> -->		<!-- Added by Sagar B. to bypass authentication for google maps api[08/11/17] -->
    <!--<meta http-equiv="content-disposition", "attachment;filename=together_tcm6-8071.pdf">-->
    <style type="text/css">
        
        /*Added by Dnyaneshwar on 6-Aug-13 [Other information not select. select only input type are text, TextArea and password] Start*/
        *:not(input):not(textarea):not(text):not(password)
        {
            -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
            -webkit-user-select: none;  /* Chrome all / Safari all / disable selection/Copy of UIWebView*/
			-moz-user-select: none;     /* Firefox all */
			-ms-user-select: none;      /* IE 10+ */
			outline: none; /*Added by Dnyaneshwar on 18-Feb-15 [ Outline coming in E12PopupPanel after added focus panel.]*/
        }
       /*Added by Dnyaneshwar on 6-Aug-13 [ Other information not select. select only input type are text, TextArea and password] End*/
       
    	/*Added by Pravin K on 1-FEB-19 [ For pdf data selection documentEditor ] START */
	    .pdfSelectionViewer div {
		  -webkit-user-select: text !important;
		  -webkit-user-select: text !important;
		  -moz-user-select: text !important;
		  -ms-user-select: text !important;
		  -webkit-touch-callout: text !important;
		}
		/*Added by Pravin K on 1-FEB-19 [ For pdf data selection] START */
        /*Added by Pravin K on 2-SEPT-19 [ FOR ang v9] START */
         .pdfSelectionViewer span {
		  -webkit-user-select: text !important;
		  -webkit-user-select: text !important;
		  -moz-user-select: text !important;
		  -ms-user-select: text !important;
		  -webkit-touch-callout: text !important;
		}
        /*Added by Pravin K on 2-SEPT-19 [ FOR ang v9] END */

		body{
			width: 100%;
			height:100%;
			margin:0;
			padding:0;
			position: absolute;
			overflow:hidden;
			background-color: #1D1A16 !important;
		}
		.logoTransition {
		  margin:auto;
		    transition: box-shadow 0.5s ease-in-out;
		  transform: scale(3);
		  transition-duration: 3s;
		  animation: animationFrames linear 2s;
		  animation-iteration-count: 1;
		  transform-origin: 50% 50%;
		  animation-fill-mode: forwards;
		  -webkit-animation: animationFrames linear 2s;
		  -webkit-animation-iteration-count: 1;
		  -webkit-transform-origin: 50% 50%;
		  -webkit-animation-fill-mode: forwards;
		  -moz-animation: animationFrames linear 1s;
		  -moz-animation-iteration-count: 1;
		  -moz-transform-origin: 50% 50%;
		  -moz-animation-fill-mode: forwards;
		  -o-animation: animationFrames linear 2s;
		  -o-animation-iteration-count: 1;
		  -o-transform-origin: 50% 50%;
		  -o-animation-fill-mode: forwards;
		  -ms-animation: animationFrames linear 2s;
		  -ms-animation-iteration-count: 1;
		  -ms-transform-origin: 50% 50%;
		  -ms-animation-fill-mode: forwards;
		  border-radius: 100%;
		  box-shadow: 0px 2px 20px 20px rgba(199, 199, 199, 0.42), 0px 2px 4px 4px rgba(0, 0, 0, 0.7);
		  -moz-box-shadow: 0px 2px 20px 20px rgba(199, 199, 199, 0.42), 0px 2px 4px 4px rgba(0, 0, 0, 0.7);
		  -webkit-box-shadow:0px 2px 20px 20px rgba(199, 199, 199, 0.42), 0px 2px 4px 4px rgba(0, 0, 0, 0.7);
		}
		
		@keyframes animationFrames{
		  0% {
		    transform: scaleX(1.00) scaleY(1.00) ;
		  }
		  100% {
		    transform: scaleX(3.00) scaleY(3.00) ;
		  }
		}
		
		@-moz-keyframes animationFrames{
		  0% {
		    -moz-transform: scaleX(1.00) scaleY(1.00) ;
		  }
		  100% {
		    -moz-transform: scaleX(3.00) scaleY(3.00) ;
		  }
		}
		
		@-webkit-keyframes animationFrames {
		  0% {
		    -webkit-transform: scaleX(1.00) scaleY(1.00) ;
		  }
		  100% {
		    -webkit-transform: scaleX(3.00) scaleY(3.00) ;
		  }
		}
		
		@-o-keyframes animationFrames {
		  0% {
		    -o-transform: scaleX(1.00) scaleY(1.00) ;
		  }
		  100% {
		    -o-transform: scaleX(3.00) scaleY(3.00) ;
		  }
		}
		
		@-ms-keyframes animationFrames {
		  0% {
		    -ms-transform: scaleX(1.00) scaleY(1.00) ;
		  }
		  100% {
		    -ms-transform:  scaleX(3.00) scaleY(3.00) ;
		  }
		}
		
		.loader-size {
			height: 40px;
			width: 40px;
			margin: auto;
			display: block;
			margin: auto;
		}
		
		.welcome-loader {
			margin: auto;
			height: auto;
			display: grid;
			align-items: center;
		}
		
		.msgDiv {
		    color: #252525;
		    font-size: 15px;
			white-space: normal;
		    text-align: center;
			padding: 10px 10px 0px 10px;
		    animation: textFadein 1s;
		    -moz-animation: textFadein 1s; /* Firefox */
		    -webkit-animation: textFadein 1s; /* Safari and Chrome */
		    -o-animation: textFadein 1s; /* Opera */
		    animation: textFadein 1s;
		    color: white;
		}
		
		@keyframes textFadein {
		    from { opacity: 0; }
		    to   { opacity: 1; }
		}
		
		@-webkit-keyframes textFadein {
		    from { opacity: 0; }
		    to   { opacity: 1; }
		}
		.slide1 {
			width: 100%;
			height: 100%;
			margin: 0;
			position: absolute;
			padding: 0;
			display: flex;
			align-items: center;
			background-color: #1D1A16;
		}
		
		.loading-message-cont {
			width: 40%;
			display: block;
			align-items: center;
			position: absolute;
			bottom: 0;
			right: 0;
			height: 20%;
		}
		/*Added by Sadique S on 12/03/2021 [sub form implementation in table view] START */
        .subFormTableViewTooltip {
            max-width: 350px;
            background-color: #555;
            color: #fff;
            text-align: initial;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1;
            transition: opacity 0.3s;
            font-size: 14px !important;
            font-family: Arial, Helvetica, sans-serif !important;
        }
        /*Added by Sadique S on 12/03/2021 [sub form implementation in table view] END */
    </style>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

	<!-- <meta name="gwt:property" content="locale=ar_IQ">-->
    <!--                                                               -->
    <!-- Consider inlining CSS to reduce the number of requested files -->
    <!--                                                               -->
    <link type="text/css" rel="stylesheet" href="BaseE12.css">
    
    <!-- Added by Prasad on 26/08/15 [for Survey] START -->
    <link href='css/jquery-ui-slider-pips.css' rel='stylesheet' type='text/css' />
	<link href='css/survey.css' rel='stylesheet' type='text/css' />
	<link href='css/jquery-ui-1.css' rel='stylesheet' type='text/css' />
	<!-- Added by Prasad on 26/08/15 [for Survey] END -->
	
	<!-- Added by Pankaj T on 27/01/17 [for time picker] START -->
	<link href="css/jquery.timepicker.css" rel='stylesheet' type='text/css'>
	<link href='css/custom.css' rel='stylesheet' type='text/css' />
    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>Proteus Vision | Home</title>
    <link rel="icon" type="image/x-icon" href="favicon.ico" />
    <!--Added by Pratheek on 06/12/17 for new datepicker-->
   <link href="css/datepicker.css" rel="stylesheet" type='text/css'>
    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
    
    <!-- Added by Abhishek T for enabling HTML tagging [08/DEC/17] START -->
    <link type="text/css" rel="stylesheet" href="/ibase/webitm/css/htmltagging/tagger.css">
    <!-- Added by Abhishek T for enabling HTML tagging [08/DEC/17] END -->
    
	<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/E12TransFlow.css">
	<!-- Added by Santosh on 02/02/2017 to link TransFlow JS and CSS [END]-->
	
	<!-- added by vishal pathare on 4.6.17 for onpaste event add feeds in detail page for browser -->
	
	<!-- Added by sunny soni for showing datetime calender [start]-->
	<link type='text/css' rel='stylesheet'  href='css/jquery.datetimepicker.css'/>		
	
	<link href="css/cropper.min.css" rel="stylesheet" type="text/css">
	<!-- Added by Abhishek T on 26-12-16 [For use cropper js plugin] END -->

	<!-- Added by Pratheek on 06/12/17 [for new datepicker] -->
	
	<!-- Added by Pankaj T. on 29-08-19 custom fonts for icons-->
	<link href='css/vision_ui.css' rel='stylesheet' type='text/css' />
	
	<!-- Added by Abhishek T. on 11-09-19 [Font icons for content plugin] -->
	<link href='css/vision_doc.css' rel='stylesheet' type='text/css' />
	<link href='css/vision_subform.css' rel='stylesheet' type='text/css' />
	
	<!-- Change by shrutika on 24-04-2020 [Start] for IE11 related issue -->
		<script type="text/javascript">
		
		function customLog( value )
		 {
		    var isIE =  !!document.documentMode;
			if( isIE == false )
			{
			if( typeof window.console !== "undefined" )
				{
				console.log( value );
				}
			}
		 }
		</script>
	<!-- Change by shrutika on 24-04-2020 [End] for IE11 related issue -->
	
	<script type='text/javascript' language="javascript" src='js/jquery.min-1.10.1.js'></script>
	<script type='text/javascript' language="javascript" src="js/jquery.easing.min.js"></script>
    <!-- Added by Pravin K on 1-AUG-19 [To store pdf selection logs] START -->
	<script type="text/javascript" language="javascript" src="js/PDFLabelSelection.js"></script>
	<!-- Added by Pravin K on 1-AUG-19 [To store pdf selection logs] END -->
	
	
<script type="text/javascript">

function getCookie(cname) {
	  var name = cname + "=";
	  var decodedCookie = decodeURIComponent(document.cookie);
	  var ca = decodedCookie.split(';');
	  for(var i = 0; i <ca.length; i++) {
	    var c = ca[i];
	    while (c.charAt(0) == ' ') {
	      c = c.substring(1);
	    }
	    if (c.indexOf(name) == 0) {
	      return c.substring(name.length, c.length);
	    }
	  }
	  return "";
	}
	
function validateEmail(email) {
    const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(String(email).toLowerCase());
}

</script>

  </head>

  <!--                                           -->
  <!-- The body can have arbitrary html, or      -->
  <!-- you can leave the body empty if you want  -->
  <!-- to create a completely dynamic UI.        -->
  <!--                                           -->
  
<!--   <body onUnLoad="unloadBaseE12()" onload=""> -->

<%!
	public String checkNull( String value )
	{
		if( value == null || "null".equalsIgnoreCase( value.trim() ) )
		{
			return "";
		}
		return value.trim();
	}
%>	
  <%
	ibase.utility.UserInfoBean userInfo = ( ibase.utility.UserInfoBean )session.getAttribute( "USER_INFO" );
	ibase.utility.E12GenericUtility genericUtility = new ibase.utility.E12GenericUtility();
	if( userInfo == null )
	{
%>
		<jsp:forward page="/jsp/login.html">
			<jsp:param name="REFERER" value=""></jsp:param>
		</jsp:forward>
<%
	}
	//Added by Prajyot on 25-DEC-2013 [For Multi-Language Support]
	String userLocale = userInfo.getUserLanguage() + "-" + userInfo.getUserCountry(),
	dispDateFormat=genericUtility.getDispDateFormat(),
	applDateFormat=genericUtility.getApplDateFormat();
	System.out.println("\n\n\n *****Setting userLocale=[" + userLocale +"] dispDate=[" + dispDateFormat +"] applDate=[" + applDateFormat +"]" );
	System.out.println("USER INFO :::  "+userInfo.toString());
	int minPwdLength = changePasswordBean.getMinPwdLength(userInfo.getTransDB());
	System.out.println(" \n ******** minPwdLength["+minPwdLength+"]");
	//Added By Ajinkya Gopalkar on 13-OCT-15[for getting parameter after site change]
	String setLoading = request.getParameter("li");
	if ( setLoading == null )
	{
		setLoading = "true";
	}
	
	//Added by Prajyot on 25-DEC-2013 [For Multi-Language Support]
	//Added by Shrutika on 15-09-2020 for The user icon which shows detail information about user should also show Login using User id/Mobile/email and user_id/mobile/email value
	Cookie ck[]=request.getCookies();  
	BaseLogger.log("0",userInfo,null, "inside baseE12.jsp...343 :" + ck.length);
	for(int i=0;i<ck.length;i++)
	{  
		CommonDBAccessEJB commonDBAccess = new CommonDBAccessEJB();
		BaseLogger.log("0",userInfo,null, "inside baseE12.jsp...350 :"+ck[i].getName()+" "+ck[i].getValue());//printing name and value of cookie
		if( ck[i].getName().equalsIgnoreCase("userName"))
		{
			String value = ck[i].getValue();
			String authenticatedUsing = checkNull( userInfo.getAuthenticatedUsing() );
			BaseLogger.log("0",userInfo,null, "inside baseE12.jsp...355 ["+authenticatedUsing+"]]value["+value+"]");
			
			String logintType = "", logintTypeVlaue = "", finalLoginType = "", finalLoginValue = "", entredDataType = "";
			String logoutMsg = "";
			String entredData = commonDBAccess.getAuthenticatedUsing(value);
			BaseLogger.log("0",userInfo,null, "inside baseE12.jsp...363 ["+entredData+"]");			
			if( entredData.contains(":") )
			{
				String[] arrOfStr = entredData.split(":"); 
				entredDataType = arrOfStr[0];
				if( entredDataType.trim().equalsIgnoreCase("MOBILE_NO"))
				{
					entredDataType = "Mobile no";
				}
				else if( entredDataType.trim().equalsIgnoreCase("EMAIL_ID"))
				{
					entredDataType = "Email id";
				}
				else if( entredDataType.trim().equalsIgnoreCase("CODE"))
				{
					entredDataType = "User Id";
				}
				
			}
			//Change by shrutika on 25-09-2020 [Start] for if value is mailId in cookies then value not geting proper in case of proteusVisionServer.
			if("".equalsIgnoreCase(entredData))
			{
				entredDataType = "Email id";
			}
			//Change by shrutika on 25-09-2020 [End] for if value is mailId in cookies then value not geting proper in case of proteusVisionServer.
			if( authenticatedUsing.contains(":") )
			{
				String[] arrOfStr = authenticatedUsing.split(":"); 
				logintType = arrOfStr[0];
				logintTypeVlaue = arrOfStr[1];
				logintTypeVlaue = logintTypeVlaue.trim();
				System.out.println("inside baseE12.jsp...logintType ["+logintType+"]]logintTypeVlaue["+logintTypeVlaue+"]]]");
			}
			if( logintType.trim().equalsIgnoreCase("MOBILE_NO"))
	        {
				logoutMsg = logintTypeVlaue +  " against reseted  MOBILE :"+ value;
				logoutMsg = "Request "+ entredDataType +" : " + value + " Session Mobile no : " + logintTypeVlaue;
				logintType= "MOBILE";
	        }
	        else if( logintType.trim().equalsIgnoreCase("EMAIL_ID"))
	        {
	        	logintType = "EMAIL";
	        	logoutMsg = "Request "+entredDataType+" : " + value + " Session Email id  : " + logintTypeVlaue;
	        }
	        else if( logintType.trim().equalsIgnoreCase("CODE"))
	        {
	        	logintType = "USER";
	        	logoutMsg = "Request "+entredDataType+" : " + value + " Session User Id : " + logintTypeVlaue;
	        	
	        }
	        else if( logintType.trim().equalsIgnoreCase("USER_ID"))
	        {
	        	logoutMsg = "Request User Id : " + value + " Session User Id : " + logintTypeVlaue;
	        }
			System.out.println("inside baseE12.jsp...value ["+value+"]]");
			System.out.println("inside baseE12.jsp...logintTypeVlaue ["+logintTypeVlaue+"]]");
			%>
			<script>
			//Change by shrutika on 25-09-2020 [Start] for if value is mailId in cookies then value not geting proper in case of proteusVisionServer.
			//var currentUsernameValue = getCookie('userName');
			//console.log('inside basee12 java....451',currentUsernameValue);
			var logtype = "<%=logintType%>";
			var logvalue = "<%=logintTypeVlaue%>";
			var enterValue = "<%=value%>"; 
			var entredDataType = "<%=entredDataType%>";
			console.log("inside basee12 java....enterValue:["+enterValue+"]");
			//console.log('inside basee12 java....currentUsernameValue',currentUsernameValue);
			console.log("inside basee12 java....logvalue:["+logvalue+"]");
			
			/*if( currentUsernameValue.includes("\""))
			{
				console.log('inside if basee12 java....currentUsernameValue',currentUsernameValue);
				const searchRegExp = /\"/gi;
				const replaceWith = '';
				currentUsernameValue = currentUsernameValue.replaceAll(searchRegExp, replaceWith);
				console.log('inside if basee12 java....currentUsernameValue after replace ":',currentUsernameValue);
			}*/
			
			if( enterValue.includes("\""))
			{
				console.log("inside if basee12 java....enterValue:["+enterValue+"]");
				const searchRegExp = /\"/gi;
				const replaceWith = '';
				enterValue = enterValue.replaceAll(searchRegExp, replaceWith);
				console.log("inside if basee12 java....enterValue after replace:["+enterValue+"]");
			}
			
			//if( currentUsernameValue != logvalue )
			if( enterValue != logvalue )
			{
				
				//if( validateEmail(currentUsernameValue))
				if( validateEmail(enterValue))
				{
					entredDataType = "Email id";
				}
				<%
			        HttpSession httpSession = request.getSession(false);
					String sessionId = httpSession.getId();
					BaseLogger.log("0",userInfo,null, "inside baseE12 jsp logoutMsg ["+logoutMsg+"]]finalLoginType["+finalLoginType+"]]]]finalLoginValue["+finalLoginValue+"]]]");
					commonDBAccess.updateLoginTrace( sessionId , logoutMsg, userInfo );
	       		%>
				function authenticate()
		        {
		            //alert("Inconsistency detected in session while login process \n\nThe authentication process received access type " +logtype + ": "+logvalue + " against request " + entredDataType + ": " + currentUsernameValue );
		            alert("Inconsistency detected in session while login process \n\nThe authentication process received access type " +logtype + ": "+logvalue + " against request " + entredDataType + ": " + enterValue );
		            document.location = "/ibase/jsp/logout.jsp";
		        }
		        authenticate();
			}
			//Change by shrutika on 25-09-2020 [End] for if value is mailId in cookies then value not geting proper in case of proteusVisionServer.
			</script>
				<%
		}
	}  
	//Added by Shrutika on 15-09-2020 for The user icon which shows detail information about user should also show Login using User id/Mobile/email and user_id/mobile/email value
%>

  <body style = "background-color: #1D1A16 !important;"  onbeforeunload="if (event.persisted) noBack();" onUnLoad="unloadBaseE12()" onload="resetCounter(); noBack();">
  <script>
	setTimeout(function() 
	{
		document.getElementById('welcome-loader').style = 'display:none';
	}, 0.1);
	setTimeout(function() {
		document.getElementById('loadingMsg').innerHTML = 'Performing one time setup, will take a while.';
	}, 2000);
	
	setTimeout(function() {
		document.getElementById('welcome-loader').style = 'display:block';		
	}, 2050);
		
	setTimeout(function() {
		document.getElementById('loadingMsg').innerHTML = 'Please wait, experiencing slow connectivity.';
	}, 9000);
	
	</script>
	
	<!--Added by Jatin M on 24-Jun-2022 [to display alert counter prior to session timeout] - START-->
    <script type="text/javascript" language="javascript" src="js/customConfirmPopup.js"></script>
    <link rel="stylesheet" href="css/customConfirmPopup.css" type="text/css" /> 
    <script>
        var httpRequest; 
        
        var sessTimeoutInSecs = '<%= userInfo.getSessTimeoutInSec() %>' != 'null' ? '<%= userInfo.getSessTimeoutInSec() %>' : 300;
        var inactiveInterval = '<%= session.getMaxInactiveInterval() %>';

        var sessionAlertTime = inactiveInterval - sessTimeoutInSecs;
        var message = '';
        var alertCounter = 0;
        var popupCreated = false;
        var decrementCounter = sessTimeoutInSecs;
        var servletResponse = '';
        var interval = setInterval(function checkInActivity() {
            alertCounter++;
            if(sessionAlertTime === alertCounter)
            {
                if (window.ActiveXObject)
                {
                    httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); 
                }
                else if (window.XMLHttpRequest)
                { 
                    httpRequest = new XMLHttpRequest(); 
                }

                httpRequest.onreadystatechange=function()
				{
					if(httpRequest.readyState == 4 && httpRequest.status == 200)	
					{ 
						servletResponse = httpRequest.responseText;
                        if(servletResponse >= sessionAlertTime)
                        {
                            popupCreated = true;
                            customPopup.__open({
                                message : message,
                                okLabel : 'Renew',
                                cancelLabel : 'Logout',
                                onOk : () => onRenew(),
                                onCancel : () => onLogout()
                            });
                        }
                        else
                        {
                            alertCounter = servletResponse;
                        }
                        
					}
				};

                var url = "/ibase/CheckAndExtendTimeServlet?STORE_SESS_TIME=false";
                httpRequest.open("POST", url, true);		
                httpRequest.send();
            }
            if(popupCreated)
            {
                var min = parseInt(decrementCounter / 60);
                var secs = '0' + decrementCounter % 60;
                if(decrementCounter === 0)
                {
                    onLogout();   
                }
                if(secs.length === 3)
                {
                    secs = decrementCounter % 60;
                }
                message = 'Your session will be expired in <b> '+ min + ':' + secs + '</b>';
                
                if(document.getElementById('custom-confirm-message') != null)
                {
                    var messageEl = document.getElementById('custom-confirm-message');
                    messageEl.innerHTML = message;
                }
                decrementCounter--;
            }

        }, 1000);

        function onRenew()
        {
            popupCreated = false;
            alertCounter = 0;
            decrementCounter = sessTimeoutInSecs;
            if (window.ActiveXObject)
            {
                httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); 
            }
            else if (window.XMLHttpRequest)
            { 
                httpRequest = new XMLHttpRequest(); 
            }
            var url = "/ibase/CheckAndExtendTimeServlet";
            httpRequest.open("POST", url, false);		
            httpRequest.send(null);
        }

        function onLogout()
        {
            clearInterval(interval);
            var transitionLogo = document.getElementById('logo-transition');
            transitionLogo.style.removeProperty('display');
            window.logoutUser();
        }

    </script>
    <!--Added by Jatin M on 24-Jun-2022 [to display alert counter prior to session timeout] - END-->
	
	<!--add loading indicator while the app is being loaded-->
	<div id="logo-transition" class= "slide1"><img class = "logoTransition" style="height: 120px; width:120px;" src="images/vision_logo.png"></div>
	<div id = "loading-message-cont" class="loading-message-cont">
		
		<div id = "welcome-loader" class="welcome-loader" style="display:none">
		   <div id = "loadingMsg" class = "msgDiv"></div>
		   <img class= "loader-size" src="images/loading.svg" />		   
		</div>
	</div>
	<script>
		
	</script>
	
    <script type="text/javascript" language="javascript" src="js/E12Intro.js"></script>
    <script type="text/javascript" language="javascript" src="js/Communicate.js"></script> 
    <!-- Added by Chetan Mahajan on 2-Jul-2015 [For dashboard report] Start -->
    
    <!--Start Import for AM Chart API By Varsha V. on date 04-11-2017-->
	<script type="text/javascript" language="javascript" src="amcharts/amcharts.js"></script>
	<script type="text/javascript" language="javascript" src="amcharts/serial.js"></script>
	<script type="text/javascript" language="javascript" src="amcharts/pie.js"></script>
	<script type="text/javascript" language="javascript" src="amcharts/plugins/export/export.min.js"></script>
	<link rel="stylesheet" href="amcharts/plugins/export/export.css" type="text/css" media="all" />
	<script type="text/javascript" language="javascript" src="amcharts/themes/light.js"></script>
  <!--End Import for AM Chart API By Varsha V. on date 04-11-2017-->
        
    <script type="text/javascript" language="javascript"	src="FusionChart/js/BuildChart.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/FusionCharts1.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/fusioncharts1.powercharts.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/JS/FusionCharts.js"></script>
	<script type="text/javascript" language="javascript" src="js/updateCalDBR.js"></script> 
    <!-- Added by Chetan Mahajan on 2-Jul-2015 [For dashboard report] End -->
     <!--Start Import for Bubble Chart using chart.js API By Dhanendra on date 16-01-2017-->
	<script type="text/javascript" language="javascript" src="FusionChart/js/BubbleChart.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/Chart.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/Chart.bundle.js"></script>
	<script type="text/javascript" language="javascript" src="FusionChart/js/utils.js"></script>
	<!--End Import for Bubble Chart using chart.js API By Dhanendra on date 16-01-2017-->
     <!-- Added By Ajinkya Gopalkar on 16-FEB-15 [ choose image from gallery ]                                        -->
    <script type="text/javascript" language="javascript" src="/ibase/planner/E12Calendar/E12Calendar.nocache.js"></script>
   
   <!--Cahnged by Pooja S on [31-12-2018] to delete the cache of browser --> 
   <script type="text/javascript" language="javascript" src="e12ria/e12ria.nocache.js?"+(new java.util.Date()).toLocaleString()></script>
   
    <!-- Added by Reema on 13/06/14[change password]-->
    <script type="text/javascript" language="javascript" src="js/sha256.js"></script>
    <script type="text/javascript" language="javascript" src="js/checkPassword.js"></script>
    
    <script type="text/javascript" language="javascript" src="js/fileApi.js"></script>
    <!-- Added by Reema on 13/06/14[change password]-End -->
    <!-- Added by Sagar B for custom time box impl[10-01-2020]START-->
    <script type="text/javascript" src="js/jquery.plugin.min.js"></script> 
	<script type="text/javascript" src="js/jquery.timeentry.min.js"></script>
    <!-- Added by Sagar B for custom time box impl[10-01-2020]END-->
	<!-- <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script> -->
	
	<!-- Added by Pankaj T. on 25-06-19 As per suggested by Danish sir read google map MAP_API_KEY from ibase.xml - start -->
	<%
	System.out.println("In BaseE12.jsp CommonConstants.MAP_API_KEY["+CommonConstants.MAP_API_KEY+"]");
	if( !"".equals( CommonConstants.MAP_API_KEY ) )
	{
		System.out.println("In BaseE12.jsp CommonConstants.MAP_API_KEY is not null");
	%>
		<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<%=CommonConstants.MAP_API_KEY%>"></script>
	<%
	}
	else
	{
		System.out.println("In BaseE12.jsp CommonConstants.MAP_API_KEY is null");
	}
	%>
	<!-- Added by Pankaj T. on 25-06-19 As per suggested by Danish sir read google map MAP_API_KEY from ibase.xml - end -->
	
    <script type="text/javascript" src="js/mapProvider.js"></script>
    <script type="text/javascript" src="js/richmarker.js"></script>
    
    <script type="text/javascript" src="js/headroom.js"></script>

  	<!--Added by Sonam K on 26-Feb-19 [Integration of SignaturePad component in ContentPlugin] START -->
     <script type="text/javascript" src="js/signaturePad.js"></script>
     <script type="text/javascript" src="js/signaturePadApp.js"></script>
     <!--Added by Sonam K on 26-Feb-19 [Integration of SignaturePad component in ContentPlugin] END-->


    <!-- Added by Sagar B. to bypass authentication for google maps api[08/11/17]START -->
    <!-- Added by samadhan for my places angular plugin -->
    <!-- <script type="text/javascript" src="angplugin/ang-plugins.js"></script> -->
    
    <!-- Added by Prasad on 23/11/19 [to display all console] START -->
    <%
    String ibaseDebugLevel = ibase.utility.E12GenericUtility.checkNull(CommonConstants.DEBUG_LEVEL);
	ibaseDebugLevel = "".equals( ibaseDebugLevel ) ? "0" : ibaseDebugLevel;
	int ibaseDebugLev = Integer.parseInt(ibaseDebugLevel);
	
	if ( ibaseDebugLev != -1 ) //For Developer use
	{
    %>
   	<!-- Added by Sagar B. to remove all consoles by script[23-Oct-18]START -->
   	<!-- Need to comment this script to view all consoles -->
   	<script>
	  setTimeout(function(){
	  	console.log = function(){};
	  	document.getElementById("e12ria").contentWindow.console.log = function(){};
	  }, 5000); 
	</script>
	<!-- Added by Sagar B. to remove all consoles by script[23-Oct-18]END -->
	
	<%
	}
	%>
	<!-- Added by Prasad on 23/11/19 [to display all console] END -->
    <!-- <script type="text/javascript">
	    var target = document.head;
	    var observer = new MutationObserver(function(mutations) {
	        for (var i = 0; mutations[i]; ++i) { // notify when script to hack is added in HTML head
	            if (mutations[i].addedNodes[0].nodeName == "SCRIPT" && mutations[i].addedNodes[0].src.match(/\/AuthenticationService.Authenticate?/g)) {
	                var str = mutations[i].addedNodes[0].src.match(/[?&]callback=.*[&$]/g);
	                if (str) {
	                    if (str[0][str[0].length - 1] == '&') {
	                        str = str[0].substring(10, str[0].length - 1);
	                    } else {
	                        str = str[0].substring(10);
	                    }
	                    var split = str.split(".");
	                    var object = split[0];
	                    var method = split[1];
	                    window[object][method] = null; // remove censorship message function _xdc_._jmzdv6 (AJAX callback name "_jmzdv6" differs depending on URL)
	                    //window[object] = {}; // when we removed the complete object _xdc_, Google Maps tiles did not load when we moved the map with the mouse (no problem with OpenStreetMap)
	                }
	                observer.disconnect();
	            }
	        }
	    });
	    var config = { attributes: true, childList: true, characterData: true }
	    observer.observe(target, config);
    </script> -->
    
    <script language="JAVASCRIPT">
	console.log("In script tag");
	var action = '<%=action%>';
	var userCode = '<%=userCode%>';
	var macAddress = '<%=macAddress%>';
	console.log("action in BaseE12.jsp:["+action+"]");
	console.log("userCode in BaseE12.jsp:["+userCode+"]");
	console.log("macAddress in BaseE12.jsp:["+macAddress+"]");
	if( "BROWSERLOGIN" == action )
	{
		console.log("action in if BaseE12.jsp:["+action+"]");
		//Change by shrutika on 24-04-2020 [Start] for IE11 related issue
		 var isIE =  !!document.documentMode;
		if( isIE == false )
		{
			createIndexedDBTable();
		}
		//Change by shrutika on 24-04-2020 [End] for IE11 related issue
	}
	
	function createIndexedDBTable()
	{
		console.log("In createIndexedDBTable userCode:["+userCode+"]");
		console.log("In createIndexedDBTable mac address:["+macAddress+"]");
		try
		{
			// This works on all devices/browsers, and uses IndexedDBShim as a final fallback 
			var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
	
			// Open (or create) the database
			var open = indexedDB.open("UUIDDatabase", 1);
	
			open.onerror = function(event) 	{
				console.log("Failed to open database in createIndexedDBTable");
			}
			
			// Create the schema
			open.onupgradeneeded = function() {
				console.log("In onupgradeneeded");
			    var db = open.result;
			    var store = db.createObjectStore("StoreUUID", {keyPath: "id"});
			};
	
			open.onsuccess = function() {
			    // Start a new transaction
			    var db = open.result;
			    var tx = db.transaction("StoreUUID", "readwrite");
			    var store = tx.objectStore("StoreUUID");
	
			    // Query the data
			    store.put({id: userCode, uuid: macAddress});
			    console.log("after put uuid");
			    var getUUID = store.get(userCode);
			    getUUID.onsuccess = function() {
			    	
			    	console.log("cache uuid for user "+userCode+" result:["+getUUID.result+"]");
			    	if( getUUID.result != null )
			    	{
			    		console.log("result is not null");
				    	var uuid = checkNull(getUUID.result.uuid);
				        console.log("cache uuid for user "+userCode+":["+uuid+"]");
				        console.log("cache uuid for user "+userCode+" length:["+uuid.length+"]");
			    	}
			    	else
			    	{
			    		console.log("result is null");
			    	}
			    };
			    getUUID.onerror = function() {
			    	console.log("Failed to getting uuid");
			    };
	
			    // Close the db when the transaction is done
			    tx.oncomplete = function() {
			        db.close();
			    };
			}
			
			open.onblocked = function(event) {
				console.log("Your database version can't be upgraded because the app is open in createIndexedDBTable:["+event+"]");
			}
		}
		catch( e )
		{
			console.log("Unable to open IndexedDB Exception in createIndexedDBTable:["+e+"]");
		}
	}
	
	function checkNull(val)
	{
		var value = val + "";
		if( value == null || value == undefined || value === "undefined")
		{
			value = "";
		}
		return value.trim();
	}
	</script>
    <!-- Added by Sagar B. to bypass authentication for google maps api[08/11/17]END -->
    
    <!-- Added by Prasad on 26/08/15 [for Survey] START -->
	<script language="Javascript" type="text/javascript" src='js/jquery-ui-1.10.4.custom.min.js'></script>
	<script language="Javascript" type="text/javascript" src='js/jquery-ui-slider-pips.js'></script>
	<script language="Javascript" type="text/javascript" src='js/jquery.ui.touch-punch.js'></script>
	<script language="Javascript" type="text/javascript" src="js/SurveyScript.js"></script>
	<!-- Added by Prasad on 26/08/15 [for Survey] END -->
	<!-- Added by Sandeep on 17/11/16 [for multiple layout] Start -->
	<script type="text/javascript" language="javascript" src="js/customFormat.js"></script>
	<!-- Added by shrutika on 04-12-202 [Start] added new format ITEM_CODE to draw attributes dynamically according to item_code/item_type -->
	 <script type="text/javascript" language="javascript" src="js/itemCodeFormat.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.knob.min.js"></script>
	<script type="text/javascript" language="javascript" src="js/jRate.min.js"></script>
	<script type="text/javascript" language="javascript" src="js/insignia.js"></script>
	<script type="text/javascript" language="javascript" src="js/multiInput.js"></script>		<!-- Added by Sagar B. for new format multiInput -->
	<script type="text/javascript" language="javascript" src="js/sample.js"></script>
	<script type="text/javascript" language="javascript" src="js/bipolarMap.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.timepicker.js"></script>
	<script type="text/javascript" language="javascript" src="js/injectDynamicCSSAndJSFile.js"></script>
	<!-- Added by Abhishek T on 03-Mar-17 [For using WHMap format] START -->
	<script type="text/javascript" language="javascript" src="js/WHMap.js"></script>
	<!-- Added by Abhishek T on 03-Mar-17 [For using WHMap format] END -->
	<!-- Added by Sandeep on 17/11/16 [for multiple layout] End -->
	<!-- Added by Pooja.S on[2-Nov-2018] for Autocomplete SearchBox with Jsondata Start -->
	<script type="text/javascript" language="javascript" src="js/map.js"></script>
	<!-- Added by Pooja.S on[2-Nov-2018] for Autocomplete SearchBox with Jsondata End -->
	<!-- Added by Abhishek for use WebSocket START -->
	<script type="text/javascript" language="javascript" src="js/websocket.js"></script>
	<!-- Added by Abhishek for use WebSocket END -->
	
	<!-- Added by Santosh on 02/02/2017 to link TransFlow JS and CSS [START]-->
	<script type="text/javascript" language="javascript" src="/ibase/webitm/js/E12TransFlow.js"></script>
	<script type="text/javascript" language="javascript" src="/ibase/webitm/js/E12TagActionLinks.js"></script>
	<script type="text/javascript" language="javascript" src="/ibase/webitm/js/e12PluginWrapper.js"></script>
	<script type="text/javascript" language="javascript" src="/ibase/webitm/js/ClipBoard.js"></script>
    <script type="text/javascript" language="javascript" src="/ibase/webitm/js/validateAttInput.js"></script>
	
	<script language="Javascript" type="text/javascript" src="js/materialize.min.js"></script>
	<!-- Added by Sandesh - For Recent Activity START -->
	<script type="text/javascript" src="js/e12storage.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.datetimepicker.full.js"></script>
	<script type="text/javascript" language="javascript" src="js/datetimefield.js"></script>	
	<!-- Added by sunny soni for showing datetime calender [start]-->
	<script type="text/javascript">
	<!-- Added by shrutika on 17-07-17 for Call Report Status menu issue -->
	if (! window.GlobalVar) window.GlobalVar = ''; 
	
	 function includeJavascriptFile(srcFile) {
	    if( srcFile == null || srcFile == 'undefined' || srcFile.trim() == '' )
	    {
		    return;
	    }
	    var lastPos = srcFile.lastIndexOf( "/" );
	    var fileName = srcFile.substring( lastPos+1, srcFile.length );
	    var fileType = fileName.substring( fileName.lastIndexOf( "." )+1, fileName.length ); 
	    if( ! isFileIncluded( fileName, fileType ) )
	    {
		console.log("=====Included File is ["+srcFile+"]");
		if (document.createElement && document.getElementsByTagName) {
			var head_tag = document.getElementsByTagName('head')[0];
			var script_tag = document.createElement('script');
			script_tag.setAttribute('type', 'text/javascript');
			script_tag.setAttribute('src', srcFile);
			head_tag.appendChild(script_tag);
			//Added by Sagar M.30-1-19[For Next button dissable]
			script_tag.onerror = function() {
			  console.log('There is an error to inject file!');
			  removeJSCSSFile('dummy_local.js','js');
			  includeJavascriptFile( '/ibase/webitm/js/dummy_local.js' );
			}
			//Added by Sagar M.30-1-19[For Next button dissable]
		}
	    }
	 }
	 function isFileIncluded(filename, filetype)
	  {
	      var returnVal = false;
	      var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" //determine element type to create nodelist from
	      var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none" //determine corresponding attribute to test for
	      var allsuspects=document.getElementsByTagName(targetelement)
	      for (var i=allsuspects.length; i>=0; i--) //search backwards within nodelist for matching elements to remove
	      { 
		      if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1)
		      {
			  returnVal = true;
			  break;
		      }
	      }
		  return returnVal;
	  }
	 
	 /* Added by Sandeeep S Start */
	  function filterJSON(jsonToFilter,expressionToFilter,callback)
	     {
			var filterJson = [];
			var jsonString = JSON.parse(jsonToFilter);
			jsonString.DETAILS.filter(function(value) {
				if (eval(expressionToFilter)) {
					filterJson.push(value);
				}
			});
			console.log('filterJson ==> ' + JSON.stringify(filterJson));
			callback(JSON.stringify(filterJson));
		 }
	  /* Added by Sandeeep S End */

	</script>
	<!-- Added by Sandesh For Recent Activity End -->
	<!-- Added by Varsha V For adding export to excel function -->
	<script type="text/javascript">
		function exportExcel(id)
		{
		var divId = document.getElementById(id).parentNode.id;
		var htmldata = $('#'+divId+'').html();
		document.getElementById("data").value=htmldata;
		document.getElementById("myForm").action = "/ibase/E12BROWSER/jsp/ExcelExport.jsp";
		document.getElementById("myForm").submit(); 
		}
	</script>
	<!-- Ended by Varsha V For adding export to excel function -->
	<!-- Added by Abhishek T on 26-12-16 [For use cropper js plugin] START -->
	<script type="text/javascript" src="js/cropper.min.js"></script>
	<script type="text/javascript" language="javascript" src="js/datepicker.js"></script>
	<!-- Added by Pratheek on 18/03/19 [for site_code format in reports added new option in listBox site_code_range] -->
	<script type="text/javascript" language="javascript" src="js/multipleSiteCodeField.js"></script>
<script>
   function HashMap()
   {
     this.map = {};
   }

   HashMap.prototype =
   {
     put : function(key, value)
     {
   		this.map[key] = value;
     },
     
     get : function(key)
     {
   		return this.map[key];
     },
     
     contains : function(key)
     {
	   	for (var k in this.map)
	   	{
	   	  if (this.map.hasOwnProperty(k) && key === k)
	   		return true;
	   	}
   	
   		return false;
     }
     
   };
   
   var introMap = new HashMap();
  // introMap.put('trv_fare','');
   
   var wrkInItMap = new HashMap();
   //wrkInItMap.put('refId','362E000873');
   //wrkInItMap.put('refSeries','T-EXP');
   introMap.put('workFlwInIt',wrkInItMap);
   introMap.put('wrk_objName','');
   
</script>
	<SCRIPT type="text/javascript">
	    setE12Navigator('<%=userLocale%>', '<%=dispDateFormat%>', '<%=applDateFormat%>'); 
		window.history.forward();
		function noBack() { 
			window.history.forward(); 
		}
		var minPwdLen = <%=minPwdLength%>;
	</SCRIPT>
	<script>
		//Added by Ajinkya Darvesh on 23-06-17 for [disable F5 reloading]-start
		function disableF5(e) 
		{
  			if ( (e.which || e.keyCode) == 116 )
  			{
	  			alert("Please do not refresh the page. It would reload the application and all changes would be lost.");
      			e.preventDefault();
  			}
		}

		$(document).ready(function(){
			
    		$(document).bind("keydown", disableF5);    
		});
		//Added by Ajinkya Darvesh on 23-06-17 for [disable F5 reloading]-end	
	</script>
	<script type="text/javascript" language="javascript" src="js/l10n.min.js"></script>
	<script type="text/javascript" language="javascript" src="js/json2.min.js"></script>
    <script type="text/javascript" language="javascript" src="js/locale.js"></script>

  <%
  
	String isTNCInitiated = (String)session.getAttribute( "IS_TNC_INITIATED" );
	System.out.println("In BaseE12.jsp IS_TNC_INITIATED["+isTNCInitiated+"]");

	String isClearCache = (String)session.getAttribute( "CLEAR_CACHE" );
	System.out.println("In BaseE12.jsp CLEAR_CACHE["+isClearCache+"]");

	String allowChgAccount = (String)session.getAttribute( "ALLOW_CHG_ACCOUNT" );
	System.out.println("In BaseE12.jsp ALLOW_CHG_ACCOUNT["+allowChgAccount+"]");
	
	%> 
	
		
    	
	<div id="loading" style="display: none;">
		<div id="WelcomeHDR">Please wait ...</div>
		<div id="userID"><%=userInfo.getLoginCode().trim()%></div>
		   <!-- Added by Reema on 13/06/14[change password] -->
		<%-- <div id="loginPwd" style="display: none;"><%=userInfo.getLoginPwd().trim()%></div> --%>
		   <!-- Reema-End -->
		<div id="profileID"><%=userInfo.getProfileId().trim()%></div>
		<div id="applnName" class="hiddenDiv">SFA</div>
		<div id="welcomeMsg"></div>
		<div id="empDesignation"><%=checkNull( userInfo.getDesignation() )%></div>
		<div id="empDivision"><%=checkNull( userInfo.getDivision() )%></div>
		<div id="empHeadQuat"><%=checkNull( userInfo.getStanCode() )%></div>
		<div id="empDOJ"><%=checkNull( userInfo.getDateJoin() )%></div>
		<div id="empName"><%=checkNull( userInfo.getEmpName() )%></div>
		<div id="empCode"><%=checkNull( userInfo.getEmpCode() )%></div>
		
		<!-- Added by Dnyaneshwar Chavan on 30-Oct-14 [Change password required first, middle and last names ] Start -->
		<div id="empFName"><%=checkNull( userInfo.getEmpFName() )%></div>
		<div id="empMName"><%=checkNull( userInfo.getEmpMName() )%></div>
		<div id="empLName"><%=checkNull( userInfo.getEmpLName() )%></div>
		<div id="empLName"><%=checkNull( userInfo.getEmpLName() )%></div>
		<!-- Added by Sanket Jagtap on 04-Aug-17 [Change password for user] -->
		<div id="userType"><%=checkNull( userInfo.getUserType())%></div> 
		<div id="userName"><%=checkNull( userInfo.getUserName())%></div> 
		<div id="userLanguage"><%=checkNull( userInfo.getUserLanguage() )%></div>
		<div id="userCountry"><%=checkNull( userInfo.getUserCountry() )%></div>
		<!-- Added by Dnyaneshwar Chavan on 30-Oct-14 [Change password required first, middle and last names ] Start -->
		
		<div id="deptCode" class="hiddenDiv"><%=checkNull( userInfo.getDeptCode() )%></div>
		<div id="siteCode" class="hiddenDiv"><%=checkNull( userInfo.getSiteCode() )%></div>

		<!-- Added by shrutika on 01-02-18[Start] for set site description and city in case of first time login and change site -->
		<div id="siteDescr" class="hiddenDiv"><%=checkNull( userInfo.getSiteDescr() )%></div>
		<div id="city" class="hiddenDiv"><%=checkNull( userInfo.getCity() )%></div> 
		<!-- Added by shrutika on 01-02-18[End] for set site description and city in case of first time login and change site -->
		<!-- Added by shrutika on 14-02-18 for set fin_entity in case of first time login and change site -->
		 <div id="fin_entity" class="hiddenDiv"><%=checkNull( userInfo.getFin_entity() )%></div> 
		 <!-- Added by Pratheek on 11-02-19 for set facility_code in case of first time login and change site -->
		 <div id="facility_code" class="hiddenDiv"><%=checkNull( userInfo.getFacility_code() )%></div>  
		<div id="entityCode" class="hiddenDiv"><%=checkNull( userInfo.getEntityCode() )%></div>
		<div id="itemSer" class="hiddenDiv"><%=checkNull( userInfo.getItemSer() )%></div>
		<div id="userLevel"><%=checkNull( userInfo.getUserLevel() )%></div>
		<div id="APPL_NAME" class="hiddenDiv">SFA</div>
		<!-- Changed by nikita on 12-Apr-17 [Date format should be as per the definition, it must read from DateFormat.xml] -->
		<div id="dbDateFormat" class="hiddenDiv"><%=checkNull( genericUtility.getDBDateFormat() )%></div>
		<div id="dispDateTimeFromat" class="hiddenDiv"><%=checkNull( genericUtility.getDispDateTimeFormat() )%></div>
		<div id="dispDate" class="hiddenDiv"><%=checkNull( genericUtility.getDispDateFormat() )%></div>
		<div id="applDate" class="hiddenDiv"><%=checkNull( genericUtility.getApplDateFormat() )%></div>
		<div id="userTheme" class="hiddenDiv"><%=checkNull( userInfo.getUserTheme() ).trim().toLowerCase()%></div>
		<!--Added by Amol Sant on 18-06-17[To get userName]  -->
		<div id="userName" class="hiddenDiv"><%=checkNull( userInfo.getUserName()).trim().toUpperCase()%></div>
		<!-- //Added by Vishal Pathare on 2-AUG-2016 for[changing dependancy of theme from <user_theme> to <ux_Interface>]  -->
		<div id="uxInterface" class="hiddenDiv"><%=checkNull( userInfo.getUxInterface() ).trim()%></div>
		<div  class="hiddenDiv" id="LoginMode">BaseE12</div>
		<div  class="hiddenDiv" id="callerInterface">BROWSER</div>
		<div id="WelcomeFOOT">While the Vision application is loading</div>
	    <div class="loading-indicator"></div>
		<div id="isTNCInitiated"  class="hiddenDiv"><%=isTNCInitiated%></div>
		<div id="isClearCache"  class="hiddenDiv"><%=isClearCache%></div>
		<div id="allowChgAccount"  class="hiddenDiv"><%=allowChgAccount%></div>
		<div id="profileDescr"  class="hiddenDiv"><%=checkNull( userInfo.getProfileDescr() ).trim()%></div>
		<div id="applDateTime" class="hiddenDiv"><%=checkNull( genericUtility.getApplDateTimeFormat() )%></div>
		<!-- Added by Ajinkya on 16-Sep-15 [ To configure geolocation]  -->
		<%-- <%System.out.println("CommonConstants.GEOPOS_ENABLE["+CommonConstants.GEOPOS_ENABLE+"]"); %>
		<div id="enableGeoPosition"  class="hiddenDiv"><%=CommonConstants.GEOPOS_ENABLE%></div> --%>
		<%System.out.println("userInfo.getGeoPosOption() ["+userInfo.getGeoPosOption()+"]"); %>
		<div id="enableGeoPosition"  class="hiddenDiv"><%=userInfo.getGeoPosOption()%></div>
		<!-- Added by Shivaji on 27-May-2015 [ To add tag line]-Start -->
		<div id="tagLine"  class="hiddenDiv"></div>
		<!-- Added by Shivaji on 27-May-2015 [ To add tag line]-End  -->
		<!-- Added by Sandeep S. on 25-07-17 [To implement delete cache in browser] -->
		<div id="buildNO"  class="hiddenDiv"><%=CommonConstants.BUILD_NO%></div>
		<!-- Added by Pravin K on 11-8-17 [To hide social icon] START -->
		<div id="featureOptions"  class="hiddenDiv"><%=CommonConstants.FEATURES%></div> 
		<!-- Added by Pravin K on 11-8-17 [To hide social icon] END -->
		<!-- Added by Samadhan on 18-8-17 [To implement incremental search] -->
		<div id="pageSize"  class="hiddenDiv"><%=CommonConstants.PAGE_SIZE%></div>
		<div id="enterprise" class="hiddenDiv"><%=checkNull( userInfo.getEnterprise() )%></div>
		<div id="social_opt" class="hiddenDiv"><%=checkNull( userInfo.getSocialOpt() )%></div>
		<!-- Added by Pankaj T. on 16-11-18 [for console configuration if 1 then print console only] -->
		<div id="clientDebugLevel"  class="hiddenDiv"><%=CommonConstants.CLIENT_DEBUG_LEVEL%></div>
		<!-- Added By Pankaj T. on 18-11--2020 for removing weak account lock vulnerability - if user wrongly enter password more than 5 times then lock the account and send new password on email/mobile and unlock account using new password -->
		<div id="wrongLoginCount"  class="hiddenDiv"><%=CommonConstants.WRONG_LOGIN_COUNT%></div>
		<!-- Added by sainath T on 11-JUN-19 [For Cross site scripting]-->
		<div id="xssFilter" class = "hiddenDiv"><%=CommonConstants.XSS_FILTER %></div>
		<!-- Added by shrutika on 13-08-19 [Start] for Explore option to be added in home screen and report. -->
		<div id="licenseKey" class="hiddenDiv"><%=CommonConstants.FM_API_KEY%></div>
		<!-- Added by shrutika on 10-10-19 [Start] for avoid server call for getting all user prefrance value. -->
		<div id="userPrefList" class="hiddenDiv"><%=checkNull( userInfo.getUserPrefList() )%></div>
		<!-- Added by sunny soni for getting current and upto Row Number for lazy loading in workflow -->
		<div id="uptoRowNum" class="hiddenDiv"><%=CommonConstants.uptoRowNum%></div>
        <!-- by Pankajt T on 14-09-2020 for The user icon which shows detail information about user should also show Login using User id/Mobile/email and user_id/mobile/email value -->
        <div id="authenticatedUsing"><%=checkNull( userInfo.getAuthenticatedUsing() )%></div>
	</div>
   <!-- Added by Sadique S on 12/03/2021 [sub form implementation in table view] -->
   <div id="tooltipSubformId" class="subFormTableViewTooltip" style="display: none;"></div>
   <div class="hiddenDiv" id="hk_next">52</div> 
   <div class="hiddenDiv" id="hk_prev">50</div>
   <div class="hiddenDiv" id="hk_finish">51</div>
	<%
	//Changes By Ajinkya Gopalkar on 13-OCT-15[for configure loadingPage jsp]
	if ( "true".equalsIgnoreCase(setLoading) )
	{
	%>
		 <%@ include file="LoadingPage.jsp"%>
	<%
	}
	%>
	
    <!-- OPTIONAL: include this if you want history support -->
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
    <!-- Added By Pankaj T. on 14-03-19 for calculate running total using expression & display in footer -->
    <iframe src="" id="summaryIframe" style="display:none;width:0;height:0;border:0"></iframe>
    <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
    <noscript>
    <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px;">

        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>
    
    <!-- Added by Reema on 18-feb-15[set previous className on mouseout] -->
    <script type="text/javascript">
//      Commented by Reema on 1-Oct-15 [Move JQuery to E12MenuItem class]
    	/* var prevAnchor = new Object(),
		setPrevAnchor = function(className, propValue)
		{
			prevAnchor.className = className;
			prevAnchor.propValue = propValue;
		},
		resetPrevAnchor = function()
		{
			 var $prevAnchor = $('body').find('.' + prevAnchor.className);
			 $prevAnchor.attr('style', prevAnchor.propValue);
		};*/
// 		Commented by Reema on 1-Oct-15 [Move JQuery to E12MenuItem class]-End
// 	   <!-- Added by Savita Yadav on 25-03-15 [To set focus on searchBox using Alt+f key]-Start -->
	   window.document.onkeydown = function(event) 
	   {
	        if (window.event.altKey && (window.event.keyCode == 70)) //Alt+f blocked.
	        {
	        	window.event.preventDefault();
	        	console.log("On keydown");
		  		document.getElementById('searchBox').focus();
	            return false;
	        }
	    }; 
// 	    <!-- Added by Savita Yadav on 25-03-15 [To set focus on searchBox using Alt+f key]-End -->
		
// 	    <!-- Added by Prasad on 28/07/15 [for css level changes in mail] -Start -->
	    $(document)
	    .on('focus.textarea', '.mailTextArea', function() {
	      var savedValue = this.value;
	      this.value = '';
	      this.baseScrollHeight = this.scrollHeight;
	      this.value = savedValue;
	    })
	    .on('input.textarea', '.mailTextArea', function() {
	      var minRows = this.getAttribute('data-min-rows') | 0,
	        rows;
	      this.rows = minRows;
	      console.log(this.scrollHeight, this.baseScrollHeight);
	      rows = Math.ceil((this.scrollHeight - this.baseScrollHeight) / 17);
	      this.rows = minRows + rows;
	    });
// 	    <!-- Added by Prasad on 28/07/15 [for css level changes in mail] -END -->
		// Added by Reema on 16-Dec-15 [for approve Reject transaction]-Start
		function call2ApproveReject(id)
		{
			try 
			{
				console.log('BaseE12 id '+id);
				//window.frames['signPage'].document.getElementById(id).click();
				var frame = window.document.body.querySelector("iframe[name=signPage]");
				var frameDoc = frame.contentDocument;

				var button = frameDoc.getElementById(id);
				if (button && button.click)
				{
					button.click();
				}
				console.log('Done workflow');
			}
			catch (e)
			{
				console.log(e.message);
			}
		}
		// Added by Reema on 16-Dec-15 [for approve Reject transaction]-End
		//Added by Prasad on 12/12/17 [open upload socket] START
		function openUploadSocket()
		{
			//var wnd = (window.opener && window.opener.top) || window.top;
			var socket = null;
			var loginCode = "<%=userInfo.getLoginCode().trim()%>";
			if ( window.opener && window.opener.top )
			{
				socket = window.opener.top.wsapi.WebSocketWrapper.getWebSocketWrapperObjectByName("upload");
			}
			else if ( window.top )
			{
				socket = window.top.wsapi.WebSocketWrapper.getWebSocketWrapperObjectByName("upload");
			}
			console.log( "Socket ["+ socket +"]" );

			if ( ! socket ) 
			{
				console.log("Socket not found, creating new !");
				if ( window.opener && window.opener.top )
				{
					socket = new window.opener.top.wsapi.WebSocketWrapper( window.opener.top.location.origin, loginCode, "upload" );
				}
				else if ( window.top )
				{
					socket = new window.top.wsapi.WebSocketWrapper( window.top.location.origin, loginCode, "upload" );
				}
				//socket = new wnd.wsapi.WebSocketWrapper(wnd.location.origin, loginCode, "upload");
				console.log("New Socket", socket);
				socket.onOpen = function() {
					console.log("Socket opened !");
				};
				socket.open();
			}
			else socket.onMessage = {};
		}
		openUploadSocket();
		//Added by Prasad on 12/12/17 [open upload socket] END
		</script>
    <!-- Added by Reema on 18-feb-15[set previous className on mouseout]-End -->
    <!-- Added by Priyanka B 8-June-18 Start -->
        <proteus-components></proteus-components>
    <!-- Added by Priyanka B 8-June-18 End -->
    <!-- Added Nilesh Gunjal for subform pophelp Start ::03-01-19 -->
	<script>
	function formatDate(date)
	{
	  	var dateStr='';
	    console.log('***Date in  formatDate>>>>',date);
	    if(date.indexOf('/') > -1)
	    {
	        var splitDate =date.split("/");
	        var firstdate= splitDate[0];
	        var month= splitDate[1];
	        dateStr=month+'/'+firstdate+'/'+splitDate[2];
	        console.log('updated formatDate::: :',dateStr);
	    }
	    else
	    {
	        var splitDate =date.split("-");
	        var firstdate= splitDate[0];
	        var month= splitDate[1];
	        dateStr=month+'-'+firstdate+'-'+splitDate[2];
	        console.log('updated formatDate>>>>',dateStr);
	    }
	       return new Date( dateStr ).getTime();
	}

	//Added by Sadique S on 12/03/2021 [sub form implementation in table view] START
    function subFormOnMouseOver( tableSubFormEle, event )
	{
		try 
		{
			var divId = tableSubFormEle.getAttribute( 'mouseEventId' );
			if ( document.getElementById( 'tooltipSubformId' ) != null ) 
			{
				if ( document.getElementById( divId ) != null ) 
				{
					var tooltipData = document.getElementById( divId ).innerHTML;
                    if ( tooltipData.length > 0 ) 
					{
                        var d = document.getElementById( 'tooltipSubformId' );
                        d.style.position = "absolute";
                        var x_pos = event.clientX;
                        var y_pos = event.clientY;

                        d.style.left = x_pos + 'px';
                        d.style.top = y_pos + 'px';
                        d.className = "subFormTableViewTooltip";

                        if ( tooltipData.includes( "HTMLSpanElement" ) ) 
                        {
                            console.log('subFormOnMouseOver');
                        }
                        else 
                        {
                            document.getElementById( 'tooltipSubformId' ).innerHTML = getHTMLObj(tooltipData);
                            document.getElementById( 'tooltipSubformId' ).style.display = "block";
                        }

                        /*mySpanElement.setAttribute("style", "visibility: hidden;display: block;");
                        final int left = vertEle.getAbsoluteLeft();
                        final int top =  vertEle.getAbsoluteTop();
                        final int height = Window.getClientHeight();
                        final int width = Window.getClientWidth();
                        int spanTop =  top - mySpanElement.getOffsetHeight() - 7;
                        int spanLeft =  width - mySpanElement.getOffsetWidth();
                        if( top >= (height/2) && left >= (width/2))
                        {
                            E12CommonUtils.printOnConsole("spanTop["+spanTop+"]");
                            int leftValue =  left - (mySpanElement.getOffsetWidth() / 2) ;
                            mySpanElement.setAttribute("style", "position : fixed;top :"+spanTop+"px;left : "+leftValue+"px;visibility: visible;");
                        }
                        else if(top > (height/2) && left < (width/2))
                        {
                            E12CommonUtils.printOnConsole("Else "+ height/2);
                            mySpanElement.setAttribute("style", "position : fixed;top :"+spanTop+"px;left : "+left+"px;visibility: visible;");
                        }*/
                    }
				}
			}
		}
		catch (e) 
		{
			console.log("Error subFormOnMouseOver msg: " + e);
		}
	}

	function subFormOnMouseOut( tableSubFormEle ) 
	{
		try 
		{
			var divId = tableSubFormEle.getAttribute( 'mouseEventId' );
			if (document.getElementById( 'tooltipSubformId' ) != null) 
			{
				var d = document.getElementById( 'tooltipSubformId' );
				d.className = "";
				document.getElementById( 'tooltipSubformId' ).innerHTML = "";
				document.getElementById( 'tooltipSubformId' ).style.display = "none";
			}
		}
		catch (e) 
		{
			console.log("Error subFormOnMouseOut msg: " + e);
		}
	}

    function getHTMLObj(htmlStr) 
    {
        var span = document.createElement('span');
        span.innerHTML = htmlStr;
        var decoded = span.firstChild.nodeValue;
        span.remove();
        return decoded;
    }
    //Added by Sadique S on 12/03/2021 [sub form implementation in table view] END
    
    //Added by Prasad on 23/06/2021 [to prevent scroll to number field] START
    document.addEventListener("wheel", function(event) {
        
        if (document.activeElement.type === "number" && document.activeElement.classList.contains("noscroll")) 
        {
            document.activeElement.blur();
        }
    });
  //Added by Prasad on 23/06/2021 [to prevent scroll to number field] END
	</script>
	<!-- Added Nilesh Gunjal for subform pophelp End ::03-01-19 -->
	<!-- Changed by Prasad on 18/12/2020 [for angular9 related implementation, changing the import as per updated angular] START -->
    <!-- <script type="text/javascript" src="angplugin/polyfills.js"></script>
    <script type="text/javascript" src="angplugin/main.js"></script>
    <script type="text/javascript" src="angplugin/runtime.js"></script> -->
	<!-- <script src="angplugin/polyfills-es5.js" nomodule defer></script>
	<script src="angplugin/polyfills-es2015.js" type="module"></script>
	<script src="angplugin/main-es2015.js" type="module"></script>
	<script src="angplugin/main-es5.js" nomodule defer></script>
    <script src="angplugin/runtime-es2015.js" type="module"></script>
	<script src="angplugin/runtime-es5.js" nomodule defer></script>  -->
	<!-- Changed by Prasad on 18/12/2020 [for angular9 related implementation, changing the import as per updated angular] END -->
	
	<!-- Added by Samruddhi for independent projects [Start]-->	
	<script src="/ibase/Insight/schemaplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/schemaplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/schemaplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/schemaplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/datasourceplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/datasourceplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/datasourceplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/datasourceplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/sharedplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/sharedplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/sharedplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/sharedplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/inmemoryplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/inmemoryplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/inmemoryplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/inmemoryplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/gproplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/gproplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/gproplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/gproplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/genprocessplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/genprocessplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/genprocessplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/genprocessplugin/ang-plugins.js"></script> 
	
	<script src="/ibase/Insight/dashboardpagesplugin/polyfills.js" type="module"></script>
   	<script src="/ibase/Insight/dashboardpagesplugin/main.js" type="module"></script>
   	<script src="/ibase/Insight/dashboardpagesplugin/runtime.js" type="module"></script> 
   	<script type="text/javascript" src="/ibase/Insight/dashboardpagesplugin/ang-plugins.js"></script> 
   
   	<script src="/ibase/Insight/userRightsplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/userRightsplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/userRightsplugin/runtime.js" type="module"></script> 
    <script type="text/javascript" src="/ibase/Insight/userRightsplugin/ang-plugins.js"></script>
    
    <script src="/ibase/Insight/objfollowupactplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/objfollowupactplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/objfollowupactplugin/runtime.js" type="module"></script> 
    <script type="text/javascript" src="/ibase/Insight/objfollowupactplugin/ang-plugins.js"></script>
    
    <script src="/ibase/Insight/dashbdgnplugin/polyfills.js" type="module"></script>
	<script src="/ibase/Insight/dashbdgnplugin/main.js" type="module"></script>
	<script src="/ibase/Insight/dashbdgnplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/dashbdgnplugin/ang-plugins.js"></script>
    
	<script src="/ibase/Insight/managevisplugin/polyfills.js" type="module"></script>
    <script src="/ibase/Insight/managevisplugin/main.js" type="module"></script>
    <script src="/ibase/Insight/managevisplugin/runtime.js" type="module"></script> 
	<script type="text/javascript" src="/ibase/Insight/managevisplugin/ang-plugins.js"></script>
	<!-- Added by Samruddhi for independent projects [End]-->
	
	<!-- Changed by Samruddhi P. on 15/02/2022 [for angular13 related implementation, changing the import as per updated angular] START -->
	<script src="angplugin/polyfills.js" type="module"></script>
    <script src="angplugin/main.js" type="module"></script>
    <script src="angplugin/runtime.js" type="module"></script>
    <!-- Changed by Samruddhi P. on 15/02/2022 [for angular13 related implementation, changing the import as per updated angular] END -->
    
	<script type="text/javascript" src="angplugin/ang-plugins.js"></script>
  </body>
</html>