function  ValidateForm1(thisForm)
{	
	if  (!hasValue(thisForm.state_code, "SELECT" ))
	{
		if  (!onError(thisForm.state_code, "You must select a state."))
		{
			return false;
		}
	}
	return true;
}

function  ValidateForm2(thisForm)
{	
/*	if  (!hasValue(thisForm.state_code, "SELECT" ))
	{
		if  (!onError(thisForm.state_code, "You must select a state."))
		{
			return false;
		}
	}
*/	
	if  (!hasValue(thisForm.zip, "TEXT" ))
	{
		if  (!onError(thisForm.zip, "Please enter a ZIP code."))
		{
			return false;
		}
	}

	if  (!checkzip(thisForm.zip.value))
	{
		if  (!onError(thisForm.zip, "Please enter a valid ZIP code."))
		{
			return false;
		}
	}
	return true;
}

function  ValidateForm5(thisForm)
{	
	if  (!hasValue(thisForm.city, "TEXT" ))
	{
		if  (!onError(thisForm.city, "You must enter a value for city name."))
		{
			return false;
		}
	}
	return true;
}

function  ValidateForm6(thisForm)
{	
	if  (!hasValue(thisForm.zip, "TEXT" ))
	{
		if  (!onError(thisForm.zip, "Please enter a ZIP code."))
		{
			return false;
		}
	}

	if  (!checkzip(thisForm.zip.value))
	{
		if  (!onError(thisForm.zip, "Please enter a valid ZIP code."))
		{
			return false;
		}
	}
	return true;
}

function  ValidateForm3(thisForm)
{	

	if  (!checkinteger(thisForm.listing_number.value))
	{
		if  (!onError(thisForm.listing_number, "Please enter a valid listing number (8 digits )."))
		{
			return false;
		}
	}
	if  (!numberrange(thisForm.listing_number.value,1,99999999))
	{
		if  (!onError(thisForm.listing_number, "Please enter a valid listing number (8 digits )."))
		{
			return false;
		}
	}
	
	return true;
}

function  ValidateForm4(thisForm)
{	
	if  (hasValue(thisForm.zip, "TEXT" ))
	{
		if  (!checkzip(thisForm.zip.value))
		{
			if  (!onError(thisForm.zip, "Please enter a valid ZIP code."))
			{
				return false;
			}
		}
		else return true;
	}


	if  (!hasValue(thisForm.state_code, "SELECT" ))
	{
		if  (!onError(thisForm.state_code, "You must select a state."))
		{
			return false;
		}
	}
/*	
	if  (!hasValue(thisForm.city, "TEXT" ))
	{
		if  (!onError(thisForm.city, "Please enter a city name."))
		{
			return false;
		}
	}
*/
	return true;
}
