// JavaScript Document

function valid(comm_form) {
uemail = document.comm_form.email.value
AtPos = uemail.indexOf("@")
StopPos = uemail.lastIndexOf(".")
if (AtPos == -1 || StopPos == -1 || StopPos - AtPos == 1 || StopPos < AtPos)
 {
    alert ("Not a valid email address");
	document.comm_form.email.focus();
	return false;
 }
else if (document.comm_form.theName.value == "")
 {
      alert ("Please enter your name.");
	  document.comm_form.theName.focus();
	  return false;
 }
else if (document.comm_form.message.value == "")
 {
      alert ("Please enter your message.");
	  document.comm_form.message.focus();
	  return false;
 }

 
 else
 {
 return true;
 }
 }

