function getAbsoluteURL(url){ try{ var pathName = window.location.pathname; if(pathName.charAt(0) != "/"){//for IE9 pathName = "/" + pathName; } var context = ""; for(var i=0,len=pathName.length;i 0) { document.getElementById("logwarning").style.display="block"; document.getElementById("showMessage").innerHTML = sErrMsg; //$('#logwarning').delay(3000).fadeOut(100); return false; } else { document.getElementById("logwarning").style.display="none"; document.LOGIN.C_BUSINESS_UNIT.value = rsaEncript(C_BUSINESS_UNIT,publicKey); document.LOGIN.C_USER_ID.value = rsaEncript(C_USER_ID,publicKey); var act = document.LOGIN.action; document.LOGIN.action = getAbsoluteURL("servlets/CEPortalTwoFactorLogin"); document.LOGIN.submit(); ShowLoading(); } }catch(e){ showExcpt("SYS_index", e); } } function rsaEncript(content,publicKey){ var encrypt = new JSEncrypt(); encrypt.setPublicKey(publicKey); var encrypted = encrypt.encrypt(content); return encrypted; } function lowerIEBrowserWarning(){ var browsers = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? browsers.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? browsers.firefox = s[1] : (s = ua.match(/chrome\/([\d.]+)/)) ? browsers.chrome = s[1] : (s = ua.match(/opera.([\d.]+)/)) ? browsers.opera = s[1] : (s = ua.match(/version\/([\d.]+).*safari/)) ? browsers.safari = s[1] : 0; if(browsers.ie == "6.0" || browsers.ie == "7.0"){ var warn = $("
"); warn.attr("title","GENTLE WARNING"); var desc = "Your IE Browser version is "+browsers.ie+". Please upgrade to IE8 or above or another browser(FireFox, Chrome,etc)!"; var msgDesc = $("
"); warn.append(msgDesc); var icon = $("
"); msgDesc.append(icon); msgDesc.append("
"+desc+"
"); warn.dialog({ resizable: false, width: 420, draggable: false, modal: true, buttons: [{ text: "Close", click:function() { $(this).dialog("destroy"); warn.remove(); } }], close: function(event, ui) { $(this).dialog("destroy"); warn.remove(); } }); } } //--> function disableLoadIntoIframe(){ if (top != self){ top.location=self.location; } } function ShowLoading() { var div = document.createElement('div'); var img = document.createElement('img'); //img.src = 'img/spinner.gif'; img.src = getAbsoluteURL("img/spinner_sb.gif"); img.style.cssText = 'width: auto; height: auto; position: absolute; top:0; bottom: 0; left: 0; right: 0; margin: auto;'; //div.innerHTML = "













Please wait.... Page is Loading...
"; div.style.cssText = 'width: 100%; height: 100%; background: rgba(255,255,255,0.6); cursor: default; position: absolute; top:0; bottom: 0; left: 0; right: 0; margin: auto; text-align:center; vertical-align: middle'; div.appendChild(img); document.body.appendChild(div); //return true; } function refreshCaptcha(){ try { var captchaObj = document.getElementById("C_CAPTCHA_IMG"); var captchaParent = captchaObj.parentNode; captchaParent.removeChild(captchaObj); var timestamp = new Date().getTime(); var cImg = document.createElement("img"); cImg.src = "servlets/CaptchaServlet?t="+timestamp; cImg.setAttribute("id", "C_CAPTCHA_IMG"); cImg.setAttribute("name", "C_CAPTCHA_IMG"); cImg.setAttribute("alt", "Refresh Captcha"); cImg.setAttribute("height", "40"); cImg.setAttribute("width", "210"); document.getElementById("captchaDiv").appendChild(cImg); } catch (e) { showExcpt("SYS_index", e); } }