

function SEO_search(){var b,a;b="";a=SEO_search.arguments;a=document.search_iresform.sel_sale.value;var c=/\u00f1/i,e=/properties/,g=/category/;if(document.search_iresform.province)if(document.search_iresform.province.value)a=a+"province/"+document.search_iresform.province.value.replace(c,"%F1")+"/";if(document.search_iresform.location)if(document.search_iresform.location.value)a=a+"location/"+escape(document.search_iresform.location.value)+"/";if(document.search_iresform.subarea)if(document.search_iresform.subarea.value)a=
a+"subarea/"+escape(document.search_iresform.subarea.value.replace(c,"%F1"))+"/";var d=false;if(document.search_iresform.category)if(document.search_iresform.category.value=="0"){a=aux=a.replace(e,"developments").replace(g,"");d=true}else if(document.search_iresform.category.value)a=a+"category/"+document.search_iresform.category.value.replace(c,"%F1")+"/";if(d==false)if(document.search_iresform.resbudgetpath)if(document.search_iresform.resbudgetpath.value)a=a+document.search_iresform.resbudgetpath.value+
"/";document.search_iresform.action=a;document.MM_returnValue=b==""}
function fillSelectFromArray(b,a,c,e,g,d,h,j){var f;e=0;for(c=b.options.length;c>=0;c--)b.options[c]=null;if(f==null)f=0;else{b.options[0]=new Option(f);f=1}if(a!=null){for(c=0;c<a.length;c++){b.options[f]=new Option(a[c][0]);if(a[c][1]!=null){b.options[f].value=a[c][1];if(a[c][1]==d&&b.name=="province")e=c;if(a[c][1]==h&&b.name=="location")e=c}f++}if(b.name=="province"){b.options[e].selected=true;j=="rent_"?fillSelectFromArray(document.search_iresform.location,rent_ar_cities[e],"","","",d,h,j):fillSelectFromArray(document.search_iresform.location,
ar_cities[e],"","","",d,h,j)}if(b.name=="location")b.options[e].selected=true}}function resetSel(b,a,c){for(i=b.options.length;i>=0;i--)b.options[i]=null;if(a>0){fr=a==1?"villes":"zones";es=a==1?"ciudades":"zonas";en=a==1?"cities":"subareas";switch(c){case "fr":msg="Toutes les "+fr;break;case "es":msg="Todas las "+es;break;case "en":msg="All "+en;break}b.options[0]=new Option(msg,0,false,false)}}
function selectIt(b,a){i=0;for(found=false;found==false&&i<b.options.length;){if(b.options[i].value==a)return found=b.options[i].selected=true;i++}return true}
function setSel(b,a,c,e,g){resetSel(c,0,"not important");var d=a.split(" ");a=d[0];if(d.length>1)for(cont=1;cont<d.length;cont++)a+="_"+d[cont];d=a.split("-");a=d[0];if(d.length>1)for(cont=1;cont<d.length;cont++)a+=d[cont];d=a.split("\u00f1");a=d[0];if(d.length>1)for(cont=1;cont<d.length;cont++)a+="ny"+d[cont];if(e==true)a="P_"+a;for(i=0;i<b[a].length;i++){select=false;c.options[i]=new Option(b[a][i],i==0?"":b[a][i],select,select)}selectIt(c,g)};
function afficheId(baliseId){if(document.getElementById&&document.getElementById(baliseId)!=null){document.getElementById(baliseId).style.visibility='visible';document.getElementById(baliseId).style.display='block';}}