// Only script specific to this form goes here. // General-purpose routines are in a separate file. function validateOnSubmit1() { var elem; var errs=0; // execute all element validations in reverse order, so focus gets // set to the first one in error. //business //business ourElement = document.getElementById("sub_email"); if (!validateEmail(ourElement, 'info_email',true)) errs += 1; if (errs>1) alert('Please ensure all required fields are entered'); if (errs==1) alert('Invalid email. Please try again.'); return (errs==0); } // JavaScript Document