/* newspublications form validator */

	function Form1_Validator(theForm)
	{

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

	  if (theForm.Name.value.length < 2)
	  {
	    alert("Please enter at least 2 characters in the \"Name\" field.");
	    theForm.Name.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 < 2)
	  {
	    alert("Please enter at least 2 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.City.value.length < 2)
	  {
	    alert("Please enter at least 2 characters in 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.State.value.length < 2)
	  {
	    alert("Please enter at least 2 characters in 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.Zip.value.length < 2)
	  {
	    alert("Please enter at least 2 characters in the \"Zip\" field.");
	    theForm.Zip.focus();
	    return (false);
	  }

	var regex = /([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})/gi
	  if (!regex.test(theForm.Email.value))
	  {
	    alert("Please enter a valid Email address");
	    theForm.Email.focus();
	    return (false);
	  }
	  
	  
	  return (true);
	}

