function fnRegValidate_s() { // FOR USER NAME if (!(fnCheckLength("Name",document.getElementById("txtFName"),1,40))) return (false); // FOR LAST NAME if (!(fnCheckLength("Last Name",document.getElementById("txtLName"),1,40))) return (false); // FOR EMAIL if (!(fnCheckLength("Email",document.getElementById("txtEmail"),1,40))) return (false); // VALID EMAIL FORMAT if (!(fnIsValidEmail(document.getElementById("txtEmail")))) return (false); // FOR ADDRESS if (!(fnCheckLength("Address",document.getElementById("txtAddress"),1,100))) return (false); // FOR ATLEAST ONE PHONE NO if(document.getElementById("txtDayPhone").value=="" && document.getElementById("txtMobile").value=="" && document.getElementById("txtEvePhone").value=="") { alert("Please enter atleast one Phone Number! Please retry"); document.getElementById("txtDayPhone").focus(); return(false); } // FOR CITY if (!(fnCheckLength("City",document.getElementById("txtCity"),1,40))) return (false); // FOR LOGIN NAME if (!(fnCheckLength("Sign In Id",document.getElementById("txtLogin"),1,12))) return (false); // to Restrict manu as prefix if(document.getElementById("txtLogin").value.length>3 && document.getElementById("txtLogin").value.substring(0,4).toLowerCase()=="manu") { alert('Sign In Id cannot start with manu'); document.getElementById("txtLogin").focus(); return(false); } // CHECKING FOR NO SPECIAL CHARS if (!(fnIsValidAlpha("Sign In Id",document.getElementById("txtLogin")))) return (false); // CHECKING FOR SPACES IN BETWEEN if (!(fnCheckWhiteSpaces("Sign In Id",document.getElementById("txtLogin")))) return (false); // FOR PASSWORD1 if (!(fnCheckLength("Password",document.getElementById("txtPassword"),6,12))) return (false); // PASSWORD CANNOT BE SAME AS THE SIGN IN NAME if (document.getElementById("txtLogin").value.toUpperCase() == document.getElementById("txtPassword").value.toUpperCase()) { alert("Password cannot be same as Sign In Id"); document.getElementById("txtPassword").focus(); return (false); } // CHECKING FOR NO SPECIAL CHARS if (!(fnIsValidAlpha("Password",document.getElementById("txtPassword")))) return (false); // CHECKING FOR SPACES IN BETWEEN if (!(fnCheckWhiteSpaces("Password",document.getElementById("txtPassword")))) return (false); //alert("Password1 Checked"); // CHECKING FOR PASSWORD1 MATHCING WITH PASSWORD2 if (document.getElementById("txtPassword").value != document.getElementById("txtConfirmPassword").value) { alert("The passwords do not match !!, Please retry.."); document.getElementById("txtPassword").value = ""; document.getElementById("txtConfirmPassword").value = ""; document.getElementById("txtPassword").focus(); return (false); } // FOR OTHER PROFESSION //alert(document.frmReg.cmbProfession.selectedIndex); /*if (document.getElementById("cmbProfession").value == 18) { if (document.getElementById("txtProfession").value == "") { alert("Please specify the other profession") document.getElementById("txtProfession").focus(); return (false); } } */ if (!document.getElementById("chkAgreed").checked) { alert("Please go through the terms and conditions"); document.getElementById("chkAgreed").focus(); return (false); } //alert("Validations over"); return (true); }