function CheckEl(ElObj){
 //и эта, кстати, тоже:)
 s = new String(ElObj.value);
 if((s.charAt(s.length-1)<'0')||(s.charAt(s.length-1)>'9')){
  ElObj.value=s.substring(0,s.length-1);
 } 
}
function Switch_options(Param){
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Квартира"){
		document.search.setAttribute("action","show_flats.php",false);
		//alert(document.search.getAttribute("action",true));
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Дом"){
		document.search.setAttribute("action","show_houses.php",false);
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Коммерческая недвижимость"){
		document.search.setAttribute("action","show_commerce.php",false);
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Земельный участок"){
		document.search.setAttribute("action","show_land.php",false);
	}

}

//Эта ф-ция работает:)
function go_search()
{
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Квартира"){
		parent.location.href = "show_flats.php?operation="+document.search.type_of_operation.value;
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Дом"){
		parent.location.href = "show_houses.php?operation="+document.search.type_of_operation.value;
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Коммерческая недвижимость"){
		parent.location.href = "show_commerce.php?operation="+document.search.type_of_operation.value;
	}
	if(document.search.nedvij.options[document.search.nedvij.selectedIndex].text=="Земельный участок"){
		parent.location.href = "show_land.php?operation="+document.search.type_of_operation.value;
	}
}

