function ContactForm_Validate(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ.-,_ \t\r\n\f";
  var checkStr = theForm.name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, whitespace and \".-,_\" characters in the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.telephone.value == "")
  {
    alert("Please enter a value for the \"Telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }

  if (theForm.telephone.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }

  var checkOK = "0123456789- \t\r\n\f";
  var checkStr = theForm.telephone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and whitespace characters in the \"Telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 8)
  {
    alert("Please enter at least 8 characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@._-";
  var checkStr = theForm.email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@._-\" characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }
  return (true);

  if (theForm.message.value.length < 5)
  {
    alert("Please enter some text into the \"message\" field.");
    theForm.message.focus();
    return (false);
  }

  if (theForm.message.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"message\" field.");
    theForm.message.focus();
    return (false);
  }
  return (true);
}