<script language="javascript">function is_empty(theField){ if (theField.value ==""|| theField.value==null|| theField.value==0) return false; else return true;}function validateForm(theForm) {if(is_empty(theForm.name)) { alert('Please enter your name'); theForm.name.focus();return false;}if(is_empty(theForm.age)) { alert('Please enter your age'); theForm.age.focus();return false;}if(is_empty(theForm.sex)) { alert('Please enter your gender'); theForm.sex.focus();return false;}if(is_empty(theForm.city)) { alert('Please enter your city'); theForm.city.focus();return false;}if(is_empty(theForm.email)) { alert('Please enter your e-mail address'); theForm.email.focus();return false;}return true;}</script><form name="contact" onSubmit="javascript:return validateForm(this)">