function processXML(A){var B="";if(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("success").nodeValue=="0"){B+="Wrong login or password !";if(parseInt(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("wrongLogin").nodeValue)=="1"){alert(B);return }var C=parseInt(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("attemptsLeft").nodeValue);if(C>0){B+="\n"+C+" attempts left before this account will be locked."}if(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("accountLocked").nodeValue=="1"){B+="\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(B!=""){alert(B);document.getElementById("password").value=""}return }createCookie_("login",document.getElementById("login").value,365);if(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("passwordExpired").nodeValue=="1"){window.location="/Login/login_newPass.aspx";return }if(A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("multiSiteLogin").nodeValue=="1"){window.location="/Login/Login_Site.aspx";return }top.location=A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("address").nodeValue+"login.aspx?ssoToken="+A.getElementsByTagName("connexionResult")[0].attributes.getNamedItem("ssoToken").nodeValue}function login(){loadXMLDoc("/Login/login_xml.aspx?LOGIN="+encodeURI(document.getElementById("login").value)+"&PASSWORD="+encodeURI(document.getElementById("password").value),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(){window.open(hostName+"/Login/login_getPass.aspx","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")}}window.onload=retrieveLogin;