function validateSearch()
{
	var searchform		= document.getElementById('searchform1');
	var seoLink			= '/products/';
	var needCityState	= false;
	var needState		= false;
	
	//
	//	Cleanup values first
	//
	searchform.address.value	= trim( searchform.address.value );
	searchform.city.value		= trim( searchform.city.value );
	searchform.zipcode.value	= trim( searchform.zipcode.value );
	
	
	//
	//	Remove period
	//
	searchform.address.value	= str_replace( '.', '', searchform.address.value );
	
	
	//
	//	Assign values to validate
	//
	var addressVal		= searchform.address.value;
	var cityVal			= searchform.city.value;
	var stateIndex		= searchform.state.selectedIndex;
	var zipcodeVal		= searchform.zipcode.value;
	
	//
	//	Address is ALWAYS required
	//
	if( empty( addressVal ) ) {
	
		alert("Please enter a valid address.");
		searchform.address.focus();
		return false;
	
	} else {
	
		//
		//	Cleanup
		//
		addressVal	= str_replace( " ", "-", addressVal );
		addressVal	= str_replace( ".", "", addressVal );
		
		//
		//	Put into SEO string
		//
		seoLink		+= addressVal + '/';
	
	}
	
	
	//
	//	Add city to seo link if entered
	//
	if( !empty( cityVal ) ) {
	
		//
		//	Cleanup
		//
		cityVal	= str_replace( " ", "-", cityVal );
		cityVal	= str_replace( ".", "", cityVal );
	
		seoLink		+= cityVal + '/';
		needState	= true;
	
	}
	

	//
	//	Add state to seo link if entered
	//
	if( needState ) {
	
		if( stateIndex > 0 ) {
	
			seoLink		+= searchform.state.value + '/';
	
		} else {
		
			alert('Please select a state');
			searchform.state.focus();
			return false;
		
		}
	
	}
	

	
	//
	//	Validate zip code if it was entered
	//
	if( !empty( zipcodeVal ) ) {
	
		var re 				= /^\d{5}([\-]\d{4})?$/;
		var isValid 		= re.test( zipcodeVal );
	
		if( !isValid ) {
		
			alert('The zip code you entered is invalid');
			searchform.zipcode.focus();
			return false;
		
		} else {
		
			seoLink		+= zipcodeVal + '/';
		
		}
	
	} else {
	
		needCityState	= true;
	
	}
	
	if( needCityState ) {
	
		if( empty( cityVal ) || stateIndex <= 0 ) {
		
			alert('You must enter a City and State or a Zip Code');
			return false;
		
		}
	
	}
	
	
	//
	//	Provide feedback to user
	//
	//searchform.searchProductsButton.disabled		= true;
	//searchform.searchProductsButton.value			= 'Please wait';
	//$('#in_progress2').colorbox({inline:true, open:true});
	//$.colorbox({href:"/account/orders.php"});
	//$.colorbox({inline:true, href:"#in_progress2"});
	
	return true;

} //end verifySearch()
