<!--
msg = "The following errors were encountered \n	------------------------- \n";
er = 0;
emVal = new RegExp("[\\w\_-]+@[\\w\_-]+\\.[\\w\_-]+");

function validateform()
{
v_Name();
v_Add();
v_City();
v_State();
v_Zip();
v_Country();
v_Email();
v_Phone();
v_Query();

	if(er != 0)
	{
		alert(msg);
		msg = "The following errors were encountered \n	------------------------- \n";
		er = 0;
		return false;
	}
}



//Validates Name
function v_Name()
{
	if((queryform.Name.value == "") || (isNaN(queryform.Name.value) != true))
	{
		er = 1;
		msg = msg + "Name missing or invalid\n";
	}
}

//Validates Street Address
function v_Add()
{
	if(queryform.StreetAdd.value == "") 
	{
		er = 1;
		msg = msg + "Street Address missing\n";
	}
}

//Validates City
function v_City()
{
	if((queryform.City.value == "") || (isNaN(queryform.City.value) != true))
	{
		er = 1;
		msg = msg + "City missing or invalid\n";
	}
}


//Validates State
function v_State()
{
	if((queryform.State.value == "") || (isNaN(queryform.State.value) != true))
	{
		er = 1;
		msg = msg + "State missing or invalid\n";
	}
}


//Validates Zipcode
function v_Zip()
{
	if((queryform.ZipCode.value == "") || (isNaN(queryform.ZipCode.value) != false))
	{
		er = 1;
		msg = msg + "ZipCode missing or invalid\n";
	}
}


//Validates Country
function v_Country()
{
	if((queryform.Country.value == "") || (isNaN(queryform.Country.value) != true))
	{
		er = 1;
		msg = msg + "Country missing or invalid\n";
	}
}


//Validates Email
function v_Email()
{
	if (!(emVal.test(queryform.Email.value)))
	{
		er = 1;
		msg = msg + "Email missing or not in correct format\n";
	}
}


//Validates Phone
function v_Phone()
{
	if((queryform.Phone.value == "") || (isNaN(queryform.Phone.value) != false))
	{
		er = 1;
		msg = msg + "Phone missing or invalid\n";
	}
}


//Validates Query
function v_Query()
{
var ch = 0;
	for(i=0;i<12;i++)
	{
	if(queryform.elements[i].checked)
		{
		ch = 1;
		}	
	}
	
	 if((queryform.query.value == "") && (ch == 0))
	{
		er = 1;
		msg = msg + "Query missing\n";
	}
}



//-->
