 

 
  function validateFields(formData) {
	if(formData.pricefrom.value != '') {
		if(isNaN(formData.pricefrom.value)) {
			alert('Price range must be entered without currency symbols, commas or spaces - for example 75000 - not 75,000.');
			return (false);
		}
		num = new Number(formData.pricefrom.value);
		if(num.valueOf() < 0 ) {
			alert('Price Range From: Cannot be less than zero');
			return (false);
		}
	}
	if(formData.priceto.value != '') {
		if(isNaN(formData.priceto.value)){
			alert('Price range must be entered without currency symbols, commas or spaces - for example 75000 - not 75,000.');
			return false;
		}
		num = new Number(formData.priceto.value);
		if(num.valueOf() < 0 ) {
			alert('Price Range To: Cannot be less than zero');
			return (false);
		}
	}
	if(formData.pricefrom.value != '' && formData.priceto.value != '')	{
		numfrom = new Number(formData.pricefrom.value);
		numto = new Number(formData.priceto.value);
		if(numfrom.valueOf() > numto.valueOf()){
			alert('From price cannot be greater than to price');
			return (false);
		}
	}
	return true;
   }

   function show(object) {
       if (document.layers && document.layers[object]){
           document.layers[object].visibility = 'visible';
       } else if (document.all) {
           document.all[object].style.visibility = 'visible';
           document.all[object].style.zIndex = 1;
       }
   }

   function hide(object) {
       if (document.layers && document.layers[object]){
           document.layers[object].visibility = 'hidden';
       } else if (document.all) {
           document.all[object].style.visibility = 'hidden';
       }
   }