
function Form_Validator(theForm)
{

  // Validation script for field 'fromName' (Your Name)
  if (theForm.fullname.value == "")
  {
    alert("Please enter your name.");
    if (theForm.fullname.type != "hidden")
       { 
        theForm.fullname.focus();
       } 
    return (false);
  }

  if (theForm.fullname.value.length < 1)
  {
    alert("Please enter your name.");
    if (theForm.fullname.type != "hidden")
       { 
        theForm.fullname.focus();
       } 
    return (false);
  }
    // Validation script for field 'school'
  if (theForm.school.value == "")
  {
    alert("Please enter a school or organization.");
    if (theForm.school.type != "hidden")
       { 
        theForm.school.focus();
       } 
    return (false);
  }

  if (theForm.school.value.length < 1)
  {
    alert("Please enter a school or organization.");
    if (theForm.school.type != "hidden")
       { 
        theForm.school.focus();
       } 
    return (false);
  }
  
      // Validation script for field 'street'
  if (theForm.street.value == "")
  {
    alert("Please enter your street address.");
    if (theForm.street.type != "hidden")
       { 
        theForm.street.focus();
       } 
    return (false);
  }

  if (theForm.street.value.length < 1)
  {
    alert("Please enter your street address.");
    if (theForm.street.type != "hidden")
       { 
        theForm.street.focus();
       } 
    return (false);
  }
  
      // Validation script for field 'city'
  if (theForm.city.value == "")
  {
    alert("Please enter a city.");
    if (theForm.city.type != "hidden")
       { 
        theForm.city.focus();
       } 
    return (false);
  }

  if (theForm.city.value.length < 1)
  {
    alert("Please enter a city.");
    if (theForm.city.type != "hidden")
       { 
        theForm.city.focus();
       } 
    return (false);
  }

      // Validation script for field 'state'
  if (theForm.state.value == "")
  {
    alert("Please enter a state.");
    if (theForm.state.type != "hidden")
       { 
        theForm.state.focus();
       } 
    return (false);
  }

  if (theForm.state.value.length < 1)
  {
    alert("Please enter a state.");
    if (theForm.state.type != "hidden")
       { 
        theForm.state.focus();
       } 
    return (false);
  } 
  
      // Validation script for field 'zip'
  if (theForm.zip.value == "")
  {
    alert("Please enter your zip code.");
    if (theForm.zip.type != "hidden")
       { 
        theForm.zip.focus();
       } 
    return (false);
  }

  if (theForm.zip.value.length < 1)
  {
    alert("Please enter your zip code.");
    if (theForm.zip.type != "hidden")
       { 
        theForm.zip.focus();
       } 
    return (false);
  } 
  
      // Validation script for field 'phone'
  if (theForm.phone.value == "")
  {
    alert("Please enter your telephone number.");
    if (theForm.phone.type != "hidden")
       { 
        theForm.phone.focus();
       } 
    return (false);
  }

  if (theForm.phone.value.length < 1)
  {
    alert("Please enter your telephone number.");
    if (theForm.phone.type != "hidden")
       { 
        theForm.phone.focus();
       } 
    return (false);
  } 
  
  // Email field validation
  // Validation script for field 'email'
  if (theForm.email.value == "")
  {
    alert("Please enter your email address.");
    if (theForm.email.type != "hidden")
       { 
        theForm.email.focus();
       } 
    return (false);
  }

  if (theForm.email.value.length < 6)
  {
    alert("Please enter at least 6 characters for your email address.");
    if (theForm.email.type != "hidden")
       { 
        theForm.email.focus();
       } 
    return (false);
  }

  if (theForm.email.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Email Address\" field.");
    if (theForm.email.type != "hidden")
       { 
        theForm.email.focus();
       } 

    return (false);
  }

  if (theForm.email.value.indexOf("@",1) == -1)
  {
    alert("Not a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.indexOf(".",theForm.email.value.indexOf("@")+1) == -1)
  {
    alert("Not a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }

      // Validation script for field 'audience'
  if (theForm.audience.value == "")
  {
    alert("Please select a target audience.");
    if (theForm.audience.type != "hidden")
       { 
        theForm.audience.focus();
       } 
    return (false);
  }

      // Validation script for field 'dates'
  if (theForm.dates.value == "")
  {
    alert("Please enter at least one date.");
    if (theForm.dates.type != "hidden")
       { 
        theForm.dates.focus();
       } 
    return (false);
  }

  if (theForm.dates.value.length < 1)
  {
    alert("Please enter at least one date.");
    if (theForm.dates.type != "hidden")
       { 
        theForm.dates.focus();
       } 
    return (false);
  } 
  
        // Validation script for field 'dates'
  if (theForm.dates.value == "")
  {
    alert("Please enter at least one date.");
    if (theForm.dates.type != "hidden")
       { 
        theForm.dates.focus();
       } 
    return (false);
  }

  if (theForm.dates.value.length < 1)
  {
    alert("Please enter at least one date.");
    if (theForm.dates.type != "hidden")
       { 
        theForm.dates.focus();
       } 
    return (false);
  } 

  return (true);

}
