
function Form_Validator(theForm)
{

  if (!validEmailAddress(theForm.email)) {
  	return (false);
  }  
  
  if (theForm.subject.value == "")
  {
  	alert("Please enter in a subject for the message");
  	theForm.subject.focus();
  	return (false);
  }
  if (theForm.subject.value.length < 10)
  {
    alert("Please enter at least 10 characters for the subject.");
    theForm.subject.focus();
    return (false);
  }
  if (theForm.subject.value.length > 100)
  {
    alert("The subjecgt must be 100 characters or less in length.");
    theForm.subject.focus();
    return (false);
  }
  
  
  if (theForm.message.value == "")
  {
    alert("Please enter text into the \"message\" area.");
    theForm.message.focus();
    return (false);
  }
  if (theForm.message.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"message\" area.");
    theForm.message.focus();
    return (false);
  }
  if (theForm.message.value.length > 2000)
  {
    alert("Please enter at most 2000 characters in the \"message\" area.");
    theForm.message.focus();
    return (false);
  }
  
  if (!validSecurityCode(theForm)) {
  	return (false);
  }  
  
  return (true);
}

