function checkform ( form ) { var AccEmail = form.email; var ConfirmEmail = form.confirmemail; if (form.firstname.value == "") { alert( "Please enter your First name address." ); form.firstname.focus(); return false ; } if (form.lastname.value == "") { alert( "Please enter your Last name address." ); form.lastname.focus(); return false ; } if (form.email.value == "") { alert( "Please enter your Email address." ); form.email.focus(); return false ; } if(form.email.value.indexOf('@')==-1) { alert("Enter correct Email Id"); form.email.value=""; form.email.focus(); return false ; } if(form.email.value.indexOf('.')==-1) { alert("Enter correct Email Id"); form.email.value=""; form.email.focus(); return false ; } if(form.email.value.indexOf(',')!=-1) { alert("Enter correct Email Id"); form.email.value=""; form.email.focus(); return false ; } if(form.email.value.indexOf(';')!=-1) { alert("Enter correct Email Id"); form.email.value=""; form.email.focus(); return false ; } if (form.confirmemail.value == "") { alert( "Please confirm your Email address." ); form.confirmemail.focus(); return false ; } if (form.email.value != form.confirmemail.value ){ alert("Your email address does not match. Please try again."); form.confirmemail.focus(); form.confirmemail.select(); return false; } if (form.seminarlist.selectedIndex == 0) { alert("Please select how did you find out about the seminar"); form.seminarlist.focus(); return (false); } return true ; } function display(obj,id1) { txt = obj.options[obj.selectedIndex].value; document.getElementById(id1).style.display = 'none'; if ( txt.match(id1) ) { document.getElementById(id1).style.display = 'block'; } }