function bs3(){var idc=document.getElementById("icode");if(idc!=null)idc.src="verify.jsp?r="+Math.random();}function bs4(){var v1=document.getElementById("user").value;var v2=document.getElementById("pw").value;var v3=document.getElementById("pw2").value;var v4=document.getElementById("mail").value;var v5=document.getElementById("cd").value;if(v1.length<5 || v1.length>12){alert("User name must be between 5 and 12 characters");return;}if(v2.length<5 || v1.length>12){alert("Password must be between 5 and 12 characters");return;}if(v4.length<5){alert("You need to enter a valid email address");return;}if(v2!=v3){alert("The second password entry does not match the first");return;}if(v2==v1){alert("The user name cannot be the same as the password");return;}if(v5==""){alert("You need to enter the code");return;}document.signup.submit();}function bs5(){var v1=document.getElementById("user").value;if(v1.length<5 || v1.length>12){alert("User name must be between 5 and 12 characters");return;}bs7("Searching...");setTimeout("bs6('"+v1+"');",1)}function bs6(inval){loadxml=bs0();loadxml.open("POST","access.jsp?mode=checkusername&user="+inval,false);loadxml.send(null);var cn=loadxml.responseXML.getElementsByTagName("success");if(cn.length==1){if(cn[0].getAttribute("answer")=="true"){alert("Sorry - user name ("+inval+") is not available. Please try another.");}else{alert("User name ("+inval+") is available.");}}else{alert("Error making the request");}bs7("Check name");}function bs7(inval){document.getElementById("checkname").innerHTML=inval;}