function CheckForm(theForm) {
  
   if (theForm.cname.value == "")
  {
    alert("You have not entered your company name.");
    theForm.cname.focus();
    return (false);
  }
  
    if (theForm.name.value == "")
  {
    alert("You have not entered your name.");
    theForm.name.focus();
    return (false);
  }
   if (theForm.address.value == "")
  {
    alert("You have not entered your address.");
    theForm.address.focus();
    return (false);
  }

    if (theForm.city.value == "")
  {
    alert("You have not entered your city.");
    theForm.city.focus();
    return (false);
  }
  
    if (theForm.state.value == "")
  {
    alert("You have not entered your state.");
    theForm.state.focus();
    return (false);
  }
  
      if (theForm.zip.value == "")
  {
    alert("You have not entered your zip code.");
    theForm.zip.focus();
    return (false);
  }
  
    if (theForm.phone.value == "")
  {
    alert("You have not entered your phone #.");
    theForm.phone.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 ('email address contains invalid chars.');
  		return (false);
  		}
  		
  atPos = theForm.email.value.indexOf("@",1)
  if (atPos == -1) {
  	alert ('email address doesn\'t contain \"@\" ');
  	return (false);
  	}
  	
  if (theForm.email.value.indexOf("@",atPos+1) >	 -1) {
 	alert ('email address contains 2 \"@s\" ');
  	return (false);
  	}
  	
  	periodPos = theForm.email.value.indexOf(".",atPos)
  	if (periodPos == -1) {
  		alert ('email address doesn\'t contain \".\" ');
		return (false);
  	}
  
  if (periodPos +3 > theForm.email.value.length) {
		alert ('email address incorrect. ');
		return (false);
	}
	
 if (theForm.comments.value == "")
  {
    alert("You have not entered your project description.");
    theForm.comments.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);
}

