function validate(theForm)
{

  if (theForm.fromname.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.fromname.focus();
    return (false);
  }

  if (theForm.fromname.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"Name\" field.");
    theForm.fromname.focus();
    return (false);
  }

  if (theForm.fromname.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Name\" field.");
    theForm.fromname.focus();
    return (false);
  }

  if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"address\" field.");
    theForm.address.focus();
    return (false);
  }

  if (theForm.address.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"address\" field.");
    theForm.address.focus();
    return (false);
  }

  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"state\" field.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.Phone.value == "" && theForm.callme.checked)
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  if (theForm.Phone.value.length > 20)
  {
    alert("Please enter at most 20 characters in the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  if (theForm.from.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.from.focus();
    return (false);
  }

  if (theForm.from.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"Email\" field.");
    theForm.from.focus();
    return (false);
  }

  if (theForm.from.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Email\" field.");
    theForm.from.focus();
    return (false);
  }
  return (true);
}
