function Form1_Validator(theForm)
{

	var valid = "0123456789";

	// ----------------------------------------------------------------------------------------------
	// Validate the Last Name
	// ----------------------------------------------------------------------------------------------
	if (theForm.LastName.value == "")
	{
		alert("Last Name cannot be blank.");
		theForm.LastName.focus();
		return (false);
	}

	if (theForm.LastName.value.length < 2)
	{
		alert("Last Name must have at least 2 characters.");
		theForm.LastName.focus();
		return (false);
	}

	if (theForm.LastName.value.length > 40)
	{
		alert("Last Name cannot have more than 40 characters.");
		theForm.LastName.focus();
		return (false);
	}


	// ----------------------------------------------------------------------------------------------
	// Validate the First Name
	// ----------------------------------------------------------------------------------------------
	if (theForm.FirstName.value == "")
	{
		alert("First Name cannot be blank.");
		theForm.FirstName.focus();
		return (false);
	}

	if (theForm.FirstName.value.length < 2)
	{
		alert("First Name must have at least 2 characters.");
		theForm.FirstName.focus();
		return (false);
	}

	if (theForm.FirstName.value.length > 40)
	{
		alert("First Name cannot have more than 40 characters.");
		theForm.FirstName.focus();
		return (false);
	}

	// ----------------------------------------------------------------------------------------------
	// Validate the Address
	// ----------------------------------------------------------------------------------------------
	if (theForm.Address.value == "")
	{
		alert("Address cannot be blank.");
		theForm.Address.focus();
		return (false);
	}

	if (theForm.Address.value.length < 2)
	{
		alert("Address must have at least 2 characters.");
		theForm.Address.focus();
		return (false);
	}

	if (theForm.FirstName.value.length > 40)
	{
		alert("Address cannot have more than 40 characters.");
		theForm.Address.focus();
		return (false);
	}

	// ----------------------------------------------------------------------------------------------
	// Validate the Zip Code
	// ----------------------------------------------------------------------------------------------
	if (theForm.ZipCode.value.length != 5)
	{
		alert("Zip Code must have five numbers.");
		theForm.ZipCode.focus();
		return (false);
	}
	//for (var i=0; i < theForm.ZipCode.value.length; i++)
	//{
		//temp = "" + theForm.ZipCode.substring(i, i+1);
		//if (valid.indexOf(temp) == "-1")
		//{
			//alert("Invalid characters in your zip code.  Please try again.");
			//theForm.ZipCode.focus();
			//return false;
		//}
	//}


	// ----------------------------------------------------------------------------------------------
	// Validate the agreement to the Terms and Conditions.
	// ----------------------------------------------------------------------------------------------
    if (theForm.TandC.value != "YES")
    {
        alert("You must signify that you agree to the terms and conditions of the registraiton by typing \"YES\" where indicated.");
        theForm.TandC.focus();
        return false;
    }
    	
    return (true);
}
