\n'); return result; } function delayCloseWindows(){ alert("Your session expired. Please login again."); closeWindow(); } function startNetrustAuthFn1(){ //setInterval("NetrustAuthFn()",20000); //alert ("startNetrustAuthFn1:"+new Date()); setTimeout("getNetrustStatus()",15000); } function startNetrustAuthFn2(){ //setInterval("NetrustAuthFn()",20000); setTimeout("getNetrustStatus()",2000); } function NetrustAuthFn(CryptoText){ try{ //alert("NetrustAuthFn start:"+CryptoText); document.ACM_LoginForm.signature.value = CryptoText; // alert("CryptoText:"+CryptoText); document.ACM_LoginForm.submit(); } catch (Ex) { //alert("NetrustAuthFn.Ex:"+Ex); var errorPath = "/starsELS/jsp/common/NetrustLoginError.jsp?status=nocomp"; location.href = errorPath; alert("errorPath:"+errorPath); return false; } } function getNetrustStatus(){ var crlDownloadFlagStr = document.getElementsByName("crlDownloadFlagString")[0].value; if("true" == crlDownloadFlagStr ){// true means online module getNetrustStatus_true(); }else{// offline module getNetrustStatus_false(); } } function getNetrustStatus_false() { var loginObjFlag = "F"; var noticeMessage1 = ""; var loginObj = document.getElementById("Login"); var CryptoText = ""; try{ //alert("loginObj "+loginObj); //if(document.Login == null || document.Login =='undefined'){ if (!loginObj){ loginObjFlag = "T"; noticeMessage1 = "Only Internet Explorer supported during Netrust Login. --offline"; alert(noticeMessage1); var errorPath = "/starsELS/jsp/common/NetrustLoginError.jsp?status=IEOnly"; location.href = errorPath; return false; } datatobesigned="ZFWVBvTcQ1_K1d1UxtvWUxz8gg7fKsFGHw3fmVv_4qLZVgzw4L3h!1259873070!-898719453!1716192212188"; if(loginObj.loginStatus()){ CryptoText = loginObj.NetSign_offline(datatobesigned); NetrustAuthFn(CryptoText); }else{ if(""!=loginObj.getMsg()){ CryptoText = loginObj.NetSign_offline(datatobesigned); NetrustAuthFn(CryptoText); }else{ startNetrustAuthFn2(); } } } catch (Ex) { CryptoText = loginObj.NetSign(datatobesigned); NetrustAuthFn(CryptoText); } } function getNetrustStatus_true() { var loginObjFlag = "F"; var noticeMessage1 = ""; var loginObj = document.getElementById("Login"); var CryptoText = ""; try{ //alert("loginObj "+loginObj); //if(document.Login == null || document.Login =='undefined'){ if (!loginObj){ loginObjFlag = "T"; noticeMessage1 = "Only Internet Explorer supported during Netrust Login. --online"; alert(noticeMessage1); var errorPath = "/starsELS/jsp/common/NetrustLoginError.jsp?status=IEOnly"; location.href = errorPath; return false; } datatobesigned="ZFWVBvTcQ1_K1d1UxtvWUxz8gg7fKsFGHw3fmVv_4qLZVgzw4L3h!1259873070!-898719453!1716192212188"; CryptoText = loginObj.NetSign(datatobesigned); NetrustAuthFn(CryptoText); } catch (Ex) { startNetrustAuthFn2(); } } function delayInSeconds(delay) { var date = new Date(); var curDate = null; do { curDate = new Date(); } while(curDate-date < (delay * 1000)); } function closeWindow(){ var isIE = navigator.appName == "Microsoft Internet Explorer"; //alert(isIE); if(isIE){ window.opener = ""; window.open("","_self"); window.close(); } else{ window.close(); } }