function validateFields(){	
	if ((document.search.city.value == "") 
		&& (document.search.bdrms.value == "") 
		&& (document.search.price.value == "") 
		&& (document.search.name.value == "") )	{
		/**Check for selection*/		
		alert("You must select at least one option to perform a search.");		
		document.search.city.focus();		
		return false;	
	}	
	if (document.search.city.value == "0") {		
		if (!confirm("You have selected all areas. This may take some time, as we have a LOT of properties!")) {					return false;		
		}	
	}		
	/**Submit the form.*/	
	return true;
}
function select_popup(src,features,target) {
	var selectedOption = src.options[src.selectedIndex]
	return raw_popup(selectedOption.value,
    target || '_blank',
    features);
}
function event_select_popup_features(target,features) {
	return function(e) {
		var objSelect = e.currentTarget;
		if (objSelect.options[objSelect.selectedIndex].value != 0) {
			select_popup(objSelect,features,target);
			objSelect.selectedIndex = 0;
			e.preventDefault();
		}
	}
}
var popupTarget = "propPopupv";

function setVillanamePopups() {
	if (document.all) {
		$('.villaPopupLink').bind("click",event_popup_features(propPopupParms3IE));	
	}
	else if (BrowserDetect.browser == "Safari") { //check for Safari
		$('.villaPopupLink').bind("click",event_popup_features(propPopupParms3w));	
	}
	else {
		$('.villaPopupLink').bind("click",event_popup_features(propPopupParms3));
	}
}
function AddSfHover(hoverObj) {
	if (document.all&&document.getElementById) {
		hoverObj.onmouseover=function() {this.className+=" sfHover";}
		hoverObj.onmouseout=function() {this.className=this.className.replace(" sfHover", "");}
	}
}
function setMinisearch() {
	$("#allVillas").find('ul').bgIframe({opacity:false});
	AddSfHover(document.getElementById("hoverDiv"));
	setVillanamePopups()
}
