/* Required Fields
First Name              fname
Last Name               lname
Business/Organization   org
E-mail Address          email
Home Phone              phoneh
Street Address          street
City                    city
State                   state
Zip/Postal Code         zip
*/


function verify(s)
{

	isName  = /^[A-Za-z'\-\ ]+$/;
	isValidString = /^[A-Za-z0-9'@\ \/\n\/\r\-\.\,\:\\\_\/\(\)\ ]+$/;
	isPhone =	/^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$/;
	isZipCode = /^(\d{5})|([A-Za-z]\d[A-Za-z]\d[A-Za-z]\d)$/;


	if (document.forms[1])
	{

		var msg = "Error: Missing or Incorrect Information!\n";
		var error_msg = "";

        /*=============================================================================*/
		if ((document.Form1.fname.value == "") || (document.Form1.fname.value == null))
		{
			error_msg += "\n \* First Name is a REQUIRED Field.";
		}
		else
		{
			if (!isName.test(document.Form1.fname.value))
				error_msg += "\n \* Data Entered in the First Name Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.lname.value == "") || (document.Form1.lname.value == null))
		{
			error_msg += "\n \* Last Name is a REQUIRED Field.";
		}
		else
		{
			if (!isName.test(document.Form1.lname.value))
				error_msg += "\n \* Data Entered in the Last Name Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.org.value == "") || (document.Form1.org.value == null))
		{
			error_msg += "\n \* Business/Organization is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.org.value))
				error_msg += "\n \* Data Entered in the Business/Organization Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.email.value == "") || (document.Form1.email.value == null))
		{
			error_msg += "\n \* Email is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.email.value))
				error_msg += "\n \* Data Entered in the Email Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.phoneh.value == "") || (document.Form1.phoneh.value == null))
		{
			error_msg += "\n \* Home Phone is a REQUIRED Field.";
		}
		else
		{
			if (!isPhone.test(document.Form1.phoneh.value))
				error_msg += "\n \* Data Entered in the Home Phone Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.street.value == "") || (document.Form1.street.value == null))
		{
			error_msg += "\n \* Street is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.street.value))
				error_msg += "\n \* Data Entered in the Street Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.city.value == "") || (document.Form1.city.value == null))
		{
			error_msg += "\n \* City is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.city.value))
				error_msg += "\n \* Data Entered in the City Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.state.value == "") || (document.Form1.state.value == null))
		{
			error_msg += "\n \* State is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.state.value))
				error_msg += "\n \* Data Entered in the State Field is INVALID";
		}
        /*=============================================================================*/


        /*=============================================================================*/
		if ((document.Form1.zip.value == "") || (document.Form1.zip.value == null))
		{
			error_msg += "\n \* Zip/Postal Code is a REQUIRED Field.";
		}
		else
		{
			if (!isValidString.test(document.Form1.zip.value))
				error_msg += "\n \* Data Entered in the Zip/Postal Code Field is INVALID";
		}
        /*=============================================================================*/


		if (error_msg)
		{
			alert(msg+error_msg);
			return false;
		}

	}

}

