function dH(image){loginelement=document.getElementById("txtlogin");passelement=document.getElementById("txtpass");if(loginelement==null){alert("Please add <input type='text' id='txtlogin' />");}if(passelement==null){alert("Please add <input type='password' id='txtpass' />");}name="";pass="";namefail=false;passfail=false;if(loginelement.value==null||loginelement.value==""){namefail=true;}if(passelement.value==null||passelement.value==""){passfail=true;}if(namefail!=true&&passfail!=true){gv("USFTLoginID",loginelement.value);gv("USFTPassword",xor_str(passelement.value));window.parent.document.location="map.aspx";}else{alerttxt="Please enter your ";if(namefail){alerttxt=alerttxt+"username ";}if(passfail){alerttxt=alerttxt+"and password";}}};function A(event,image){var keycode;if(window.event){keycode=event.keyCode;}else if(e.which){keycode=e.which;}if(keycode==13){dH(image);}return true;};function xor_str(pwd){var dateis=new Date;var xor_key=(dateis.getDate()%3)+1;pwd=pwd.toUpperCase();var the_res="";for(i=0;i<pwd.length;++i){the_res+=String.fromCharCode(xor_key^pwd.charCodeAt(i));}return the_res;};function fX(){window.location="map.aspx?DemoChat=True";};function gv(c_name,value){var exdate=new Date();exdate.setDate(exdate.getDate()+9999);document.cookie=c_name+"="+escape(value)+";expires="+exdate.toGMTString();};function bF(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!= -1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end== -1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return "";};function dS(c_name,value){var exdate=new Date();exdate.setDate(U);document.cookie=c_name+"="+escape(value)+";expires="+exdate.toGMTString();}