function validate_form(theForm)
{

  if (theForm.FName.value == "")
  {
    alert("Please enter your First Name.");
    theForm.FName.focus();
    return (false);
  }

  if (theForm.LName.value == "")
  {
    alert("Please enter your Last Name.");
    theForm.LName.focus();
    return (false);
  }

  if (theForm.address.value == "")
  {
    alert("Please enter your Address.");
    theForm.address.focus();
    return (false);
  }

  if (theForm.city.value == "")
  {
    alert("Please enter a City.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.state.selectedIndex == 0)
  {
    alert("Please select one of the States.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.zip.value == "")
  {
    alert("Please enter a ZipCode.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.zip.value.length < 5)
  {
    alert("ZipCode should be at least 5 characters.");
    theForm.zip.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.zip.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }

  if (!allValid)
  {
    alert("Please enter only digits in the ZipCode field.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.phone.value == "")
  {
    alert("Please enter a Phone Number.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length < 10)
  {
    alert("Phone Number should be at least 10 characters.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789--)( \t\r\n\f";
  var checkStr = theForm.phone.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, whitespace and \"-)(\" characters in the \"Phone\" field.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789-()-, \t\r\n\f";
  var checkStr = theForm.fax.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, whitespace and \"()-,\" characters in the \"Fax\" field.");
    theForm.fax.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);
  }


  var radioSelected = false;
  for (i = 0;  i < theForm.GSADE_type.length;  i++)
  {
    if (theForm.GSADE_type[i].checked)
        radioSelected = true;
  }

  if (!radioSelected)
  {
    alert("Please select one of the GSADE membership types.");
    return (false);
  }

  return (true);

}
