function goToFindProperty(theform,thePageId) {
  var category = theform.category.value;
	//var forsale_field = theform.forsale.checked;
	//if (forsale_field == true) {
	//	var forsale = 'Y';
	//} else {
	//	var forsale = 'N';
	//}
  //var criteria_minprice = theform.criteria_minprice.value;
  //var criteria_maxprice = theform.criteria_maxprice.value;
  var criteria_areafrom = theform.criteria_areafrom.value;
  var criteria_areato = theform.criteria_areato.value;
	
  lochref = 'index.php?pageid='+thePageId+'&filter=Search&criteria=set';
  //lochref = '' + this.location;

	if (category != '') {	lochref += '&category=' + category; }
	//if (forsale != 'N') {	lochref += '&forsale=' + forsale; }
	//if (criteria_minprice != '') {	lochref += '&minprice=' + criteria_minprice; }
	//if (criteria_maxprice != '') {	lochref += '&maxprice=' + criteria_maxprice; }
	if (criteria_areafrom != '') {	lochref += '&areafrom=' + criteria_areafrom; }
	if (criteria_areato != '') {	lochref += '&areato=' + criteria_areato; }

	//lochref = 'index.php' + location;
	
	//alert("The values are: "+theLoc+" "+theType+" "+theMinPrice+" "+theMaxPrice+" "+theRef+"The url is: "+lochref);
	location = lochref;
}
function CategoryChange(theform) {
	var theCategory = theform.category.value;
	if ((theCategory == 'HO')||(theCategory == 'VI')) {
		theform.criteria_areafrom.disabled = false;
		theform.criteria_areato.disabled = false;
	} else {
		theform.criteria_areafrom.value = "";
		theform.criteria_areato.value = "";
		theform.criteria_areafrom.disabled = true;
		theform.criteria_areato.disabled = true;
	}
}
function ChangePriceRangeShowStatus(theform) {
	var checkBoxVal = theform.forsale.checked;
	if (checkBoxVal == true) {
		theform.criteria_minprice.disabled = false;
		theform.criteria_maxprice.disabled = false;
	} else {
		theform.criteria_minprice.disabled = true;
		theform.criteria_maxprice.disabled = true;
		theform.criteria_minprice.value = "";
		theform.criteria_maxprice.value = "";
	}
}