function submitForm(site_url)
{

	reWhiteSpace = new RegExp(/^\s+$/);
	var keywords = jQuery('#searchTerm').val();
	if(keywords=='') {
		keywords = jQuery('#searchTerm1').val();
	}

	var location = jQuery('#searchLocation').val();
	//alert(keywords);
	//alert(location);

	if(keywords == "" || keywords == "eg. Business, Brand or Service"){

		alert("Please enter keywords!");
		jQuery('#keywords').focus();
		return false;
	}
	else if(reWhiteSpace.test(keywords))
	{
		alert("Please enter the correct keyword!");
		jQuery('#keywords').focus();
		return false;
	}
	else
	{

		temp = location.split(",");
		var city = '';
		var state = '';
		if(temp[0]) city = temp[0];
		if(temp[1]) state = temp[1];
		//alert(site_url);

		var search_url = site_url.substr(0, site_url.length);

		//if(state!='') {search_url += "/"+state.toLowerCase().replace(/^\s*/, "").replace(/\s*$/, "");}
		//if(city!='') {search_url += "/"+city.toLowerCase().replace(/^\s*/, "").replace(/\s*$/, "").replace(/\s+/g, "-");}
		if(keywords) {search_url += "/search/"+keywords.replace(/\s+/g, '-').replace(/&/g, 'and').replace(/'/g, '').toLowerCase();}
		
		//alert(search_url);

		window.location = search_url;
	}
}
