function gotolist(value){
	if(value == 0) {
		alert("Please select Country");
		document.getElementById('countrytopmenu').focus();
		return false;
	}
	window.location = "list_property.php?country="+value;
}


function Search(){

	var frmObject=document.formsearch;
	var country = frmObject.country.value;	
	
	if(OptValidateSingle(frmObject.radio,"Rent or For Sale")==false) return false;
	
	document.formsearch.action="simple_results.php";
	document.formsearch.submit();		

}
function OptValidateSingle(optCtrl,msg) 
{
	var itemchecked = false;
	for(var i = 0 ; i < optCtrl.length; i++) 
	{
		if(optCtrl[i].checked)
		{
		  itemchecked = true;
		  return(optCtrl[i].value);
		}
	}
	if(!itemchecked) 
	{
		alert("Please choose an option for "+msg+".");
		if(optCtrl[0].focus)
			optCtrl[0].focus();
		return false;
	}
} // Function End
function select_check(comp)

{

		// Make sure a selection list is used

		var listCheck = comp.selectedIndex;

		if (comp.options[listCheck].value=="none") {

   		return false;

		}

}



function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

function get_type()

{

					for (i = 0; i < document.formsearch.radio.length; i++) 

					{

	   					if (document.formsearch.radio[i].checked){

	       					var val=document.formsearch.radio[i].value;

	   					}

					}

						if(val=='Rent'){

						

						var objselect=document.getElementById("pricefm");

 						objselect.style.visibility="hidden";	

						var objselect=document.getElementById("priceto");

 						objselect.style.visibility="hidden";	
						var objselect=document.getElementById("currency");
						objselect.style.visibility="hidden";		

						}

						else{

							

							var objselect=document.getElementById("pricefm");

 						objselect.style.visibility="visible";	

						var objselect=document.getElementById("priceto");

 						objselect.style.visibility="visible";
						var objselect=document.getElementById("currency");
						objselect.style.visibility="visible";							

						}	

	}
function displaybedrooms(value){
 	if(value ==4 ){
		document.getElementById("bedrooms").style.display='none';
	}else{
		document.getElementById("bedrooms").style.display='';
	}	
}
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
