function FormValidator(theForm)
{

  if (theForm.realname.value == "")
  {
    alert("Please enter a value for the \"Contact Name, Company and Telephone Number\" field.");
    theForm.realname.focus();
    return (false);
  }

  if (theForm.realname.value.length < 8)
  {
    alert("Please enter at least 8 characters in the \"Contact Name, Company and Telephone Number\" field.");
    theForm.realname.focus();
    return (false);
  }

  if (theForm.realname.value.length > 40)
  {
    alert("Please enter at most 40 characters in the \"Contact Name, Company and Telephone Number\" field.");
    theForm.realname.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Contact E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Contact E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Contact E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.comments.value == "")
  {
    alert("Please enter a value for the \"Enquiry and/or Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  if (theForm.comments.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Enquiry and/or Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  if (theForm.comments.value.length > 4096)
  {
    alert("Please enter at most 4096 characters in the \"Enquiry and/or Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  return (true);
}

