var logoutCalled = false; var childWindow,isChildWindow = true; function openLoginWindow(wname){ //var urlToOpen = "hdiits.htm?viewName=login&theme=defaulttheme"; var urlToOpen = "login.jsp"; var mwname = 'IFMS'; if( wname ){ mwname = wname; }else{ var dt = new Date(); mwname = mwname + dt.getMilliseconds(); } var prop = 'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,resizable=no,menubar=no,scrollbars=yes,toolbar=no,location=no,status=no'; childWindow= window.open(urlToOpen, mwname, prop); child.moveTo( 0, 0 ); child.resizeTo(screen.availWidth, screen.availHeight); child.focus(); } window.onbeforeunload = function childClose() { childWindow.close(); } var intervalID = window.setInterval(checkWindow, 500); function checkWindow() { if (childWindow && childWindow.closed) { window.clearInterval(intervalID); var host = window.location.host; window.location.href = "http://" + host +"/IFMS/j_spring_security_logout"; /* if (logoutCalled==false) { alert("Always make proper logout"); } */ } } function parent_disable() { if (childWindow && !childWindow.closed) childWindow.focus(); } function logoutClick() { logoutCalled= true; var host = window.location.host; window.location.href = "http://" + host +"/IFMS/j_spring_security_logout"; if(logoutCalled==true) { window.close(); } } function ajaxfunctionForLogout (ctx){ var url = ctx + '/ifms.htm'; var pars = 'actionFlag=closeApplicationOnLogout'; var myAjax = new Ajax.Request(url,{ method: 'get', parameters: pars }); } // Move From hdiits/web/web-inf/jsp/core/login.jsp. function pause(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } function init() { document.forms[0].j_username.focus(); } /* function startLogin() { if(document.forms[0].btnSubmit.disabled==false) { if (document.forms[0].j_username.value=="") { alert("Please Enter User Name."); document.forms[0].j_username.focus(); return false; } if (document.forms[0].j_password.value=="") { alert("Please Enter Password."); document.forms[0].j_password.focus(); return false; } document.forms[0].btnSubmit.disabled = true ; showProgressbar_login('Signing in...
Please wait...'); window.setTimeout('document.forms[0].submit();',500); } } */ function checkEnter() { var key; if(window.event) key = window.event.keyCode; else key = e.which; if (key==13) { startLogin(); } } function getX() { var maxX; maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) + (document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth); return maxX; } function Browser() { var ua, s, i; var maxX,maxY; this.isIE = false; // Internet Explorer this.isNS = false; // Netscape this.version = null; ua = navigator.userAgent; s = "MSIE"; if ((i = ua.indexOf(s)) >= 0) { this.isIE = true; this.version = parseFloat(ua.substr(i + s.length)); var maxHeight; var d = 0.9616; if (this.version==7) { maxX=getX(); var x=Math.round(maxX/1.65); if (maxX==780) { x=maxX/1.3; } maxHeight = (screen.availHeight)*d; var top = (maxHeight - 564)/2; document.write(""); document.write(""); return; } else if(this.version==6) { maxHeight = screen.availHeight * d; var top = (maxHeight - 564)/2; document.write(""); document.write(""); return; } //document.write("
  "); return; } } function forgotPassword() { showProgressbar_login('Please wait...
Your Request is in Progress.'); var varLocale = ""; var reset = "" ; var submit ="" ; // if(document.forms[0].locale[0].checked == true && document.forms[0].locale[0].checked != 'undefined') varLocale = document.forms[0].locale[0].value; // else varLocale = document.forms[0].locale[1].value; //varLocale = "hi"; varLocale = "en_US"; resetPass = "passwordReset"; submitPass = "submitPass"; document.forms[0].action = "ifms.htm?viewName=acl-enterUserId&locale="+varLocale; //document.forms[0].action = "ifms.htm?viewName=acl-forgotPassword&locale="+varLocale+"&resetPass="+resetPass+"&submitPass="+submitPass; //document.forms[0].action = "ifms.htm?viewName=acl-forgotPassword"; document.forms[0].submit(); } function signData() { try { var data = document.forms[0].loginRandomNumber.value; var TCSSigner1 = document.getElementById('TCSSigner1'); var vSignature = "none"; if(TCSSigner1.setDetached(1)) { if(TCSSigner1.updateData (data)) { if(TCSSigner1.selectSigningCertFromUI()) { vSignature = TCSSigner1.sign(); document.forms[0].loginSignature.value = vSignature; } } } } catch(e) { alert("Error in Digital Signature !" + e.message ); } return vSignature; } function loginWithSignature() { var temp = signData(); if(temp == '') { alert("Please select Certificate to Login."); } else if( temp != "none") { showProgressbar_login('Signing in...
Please wait...'); document.loginForm.action="hdiits.htm?actionFlag=validateLogin"; document.loginForm.submit(); } } function showProgressbar_login(message) { if( !message ) message = 'Please wait
Your Request is in progress...'; disableBackground_login(); var statusBar = document.getElementById('statusbar'); var statusbarwidth = 360; var statusbarheight = 100; statusBar.style.visibility = 'visible'; document.getElementById('statuBarTd1').innerHTML = message; statusBar.style.left = ((document.body.offsetWidth - statusbarwidth)/2)+'px'; var st = document.documentElement.scrollTop; var sh = document.documentElement.scrollHeight; var ch = document.documentElement.clientHeight; statusBar.style.top = (st + ((ch - statusbarheight)/2))+'px'; statusBar.style.top = ( (sh/2) - (statusbarheight/2) )+'px'; } function hideProgressbar_login() { if(document.getElementById('statusbar')!= null) { document.getElementById('statusbar').style.visibility='hidden'; enableBackground_login(); } } function disableBackground_login() { var st = document.documentElement.scrollTop; var sh = document.documentElement.scrollHeight; var ch = document.documentElement.clientHeight; } function enableBackground_login() { } function showPwdSecurityTip() { Tip('Use Virtual Keyboard for
your Password Security.',CLICKCLOSE, true,FIX,[lgnToolTipX,lgnToolTipY], FADEIN,500,BALLOONIMGPATH,'themes/${themename}/images/tooltip/'); } function generateRandomNoForDigiLogin(ctx) { showProgressbar_login('Signing in...
Please wait...'); var ajaxCallURL = ctx + '/hdiits.htm?actionFlag=getRandomNo'; var url_ps = ajaxCallURL; var myAjax = new Ajax.Request(url_ps,{ method: 'get', asynchronous: true, onSuccess: function(transport){ if (200 == transport.status) { populateRandomNoData(transport); } }// transport }); hideProgressbar_login(); } function populateRandomNoData(transport) { var XMLDoc=transport.responseXML.documentElement; var entries = XMLDoc.getElementsByTagName('element'); if( entries.length != 0 ) { document.getElementById("loginRandomNumber").value = entries[0].childNodes[0].text; } else { alert("Random Number is not Generated !!!"); } hideProgressbar_login(); }