function SetClick(a){
	if(a == 1){// only sell
		document.form1.num_agents.value = "1";
		document.form1.ht.value = "bdjrehomelists";
		document.form1.buying_selling.value = "2";
	}
	if(a == 2){// only buy
		document.form1.num_agents.value = "1";
		document.form1.ht.value = "bdjrehomelistb";
		document.form1.buying_selling.value = "1";
	}
	if(a == 3){// sell+buy one agent
		document.form1.num_agents.value = "1";
		document.form1.ht.value = "bdjrehomelists1";
		document.form1.buying_selling.value = "3";
	}
	if(a == 4){// sell+buy two agents
		document.form1.num_agents.value = "2";
		document.form1.ht.value = "bdjrehomelists2";
		document.form1.buying_selling.value = "3";
	}
}

function searchCity(thisForm){
	// UPDATE THESE FOR TRACKING:
	var tmpHtTag   = "hlusasearch";
	var tmpEntryId = "3127";
	var tmpURL;

	tmpURL = "http://bl.homegain.com/";

	// Get city
	var tmpCity = thisForm.txtCity.value;
	// Trim white space from ends
	tmpCity = tmpCity.replace(/^\s*/, '').replace(/\s*$/, '');
	tmpCity = tmpCity.replace(' ', '-').replace(/\s*$/, '');

	// Get State
	var tmpState = thisForm.selState.options[thisForm.selState.selectedIndex].value;

	// build URL
	if(tmpState != ""){
		tmpURL += tmpState;
		tmpURL += "/";
		tmpURL += tmpCity.toLowerCase();
		tmpURL += ".html";
	}

	tmpURL += "?ht=" + tmpHtTag;
	tmpURL +="_" + tmpCity;
	tmpURL +="_" +tmpState;
	tmpURL += "&entryid=" + tmpEntryId;
	tmpURL += "&nopopup=1";

	//alert(tmpURL);
	window.open(tmpURL, '_blank');
}