/g,">").replace(//g,">").replace(/").replace(/\n/g,"").replace(/\t/g," ")}if(typeof a=="boolean"){return a}if(typeof a=="number"){return a}}function ArrayElementMove(a,b,c){a.splice(c,0,a.splice(b,1)[0])}function ObjectToStringEx(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="
"+gap(a)+"Item #"+b+": "+ObjectToStringEx(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="
"+gap(a)+b+" = "+ObjectToStringEx(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function ObjectToStringEx2(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="\r\n"+gap2(a)+"Item #"+b+": "+ObjectToStringEx2(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="\r\n"+gap2(a)+b+" = "+ObjectToStringEx2(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function gap(a){var d="";for(var b=0;b<(a*4);b++){d+=" "}return d}function gap2(a){var d="";for(var b=0;b<(a*4);b++){d+=" "}return d}function ObjectToString(a){return ObjectToStringEx(a,0)}function ObjectToString2(a){return ObjectToStringEx2(a,0)}function hex2rstr(a){if(typeof a!="string"||a.length==0){return""}var c="",b=(""+a).match(/../g),e;while(e=b.shift()){c+=String.fromCharCode("0x"+e)}return c}function char2hex(a){return(a+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a0)){QV("showPassHintLink",true)}QV("newAccountPass",(newAccountPass==1));QV("resetAccountDiv",(emailCheck==true));QV("hrAccountDiv",(emailCheck==true)||(newAccountPass==1));if("{{loginmode}}"=="4"){try{if(hardwareKeyChallenge.length>0){hardwareKeyChallenge=JSON.parse(hardwareKeyChallenge)}else{hardwareKeyChallenge=null}}catch(b){hardwareKeyChallenge=null}if((hardwareKeyChallenge!=null)&&u2fSupported()){window.u2f.sign(hardwareKeyChallenge.appId,hardwareKeyChallenge.challenge,hardwareKeyChallenge.registeredKeys,function(d){if(d.signatureData){Q("hwtokenInput").value=JSON.stringify(d);QE("tokenOkButton",true);Q("tokenOkButton").click()}},hardwareKeyChallenge.timeoutSeconds)}}if("{{loginmode}}"=="5"){try{if(hardwareKeyChallenge.length>0){hardwareKeyChallenge=JSON.parse(hardwareKeyChallenge)}else{hardwareKeyChallenge=null}}catch(b){hardwareKeyChallenge=null}if((hardwareKeyChallenge!=null)&&u2fSupported()){window.u2f.sign(hardwareKeyChallenge.appId,hardwareKeyChallenge.challenge,hardwareKeyChallenge.registeredKeys,function(d){if(d.signatureData){Q("resetHwtokenInput").value=JSON.stringify(d);QE("resetTokenOkButton",true);Q("resetTokenOkButton").click()}},hardwareKeyChallenge.timeoutSeconds)}}}function showPassHint(){messagebox("Password Hint",passhint)}function xgo(a){QV("message1",false);QV("message2",false);QV("message3",false);QV("message4",false);QV("message5",false);go(a)}function go(a){setDialogMode(0);QV("showPassHintLink",false);QV("loginpanel",a==1);QV("createpanel",a==2);QV("resetpanel",a==3);QV("tokenpanel",a==4);QV("resettokenpanel",a==5);if(a==1){Q("username").focus()}if(a==2){Q("ausername").focus()}if(a==3){Q("remail").focus()}if(a==4){Q("tokenInput").focus()}}function validateLogin(a,b){var c=((Q("username").value.length>0)&&(Q("username").value.indexOf(" ")==-1)&&(Q("password").value.length>0));QE("loginButton",c);setDialogMode(0);if((b!=null)&&(b.keyCode==13)){if(a==1){Q("password").focus()}else{if(a==2){Q("loginButton").click()}}}if(b!=null){haltEvent(b)}}function validateCreate(a,b){setDialogMode(0);var c=((Q("ausername").value.length>0)&&(Q("ausername").value.indexOf(" ")==-1)&&(validateEmail(Q("aemail").value)==true)&&(Q("apassword1").value.length>0)&&(Q("apassword2").value==Q("apassword1").value));if((newAccountPass==1)&&(Q("anewaccountpass").value.length==0)){c=false}if(Q("apassword1").value==""){QH("passWarning","")}else{if(passRequirements==null||passRequirements==""){var f=checkPasswordStrength(Q("apassword1").value);if(f>=80){QH("passWarning","Strong Password")}else{if(f>=60){QH("passWarning","Good Password")}else{QH("passWarning","Weak Password")}}}else{var d=checkPasswordRequirements(Q("apassword1").value,passRequirements);if(d==false){c=false;QH("passWarning","Password Policy")}else{QH("passWarning","")}}}QE("createButton",c);if((b!=null)&&(b.keyCode==13)){if(a==1){Q("aemail").focus()}if(a==2){Q("apassword1").focus()}if(a==3){Q("apassword2").focus()}if(a==4){Q("apasswordhint").focus()}if(a==5){if(newAccountPass==1){Q("anewaccountpass").focus()}else{Q("createButton").click()}}if(a==6){Q("createButton").click()}}if(b!=null){haltEvent(b)}}function validateReset(a){setDialogMode(0);var b=validateEmail(Q("remail").value);QE("eresetButton",b);if((a!=null)&&(a.keyCode==13)&&(b==true)){Q("eresetButton").click()}if(a!=null){haltEvent(a)}}function checkPasswordStrength(e){var f=0,d={},g=0,h={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e){return 0}for(var b=0;bf.max){return false}}var d=0,b=0,g=0,c=0;for(var a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return a.test(b)}function u2fSupported(){return(window.u2f&&((navigator.userAgent.indexOf("Chrome/")>0)||(navigator.userAgent.indexOf("Firefox/")>0)||(navigator.userAgent.indexOf("Opera/")>0)||(navigator.userAgent.indexOf("Safari/")>0)))};