var isOpera,isIE=false;if(typeof(window.opera)!="undefined"){isOpera=true}if(!isOpera&&navigator.userAgent.indexOf("Internet Explorer")){isIE=true}if(isOpera||isIE){document.nativeGetElementById=document.getElementById;document.getElementById=function(c){var b=document.nativeGetElementById(c);if(b){if(b.attributes.id&&b.attributes.id.value==c){return b}else{for(var a=1;a<document.all[c].length;a++){if(document.all[c][a].attributes.id&&document.all[c][a].attributes.id.value==c){return document.all[c][a]}}}}return null}}var key_count_global=0;function fly_init(){if(!document.getElementById("LoginForm")&&!document.getElementById("OrderStep1")){return}if(document.getElementById("EMail")){key_count_global=0;document.getElementById("EMail").onchange=function(){key_count_global++;setTimeout("lookup("+key_count_global+")",1000)}}}function makeHttpObject(){try{return new XMLHttpRequest()}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}throw new Error("Could not create HTTP request object.")}function simpleHttpRequest(b,d,a){var c=makeHttpObject();c.open("GET",b,true);c.send(null);c.onreadystatechange=function(){if(c.readyState==4){if(c.status==200){d(c.responseText)}else{if(a){a(c.status,c.statusText)}}}}}function printURL(a){if(a=="none"){var c=document.getElementById("EMail").value;var b=/^([\w]+)(.[\w]+)*@([\w]+)(.[\w]{2,3})/;if(b.test(c)==false){doErrorDialog("De gebruikersnaam is geen geldig E-mail adres.","EMail","/mediaServlet/")}else{doInfoDialog("De gebruikersnaam is beschikbaar.","EMail","/mediaServlet/")}}else{doInfoDialog('<div><a href="/inloggen.html">Gebruiker bestaat reeds, klik hier om aan te melden of kies een andere gebruikersnaam</a></div>',"EMail","/mediaServlet/")}}function printNothing(){restoreInput("EMail")}function lookup(a){if(a==key_count_global){simpleHttpRequest("/loginServlet?Mode=Verify&Value="+document.getElementById("EMail").value,printURL,printNothing);key_count_global=0}}function loadmore(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function getPath(c){var b=document.createElement("a");b.href=c;return b.pathname.substr(0,1)==="/"?b.pathname:"/"+b.pathname}var inFocus=false;function setFocus(){var a=document.getElementById("SearchString");if(!inFocus){a.focus()}}function redirectMe(b){var a="/"+b;if(a!=getPath(window.location)){window.location="/"+b}}function ToolTipHoverAdd(){if(navigator.appVersion.indexOf("MSIE")==-1){return}var c=document.getElementById("tooltip");if(c){var a=document.getElementsByTagName("A");if(a){for(var b=0;b<a.length;b++){a[b].onmouseover=function(){this.className+=" mshover"};a[b].onmouseout=function(){this.className=this.className.replace(new RegExp(" mshover\\b"),"")}}}}};
