if (document.ANHDentalForm1.clinic.value.length > 29) { alert("Please enter less than 30 characters in the \"Clinic\" field."); document.ANHDentalForm1.clinic.focus(); return (false); } if (document.ANHDentalForm1.zip.value.length > 10) { alert("Please enter less than 11 digits in the \"Zip\" field using the format 12345-6789."); document.ANHDentalForm1.zip.focus(); return (false); } var checkOK = "0123456789-"; var checkStr = document.ANHDentalForm1.zip.value; var allValid = true; var decPoints = 0; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("Please enter only digit numbers in the \"Zip\" field."); document.ANHDentalForm1.zip.focus(); return (false); } } // -->