function goToFindProperty(theform,thePageId, thePageTitle, sefUrlStatus) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

  var theLoc = theform.criteria_location.value;
  var theType = theform.criteria_type.value;
  var theMinPrice = theform.criteria_minprice.value;
  var theMaxPrice = theform.criteria_maxprice.value;
  var theRef = theform.criteria_referenceno.value;
	var theBedrooms = theform.criteria_bedrooms.value;
	
	if (sefUrlStatus!='Y') {
		lochref = 'index.php?pageid='+thePageId+'&filter=Search&criteria=set';
	} else {
	  lochref = fileLocation+thePageTitle+'/pageid-'+thePageId+'/?filter=Search&criteria=set';
	}
  //lochref = '' + this.location;

	if (theRef != '') {
		lochref += '&ref=' + theRef;
	} else {
		if (theLoc != '') {	lochref += '&loc=' + theLoc; }
		if (theType != '') {	lochref += '&type=' + theType; }
		if (theMinPrice != '') {	lochref += '&minprice=' + theMinPrice; }
		if (theMaxPrice != '') {	lochref += '&maxprice=' + theMaxPrice; }
		if (theBedrooms != '') {	lochref += '&bedrooms=' + theBedrooms; }
	}

//  lochref = 'index.php' + location;
	
	//alert("The values are: "+theLoc+" "+theType+" "+theMinPrice+" "+theMaxPrice+" "+theRef+"The url is: "+lochref);
	location = lochref;
}

function goToFindPropertyQuick(theform,thePageId, thePageTitle, sefUrlStatus) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}
  var theType = theform.criteria_type2.value;
  var theMaxPrice = theform.criteria_maxprice2.value;
	var theBedrooms = theform.criteria_bedrooms2.value;

	if (sefUrlStatus!='Y') {
  	lochref = 'index.php?pageid='+thePageId+'&filter=Search&criteria=set';
	} else {
	  lochref = fileLocation+thePageTitle+'/pageid-'+thePageId+'/?filter=Search&criteria=set';
	}
  //lochref = '' + this.location;

	if (theType != '') {	lochref += '&type=' + theType; }
	if (theMaxPrice != '') {	lochref += '&maxprice=' + theMaxPrice; }
	if (theBedrooms != '') {	lochref += '&bedrooms=' + theBedrooms; }

//  lochref = 'index.php' + location;
	
	//alert("The values are: "+theLoc+" "+theType+" "+theMinPrice+" "+theMaxPrice+" "+theRef+"The url is: "+lochref);
	location = lochref;
}