if((document.URL.substr(34,9)=="search/ap")||(document.URL.substr(34,7)=="search?")||(document.URL.substr(34,7)=="search#")){
  //IE 7
  if($.browser.msie && ($.browser.version == 7)){
	//NO FILTRI
	if(document.getElementById('certified_price_filter')==null){
		//SOLO UNA PAGINA RISULTATI
	    if(document.getElementsByTagName('h3').item(1)==null){
			//NESSUN RISULTATO
	        if(document.getElementById('apartment_row_1')==null){
				    document.getElementById("search_result_map").style.display="none";
				    document.write("<style>.inner.new_search_inline{position:relative;top:-19px!important;}.new_search_but{position:relative;top:-90px!important;}#footer{position:relative;top:-308px;}</style>");
			        }
			//MENO DI 4 RISULTATI
		    else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')==null)){
				          document.write("<style>#search_result_map{height:218px!important;}#footer{position:relative;top:-291px;}</style>");
			              }
			//4 RISULTATI
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')!=null)&&(document.getElementById('apartment_row_5')==null)){
				          document.write("<style>#search_result_map{height:386px!important;}#footer{position:relative;top:-291px;}</style>");
			              }
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
				          document.write("<style>#search_result_map{height:554px!important;}#footer{position:relative;top:-291px;}</style>");
			              }
            }
		//PIU' PAGINE RISULTATI
        else if(document.getElementsByTagName('h3').item(1)!=null){
			//MENO DI 4 RISULTATI
		    if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')==null)){
				          document.write("<style>#search_result_map{height:347px!important;}#footer{position:relative;top:-291px;}</style>");
			              }
			//4 RISULTATI
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')!=null)&&(document.getElementById('apartment_row_5')==null)){
				          document.write("<style>#search_result_map{height:515px!important;}#footer{position:relative;top:-291px;}</style>");
			              }
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
				         document.write("<style>#search_result_map{height:682px!important;}#footer{position:relative;top:-291px;}</style>");
			             }
	        }
	}
	//SI FILTRI
	else if(document.getElementById('certified_price_filter')!=null){
		//SOLO UNA PAGINA RISULTATI
	    if(document.getElementsByTagName('h3').item(1)==null){
			//NESSUN RISULTATO
	        if(document.getElementById('apartment_row_1')==null){
				    document.getElementById("search_result_map").style.display="none";
					document.write("<style>.inner.new_search_inline{position:relative;top:-19px!important;}.right_part  form#searchSortingForm{position:relative;top:-204px!important;}.new_search_but{position:relative;top:-90px!important;}#footer{position:relative;top:-318px;}</style>");
			        }
			//FINO A 5 RISULTATI	  
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_5')==null)){
			              document.write("<style>#search_result_map{height:265px!important;}#footer{position:relative;top:-301px;}</style>");
			              }
			//5 RISULTATI	  
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_5')!=null)){
			              document.write("<style>#search_result_map{height:282px!important;}#footer{position:relative;top:-301px;}</style>");
			              }  
            }
		//PIU' PAGINE RISULTATI
        else if(document.getElementsByTagName('h3').item(1)!=null){
			//MENO DI 5 RISULTATI
			if(document.getElementById('apartment_row_5')==null){
				    
					document.write("<style>#search_result_map{height:227px!important;}#footer{position:relative;top:-301px;}</style>");
			}
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
			             document.write("<style>#search_result_map{height:395px!important;}#footer{position:relative;top:-301px;}</style>");
			             }
	        }
	}
  }
  //IE 8
  if($.browser.msie && ($.browser.version == 8)){
	//NO FILTRI
	if(document.getElementById('certified_price_filter')==null){
		//SOLO UNA PAGINA RISULTATI
	    if(document.getElementsByTagName('h3').item(1)==null){
			//NESSUN RISULTATO
	        if(document.getElementById('apartment_row_1')==null){
				    document.getElementById("search_result_map").style.display="none";
				    document.write("<style>.inner.new_search_inline{position:relative;top:-19px!important;}.new_search_but{position:relative;top:-90px!important;}#footer{position:relative;top:-192px;}</style>");
			        }
			//MENO DI 4 RISULTATI
		    else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')==null)){
				          document.write("<style>#search_result_map{height:222px!important;}#footer{position:relative;top:-175px;}</style>");
			              }
			//4 RISULTATI
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')!=null)&&(document.getElementById('apartment_row_5')==null)){
				          document.write("<style>#search_result_map{height:390px!important;}#footer{position:relative;top:-175px;}</style>");
			              }
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
				          document.write("<style>#search_result_map{height:558px!important;}#footer{position:relative;top:-175px;}</style>");
			              }
            }
		//PIU' PAGINE RISULTATI
        else if(document.getElementsByTagName('h3').item(1)!=null){
			//MENO DI 4 RISULTATI
		    if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')==null)){
				          document.write("<style>#search_result_map{height:351px!important;}#footer{position:relative;top:-175px;}</style>");
			              }
			//4 RISULTATI
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_4')!=null)&&(document.getElementById('apartment_row_5')==null)){
				          document.write("<style>#search_result_map{height:519px!important;}#footer{position:relative;top:-175px;}</style>");
			              }
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
				         document.write("<style>#search_result_map{height:687px!important;}#footer{position:relative;top:-175px;}</style>");
			             }
	        }
	}
	//SI FILTRI
	else if(document.getElementById('certified_price_filter')!=null){
		//SOLO UNA PAGINA RISULTATI
	    if(document.getElementsByTagName('h3').item(1)==null){
			//NESSUN RISULTATO
	        if(document.getElementById('apartment_row_1')==null){
				    document.getElementById("search_result_map").style.display="none";
					document.write("<style>.inner.new_search_inline{position:relative;top:-19px!important;}.right_part  form#searchSortingForm{position:relative;top:-204px!important;}.new_search_but{position:relative;top:-90px!important;}#footer{position:relative;top:-203px;}</style>");
			        }
			//FINO A 5 RISULTATI	  
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_5')==null)){
			              document.write("<style>#search_result_map{height:265px!important;}#footer{position:relative;top:-185px;}</style>");
			              }
			//5 RISULTATI	  
			else if((document.getElementById('apartment_row_1')!=null)&&(document.getElementById('apartment_row_5')!=null)){
			              document.write("<style>#search_result_map{height:282px!important;}#footer{position:relative;top:-185px;}</style>");
			              }  
            }
		//PIU' PAGINE RISULTATI
        else if(document.getElementsByTagName('h3').item(1)!=null){
			//MENO DI 5 RISULTATI
			if(document.getElementById('apartment_row_5')==null){
				    
					document.write("<style>#search_result_map{height:243px!important;}#footer{position:relative;top:-185px;}</style>");
			}
			//5 RISULTATI	  
			else if(document.getElementById('apartment_row_5')!=null){
			             document.write("<style>#search_result_map{height:411px!important;}#footer{position:relative;top:-185px;}</style>");
			             }
	        }
	}
  }
}
