function onSubmitForm()
{
	stateAbv ="_fl";

	loc = removeInvalidCharacters(document.forms[0].location.value);
	serv = document.forms[0].service.options[document.forms[0].service.selectedIndex].value
	rad = document.forms[0].radius.options[document.forms[0].radius.selectedIndex].value


	if (isNaN(loc)) {
		loc = loc+stateAbv
	}

	if (rad == 0) {
		subTo = "/"+serv+"/"+loc+".html"
	}else{
		subTo = "/"+serv+"/"+loc+"_"+rad+".html"
	}

	if(loc == "") {
		subTo = "/"+serv+"/"
		if (serv == "all_services") {
			subTo = "/all_florida_listings.html";
		}
	}

	document.forms[0].action = subTo
	return true;

}

/*replaces a given string with a valid str*/
function removeInvalidCharacters (stringToCheck) {
	var rExp;
	stringToCheckObj = new String(stringToCheck).toLowerCase();


	stringToCheckObj = stringToCheckObj.replace(/^\s*|\s*$|/g,"");//this call is the same as Trim(str)
	stringToCheckObj = stringToCheckObj.replace(/florida|,|fl/g,"");
	stringToCheckObj = stringToCheckObj.replace(/ /g,"_"); //replace spaces with underscores

	return stringToCheckObj;
}
