function CheckForm(theForm) {
  
  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 ('email address contains invalid chars.');
		theForm.email.focus();
  		return (false);
  		}
  		
  atPos = theForm.email.value.indexOf("@",1)
  if (atPos == -1) {
  	alert ('email address doesn\'t contain \"@\" ');
	theForm.email.focus();
  	return (false);
  	}
  	
  if (theForm.email.value.indexOf("@",atPos+1) >	 -1) {
 	alert ('email address contains 2 \"@s\" ');
	theForm.email.focus();
  	return (false);
  	}
  	
  	periodPos = theForm.email.value.indexOf(".",atPos)
  	if (periodPos == -1) {
  		alert ('email address doesn\'t contain \".\" ');
		theForm.email.focus();
		return (false);
  	}
  
  if (periodPos +3 > theForm.email.value.length) {
		alert ('email address incorrect. ');
		theForm.email.focus();
		return (false);
	}
	
	 if (theForm.fname.value == "")
  {
    alert("You have not entered your first name.");
    theForm.fname.focus();
    return (false);
  }


  if (theForm.lname.value == "")
  {
    alert("You have not entered your last name.");
    theForm.lname.focus();
    return (false);
  }
  
   if (theForm.dphone.value == "")
  {
    alert("You have not entered your day phone #.");
    theForm.dphone.focus();
    return (false);
  }
  
   if (theForm.ephone.value == "")
  {
    alert("You have not entered your evening phone #.");
    theForm.ephone.focus();
    return (false);
  }
  
   if (theForm.availability.options[theForm.availability.selectedIndex].value == "0")
  {
    alert("You have not entered when you will be available.");
    theForm.availability.focus();
    return (false);
  }

  
  

check_email = confirm(" Is your email address, \"" +  theForm.email.value + "\" correct?")
  if (check_email != "0")
  {
    theForm.submit.value="Processing...";
    theForm.submit.disabled = true;
    return (true);
  }
  else
  {
    theForm.email.focus();
    return (false);
  }

return (true);
}

