function processCredentials(){convertToByteArray=function(c){var b=[];for(var a=0;a<c.length;a++){b.push(c.charCodeAt(a));}return b;};document.forms[0].elements["password"].value=dojox.encoding.base64.encode(convertToByteArray(document.forms[0].elements["password"].value));}function updateTextField(){var b=dojo.byId("warningDivPasswordCapsLockOn");dojo.style(b,"display","none");document.loginForm.username.focus();var a=getCookie("UILoginEmail");if(a!=""&&a!=null){document.loginForm.username.value=a;document.loginForm.rememberLogin.checked=true;}else{document.loginForm.rememberLogin.checked=false;}}function updateCookie(){if(document.loginForm.rememberLogin.checked){setCookie("UILoginEmail",document.loginForm.username.value,new Date(3000,0,1));}else{deleteCookie("UILoginEmail");}}function submitSelection(b){var a=document.getElementById("i18nLanguageSelector");b=b+"?language="+a.nextSibling.value;processCredentials();document.forms[0].action=b;document.forms[0].submit();}function frameCheck(a){if(top.location!=location){top.location.href=a.location.href;}}function checkCapsLock(c){var d=c?c:window.event;if(!d){return;}var b=d.which?d.which:(d.keyCode?d.keyCode:d.charCode);var a=d.shiftKey?d.shiftKey:(d.modifiers?(d.modifiers&4):false);dojo.style(dojo.byId("warningDivPasswordCapsLockOn"),"display",((b>64&&b<91&&!a)||(b>96&&b<123&&a))?"inline":"none");}function getCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length;}return unescape(document.cookie.substring(b,a));}function getCookie(a){a=a+"=";var b=0;while(b<document.cookie.length){if(document.cookie.substring(b,b+a.length)==a){return getCookieVal(b+a.length);}b=document.cookie.indexOf(" ",b)+1;if(b==0){break;}}return null;}function setCookie(b,d,a,f,c,e){document.cookie=b+"="+escape(d)+((a)?"; expires="+a.toGMTString():"")+((f)?"; path="+f:"")+((c)?"; domain="+c:"")+((e)?"; secure":"");}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}function PopupPreview(k,d,j,l,i){var c=1025;var a=580;var e=1;var h="Help";if(d!=null&&d!=""){c=d;}if(j!=null&&j!=""){a=j;}if(i!=null&&i!=""){h=i;}var b=screen.width/2-(c/2);var g=screen.height/2-(a/2);if(l!=null&&l!=""){e=l;}var f=window.open(k,h,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+e+",resizable=1,width="+c+",height="+a+",left="+b+",top="+g);f.focus();}
