function processXML(B){var C="";if(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("success").nodeValue=="0"){C+="Wrong login or password !";if(parseInt(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("wrongLogin").nodeValue)=="1"){alert(C);return }var E=parseInt(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("attemptsLeft").nodeValue);if(E>0){C+="\n"+E+" attempts left before this account will be locked."}if(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("accountLocked").nodeValue=="1"){C+="\nYour user account has been locked following 3 unsuccessful login attempts.\nPlease click on the forgotten password link or contact your Administrator to unlock your account."}if(C!=""){alert(C);document.getElementById("password").value=""}return }createCookie_("login",document.getElementById("login").value,365);var A=gup("cl");var D="";if(A!=""){D="?cust="+A}if(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("passwordExpired").nodeValue=="1"){window.location="/Login/login_newPass.aspx"+D;return }if(B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("multiSiteLogin").nodeValue=="1"){window.location="/Login/Login_Site.aspx"+D;return }top.location=B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("address").nodeValue+"?ssoToken="+B.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("ssoToken").nodeValue}function login(){var A=gup("SLO");var B="";if(A!=""){B="&SLO="+A}loadXMLDoc("/Login/login_xml.aspx?LOGIN="+encodeURI(document.getElementById("login").value)+"&PASSWORD="+encodeURI(document.getElementById("password").value)+B,null)}function PressEnter(){if(window.event.keyCode==13){login()}}function demo(){window.open(hostName+"/contacts/contact_form.aspx","demo","toolbar=no,location=no,status=no,directories=no,menubar=no,resizable=no,scrollbars=no,width=550,height=430")}function RoiReport(){window.open(hostName+"/mweb/RoiReport.aspx","RoiReport","toolbar=no,location=no,status=no,directories=no,menubar=no,resizable=no,scrollbars=no,width=550,height=430")}function getPassword(){var A=gup("cl");var B="";if(A!=""){B="?cust="+A}window.open(hostName+"/Login/login_getPass.aspx"+B,"Edit","toolbar=no,location=no,status=no,directories=no,menubar=no,resizable=no,scrollbars=no,width=400,height=250")}function readCookie_(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return""}function createCookie_(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"}var tmrRetrieveLoginTimer;function retrieveLogin(){if(document.getElementById("login")==null){tmrRetrieveLoginTimer=setTimeout(retrieveLogin,1000);return }clearTimeout(tmrRetrieveLoginTimer);if((document.getElementById("login").value=="")&&(readCookie_("login")!="")&&(readCookie_("login")!="null")){document.getElementById("login").value=readCookie_("login")}}function gup(B){B=B.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(window.location.href);if(C==null){return""}else{return C[1]}}function queryString(){var A="[\\?]"+name+"([^#]*)";var C=new RegExp(A);var B=C.exec(window.location.href);if(B==null){return""}else{return B[1]}}window.onload=retrieveLogin;