
function checkForm(theForm)
{

    if (theForm.name.value == "")
  {
    alert("Please enter your name.");
    theForm.name.focus();
    return (false);
  }
  
  if (theForm.email.value == "")
  {
    alert("You have not entered your email address.");
    theForm.email.focus();
    return (false);
  }

invalidChars = " /:,;"
  for (i=0; i<invalidChars.length; i++)
  	badChar = invalidChars.charAt(i)
  	if (theForm.email.value.indexOf(badChar,0) > -1) {
  		alert ('Your email address contains invalid chars.');
		theForm.email.focus();
  		return (false);
  		}
  		
  atPos = theForm.email.value.indexOf("@",1)
  if (atPos == -1) {
  	alert ('Your email address doesn\'t contain \"@\" ');
	theForm.email.focus();
  	return (false);
  	}
  	
  if (theForm.email.value.indexOf("@",atPos+1) >	 -1) {
 	alert ('Your email address contains 2 \"@s\" ');
	theForm.email.focus();
  	return (false);
  	}
  	
  	periodPos = theForm.email.value.indexOf(".",atPos)
  	if (periodPos == -1) {
  		alert ('Your email address doesn\'t contain \".\" ');
		theForm.email.focus();
		return (false);
  	}
  
  if (periodPos +2 > theForm.email.value.length) {
		alert ('Your email address is incorrect. ');
		theForm.email.focus();
		return (false);
	}

  if (theForm.name.value == "")
  {
    alert("Please enter your nominee's name.");
    theForm.nominee.focus();
    return (false);
  }
  if (theForm.support.value == "")
  {
    alert("Please tell us why you are nominating this person.");
    theForm.support.focus();
    return (false);
  }
  
} 