function resetSelects(){
	var data = "cmd=resetSelects"
	data = data + '&SelPropertyType=' + document.getElementById('SelPropertyType').options[document.getElementById('SelPropertyType').selectedIndex].value;	
	data = data + '&SelBedroom=' + document.getElementById('SelBedroom').options[document.getElementById('SelBedroom').selectedIndex].value;	
	data = data + '&SelLocation=' + document.getElementById('SelLocation').options[document.getElementById('SelLocation').selectedIndex].value;	
	data = data + '&SelViewCount=' + document.getElementById('SelViewCount').options[document.getElementById('SelViewCount').selectedIndex].value;	
	replaceHtml ( 'spnBtnSearch', "<img src='/util/ajax/progressImg.gif'>");
	//window.alert ( data ) ;
	sendRequest( _afterResetSelects, data, "POST", "/search-call.asp", true );
}

function _afterResetSelects( oj ) {
	
	try{
		var xmlDoc  = oj.responseXML;	
		var result = xmlDoc.getElementsByTagName("result")[0].firstChild.nodeValue;
		if (result =="ok"){
			replaceHtml ("spnSelPropertyType", xmlDoc.getElementsByTagName("SelPropertyTypeHTML")[0].firstChild.nodeValue );
			replaceHtml ("spnSelBedroom", xmlDoc.getElementsByTagName("SelBedroomHTML")[0].firstChild.nodeValue );
			replaceHtml ("spnSelLocation", xmlDoc.getElementsByTagName("SelLocationHTML")[0].firstChild.nodeValue );
			replaceHtml ("spnSelViewCount", xmlDoc.getElementsByTagName("SelViewCountHTML")[0].firstChild.nodeValue );
		}
	}catch(e){
		window.alert ( e ) ; 
	}finally{		
		replaceHtml ( 'spnBtnSearch', '');	
	}
}

function submit_Search(){
	try{
		document.getElementById('txtCommand').value="search";
	}catch(e){		
	}finally{
		document.frmSearch.submit();
	}
}

function checkClick( strName ){
	try{
		var chkName = "chkAmenity" + strName;
		var checkboxName = "checkbox" + strName;

		document.getElementById(chkName).value = document.getElementById(checkboxName).checked;
		submit_Search();
	}catch(e){
	}
}