function ViewRentals(){
	switch(document.getElementById("FindOption").value){
		case '1':
			window.location="http://framed.smartlocating.com//searchbasic.aspx?siteid=24b40fee-8d7f-4b7d-86f6-34b64a2408a0";
		break;
		case '2':
			window.location = "http://oneaustinrealty.idxre.com/idx/searchMap.cfm?cid=44255&showResults=1&cl=1855&bc=0&bd=2&mxlp=5000&mnlp=500&pc=RES&pt=RNT&sb=pd&sf=0&att=1&rt=1";
		break;
		case '3':
			window.location = "http://www.idxre.com/idx/listingsMap.cfm?cid=44255&lstp=hotSheets&hid=26464#_";
		break;
		
	}
}

function SwapCitiesZip(){
	var cityDiv = document.getElementById("cityDiv");
	var zipDiv = document.getElementById("zipDiv");
	
	zipDiv.style.display = (zipDiv.style.display=="none")? "block":"none";
	cityDiv.style.display = (cityDiv.style.display=="none")? "block":"none";
}

function prepareForm(){

	var selectElem = document.getElementById("cityList");
	var result = ''; 
	var started = false;
	for (var i = 0; i < selectElem.length; i++) {
		if (selectElem.options[i].selected) {
			if(started) result += ',';
			result +=  selectElem .options[i].value;
			started = true;
		}
	}
	document.getElementById("cl").value = result;

	selectElem = document.getElementById("zipList");
	var result = ''; 
	var started = false;
	for (var i = 0; i < selectElem.length; i++) {
		if (selectElem.options[i].selected) {
			if(started) result += ',';
			result +=  selectElem .options[i].value;
			started = true;
		}
	}
	document.getElementById("zip").value = result;

	return false;
}