<!-- Revision: $Revision: 1.3 $ -->

<SCRIPT LANGUAGE="JavaScript">

<!-- Hide script

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.org_name.value == "")
  {
    alert("Please enter a value for the Organization Name.");
    theForm.org_name.focus();
    return (false);
  }

  if (theForm.org_type.selectedIndex == 0 )
  {
    alert("Please choose a valid Organization Type.");
    theForm.org_type.focus();
    return (false);
  } 

  if (theForm.org_type.selectedIndex == 8 & theForm.org_other.value == "") 
  {
    alert("Please enter a valid Other type.");
    theForm.org_other.focus();
    return (false);
  } 


  if (theForm.org_add1.value == "")
  {
    alert("Please choose a valid Organization Address.");
    theForm.org_add1.focus();
    return (false);
  }

  if (theForm.org_city.value == "")
  {
    alert("Please choose a valid City.");
    theForm.org_city.focus();
    return (false);
  }

  if (theForm.org_state.value == "")
  {
    alert("Please choose a valid State.");
    theForm.org_state.focus();
    return (false);
  }

  if (theForm.org_zip.value == "")
  {
    alert("Please enter a value for the Zip field.");
    theForm.org_zip.focus();
    return (false);
  }

  if (theForm.org_zip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the Zip field.");
    theForm.org_zip.focus();
    return (false);
  }

  if (theForm.org_zip.value.length > 5)
  {
    alert("Please enter at most 5 characters in the Zip field.");
    theForm.org_zip.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.org_zip.value;
  var allValid = true;
  var validGroups = 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 characters in the Zip field.");
    theForm.org_zip.focus();
    return (false);
  }


  if (theForm.contact_name.value == "")
  {
    alert("Please enter your name.");
    theForm.contact_name.focus();
    return (false);
  }

  if (theForm.contact_email.value == "")
  {
    alert("Please enter your email address.");
    theForm.contact_email.focus();
    return (false);
  }


  return (true);
}

// End script hiding -->

</SCRIPT>

