function enablebutton(){if(document.getElementById("txt_username").value=="")document.getElementById("checkbutton").disabled=true;else document.getElementById("checkbutton").disabled=false}function IsNumeric(a){var b=true,c;for(i=0;i<a.length&&b==true;i++){c=a.charAt(i);if("0123456789.".indexOf(c)==-1)b=false}return b}
function isusername(a){if(a==""){window.alert("\nThe Username field is blank .\n\nPlease Enter your Username.");document.getElementById("txt_username").focus();return false}if((a.substring(0,1)<"a"||a.substring(0,1)>"z")&&(a.substring(0,1)<"A"||a.substring(0,1)>"Z")){window.alert("The Username should begin with an alphabetic character.");document.getElementById("txt_username").focus();return false}for(var b=1;b<a.length;b++){var c=a.substring(b,b+1);if((c<"a"||"z"<c)&&(c<"A"||"Z"<c)&&(c<"0"||"9"<
c)&&c!="_"&&c!="."){window.alert("\nThe Username field  accepts letters, numbers & underscore.\n\nPlease re-enter your Username.");document.getElementById("txt_username").select();document.getElementById("txt_username").focus();return false}}if(a.length>15){window.alert("\nThe Username should be 15 characters or less.\n\nPlease re-enter your Username.");document.getElementById("txt_username").focus();return false}}
function Valid(){if(!validatemobilenumber(document.getElementById("txt_mobileno").value)){document.getElementById("txt_mobileno").value="";document.getElementById("txt_mobileno").focus();return false}if(document.getElementById("verifycode").value==""){window.alert("Please enter the Verification Code as shown in the form");document.getElementById("verifycode").focus();return false}if(document.getElementById("cterms").checked==false){window.alert("Please accept the  terms and conditions ");return false}}
function loader(){window.document.getElementById("Button1").value="Register";var a=new Ajax.Request("terms.htm",{method:"get",postBody:"",onSuccess:function(b){document.getElementById("terms1").value=b.responseText},onFailure:function(b){}})}function ClearTextFields(){document.getElementById("form1").reset();document.getElementById("txt_mobileno").focus();return false}function closeWindow(){alert("You are about to cancel the Registration");window.close();return false};