<!-- Web Generada con iCatalog Inmobiliarias http://www.innova22.com/icatalog. (V.2.1.43) (Licencia 942C - 1394 - E8CB)--> 



function replace(originalString,searchText,replaceText) { 
var strLength = originalString.length; 
var txtLength = searchText.length; 
if ((strLength == 0) || (txtLength == 0)) 
{ return originalString; } 
var i = originalString.indexOf(searchText); 
if ((!i) && (searchText != originalString.substring(0,txtLength))) 
{ return originalString; } 
if (i == -1) 
{ return originalString; } 
var newstr = originalString.substring(0,i) + replaceText; 
if (i+txtLength < strLength) 
{ newstr += replace(originalString.substring(i+txtLength,strLength),searchText,replaceText); } 
return newstr;} 


function currency(anynum) {
   //-- Returns passed number as string in $xxx,xxx.xx format.
   anynum=eval(anynum)
   
   workNum=Math.abs((Math.round(anynum*100)/100));
   workStr=replace(""+workNum,".",",")
   if (workStr.indexOf(",")==-1){workStr+=",00"}
   dStr=workStr.substr(0,workStr.indexOf(","));dNum=dStr-0
   pStr=workStr.substr(workStr.indexOf(","))
   while (pStr.length<3){pStr+="0"}

   //--- Adds comma in thousands place.
   if (dNum>=1000) {
      dLen=dStr.length
      dStr=parseInt(""+(dNum/1000))+"."+dStr.substring(dLen-3,dLen)
   }

   //-- Adds comma in millions place.
   if (dNum>=1000000) {
      dLen=dStr.length
      dStr=parseInt(""+(dNum/1000000))+"."+dStr.substring(dLen-7,dLen)
   }
   retval = dStr + pStr 
   //-- Put numbers in parentheses if negative.
   if (anynum<0) {retval="- "+retval}
   return retval
}


function buscar (CodPoblacioB,Importe1B,Importe2B, TipoViviendaB) 
{
     
       var html="";
       var cl = "";
       var sw = 0;
       var c=0;
       var url=""       
     
     

      

       for (var ind=0; ind < CodPoblacio.length; ind++) {
              if (TipoViviendaList[ind]=="") { 
                       TipoViviendaList[ind]="0";
                  }    

            if (CodPoblacio[ind] == CodPoblacioB || CodPoblacioB == "") {
               if (Import1[ind] > parseInt(Importe1B, 10) || Importe1B == "") {  
                   if (Import1[ind] < parseInt(Importe2B, 10) || Importe2B == "")  {
                     if (TipoViviendaList[ind] == TipoViviendaB || TipoViviendaB=="") {
            //generamos una linea de la taula
             
               c++;
               url = "<a href='" + CodReg[ind] + ".html' class='smalltext'>" ;
          html=html+" <table cellspacing=1 cellpadding=0 bgcolor=#7bb64a width=280><tr><td>";
          html=html+"<TABLE BORDER=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpading=1>";
          html=html+"<TR><TD bgColor=#EFE7E7 class=titularmenu colspan=2><b>" + Descripcion[ind]  + "</b></TD></TR>";
           html=html+"<TR onClick=\"javascript:document.location.href='"+ CodReg[ind] +".html' \"style='cursor:pointer;cursor:hand' onMouseOver=\"this.style.backgroundColor='#EFE7E7'\" onMouseOut=\"this.style.backgroundColor='#FFFFFF'\"><TD valign=top width=112 ><table border=0 cellspacing=1 cellpading=0><tr><td bgcolor=#333333><a href='"+ CodReg[ind] +".html'> <img src='"+ImageList[ind] + "small.jpg' border =0 width=112 height=84></a></td></tr></table></TD>";
           html=html+"<TD align=left >";
           html=html+"<TABLE BORDER=0 width=100%>";
           html=html+"<TR><TD class='smalltext'><b>Zona:</b></TD><TD class='smalltext'>" + DescPoblacio[ind] + "</TD></TR>";
           html=html+"<TR><TD class='smalltext'><b>Superficie:</b></TD><TD class='smalltext'>"+ Superficie[ind] +"</a></TD></TR>";
           html=html+"<TR><TD Class='smalltext'><b>Precio:</b></TD><TD class='smalltext'>" + currency(Import1[ind]) + "</a></TD></TR>";
          html=html+" <tr><td colspan=2 align=right><a href='"+ CodReg[ind] +".html'  class=smalltext>[+ Información]</a></td></tr>";
          html=html+" </TABLE>";
          html=html+"</TD>";
          html=html+"</TABLE>";  
         html=html+"</tr>";
        html=html+"</table>";
                 if (sw == 0) {
                    html = html + "</td><td>";
                   sw = 1;
                  }else{
                    html = html + "</td></tr><tr><td>";
                    sw = 0;
                  }            

 

                  }
               }
           }
       }
   }  
         html = html + "</tr></td></table>";
 html="<br><table border=0 width=560><tr><td colspan=2 align=center> Se han encontrado un total de <b>" + c + "</b> resultado(s)<br>&nbsp;<TR><TD>" + html;
       return(html);
}


function main(){
CodReg = new Array('10001','10003','10005','10004','10011','10010','10009','10006','10008' );
DescPoblacio = new Array('Palafolls','Pineda de Mar','Barcelona','Platja d\'Aro','Mataró','Mataró','Puigerdà','Barcelona','Barcelona' ); 
Descripcion = new Array('Casa señorial en la Costa Brava','Casa en Pineda de Mar','Apart. Lujo en Pedralbes','Apart. en Port d&#39Aro','Mataró - C. Rocafonda','Piso en el centro de Mataró','Apart. de montaña','Diagonal Mar - Illa de la Llum','Córcega 220 (con Muntaner)' );
CodPoblacio=new Array('66','67','64','68','65','65','69','64','64' );
Import1= new Array(700900,0,560500.77,200000,180000,220000,120500,1050900,900000 );
ImageList=new Array('1000100','1000300','1000501','1000400','nopicture','nopicture','nopicture','1000600','nopicture' );
TipoViviendaList=new Array('1','3','1','1','1','1','1','1','1' );
Superficie=new Array('1200','280','40','200','1','1','0','180','150' );
 
var urlTmp = location.href;
UrlArr = urlTmp.split("?",2);
var param=UrlArr[1];
arrparam=param.split("&",50);
var tipovivienda = "";
var poblacion = "";
var importe1 = "";
var importe2 = "";
var valor = "";
   for(var ind = 0; ind < arrparam.length; ind++) { 
        
          identifi = arrparam[ind].split("=",2); // tipovivienda=v
          if(identifi.length >= 1){
             valor = identifi[1];
                }
         switch(identifi[0])  { 
                case "tipovivienda":
                    tipovivienda = valor;
                   
                    break;
                case "poblacion":
                    poblacion = valor;
	            break;
                case "importe1":
	            importe1 = valor;
                    break;
                case "importe2":
                    importe2 = valor;
                    break;
          }
        
      } 


//alert("tipo vivienda: " + tipovivienda + " poblacion " + poblacion);






document.writeln('<html>');
document.writeln('<head>');
document.writeln('<title>Fincas Demoicatalog Innova22</title>');
document.writeln('<STYLE type="text/css">');
document.writeln('TD {              FONT-SIZE: 13px;  FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}');
document.writeln('.titularmenu {');
document.writeln('	FONT-SIZE: 12px; COLOR: #006329; LINE-HEIGHT: 9pt; FONT-FAMILY: Verdana; TEXT-DECORATION: none');
document.writeln('}');
document.writeln('.smalltext {     FONT-SIZE: 11px;  FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}');
document.writeln('A:link {           COLOR: #006329; TEXT-DECORATION: none}');
document.writeln('A:visited {      COLOR:#006329; TEXT-DECORATION: none}');
document.writeln('A:active {      COLOR: #006329; TEXT-DECORATION: none}');
document.writeln('A:hover {       COLOR: #690; TEXT-DECORATION: underline}');
document.writeln('.caja {           BORDER-RIGHT:#7bb64a 1px solid; BORDER-TOP: #7bb64a 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #7bb64a 1px solid; LINE-HEIGHT: normal; BORDER-BOTTOM: #7bb64a 1px solid;');
document.writeln('                     FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR:  #FFFFFF }');
document.writeln('.linkmenu {');
document.writeln('	 FONT-SIZE: 11px;  COLOR:  #006329; FONT-FAMILY: Verdana; TEXT-DECORATION: none');
document.writeln('}');
document.writeln('');
document.writeln('</STYLE>');
document.writeln('</head>');
document.writeln('<body topmargin=0>');
document.writeln('<TABLE BORDER=0 width=750 align=center cellSpacing=0 CellPadding=0>');
document.writeln('<TD><IMG src="logocorp.jpg"></TD>');
document.writeln('<TD colSpan=2 style="background: url(\'BuildingsGreen.gif\') no-repeat; background-position: bottom right;">&nbsp;</TD>');
document.writeln('             <tr>');
document.writeln('	<td bgcolor=#ccee73 align=center><font size=1>Actualizado: 02/10/2005</font></td>');
document.writeln('	<TD  valign=baseline bgcolor=#ccee73>');
document.writeln('	<!--MENU HORITZONTAL-->');
document.writeln('	<TABLE cellSpacing=0 CellPadding=1 border=0 >');
document.writeln('	  ');
document.writeln('	   <TR><TD align=center width=25%><a href="index.html">Buscar Vivienda</a></TD><TD>|</TD>');
document.writeln('	   	   <TD align=center width=25%><a href="findus.html">Dónde estamos</a></TD><TD>|</TD>');
document.writeln('	   	   <TD align=center width=25%><a href="aboutus.html">Quiénes somos</a></TD><TD>|</TD>');
document.writeln('	   	   <TD align=center width=25%><a href="formsubmit.html">Vender mi vivienda</a></TD> ');
document.writeln('	   </tr>');
document.writeln('	   ');
document.writeln('	</TABLE>');
document.writeln('               ');
document.writeln('	<!--MENU HORITZONTAL-->');
document.writeln('                 </td>');
document.writeln('	</tr>');
document.writeln('	 <tr>');
document.writeln('	 ');
document.writeln('    <td width=180 bgcolor=#FFFFFF valign=top align=center>');
document.writeln('  ');
document.writeln('   <!--FORM BUSCAR-->');
document.writeln('     <form action="find.html" method=get>	');
document.writeln('       <br>');
document.writeln('       <table cellspacing=1 cellpadding=0 bgcolor=#7bb64a width=95%>');
document.writeln('       <tr><td>');
document.writeln('       <TABLE BORDER=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=1>');
document.writeln('          <TR><TD bgColor=#ccee73 class=titularmenu><b>Buscador:</b></TD></TR>');
document.writeln('           <TR><TD  class=linkmenu><b>Zona</b></TD></TR>');
document.writeln('           <TR><TD> <SELECT NAME=poblacion class=caja style="width:160px">');
document.writeln('<OPTION VALUE="" SELECTED>Todas<OPTION VALUE="64">Barcelona<OPTION VALUE="65">Mataró<OPTION VALUE="66">Palafolls<OPTION VALUE="67">Pineda de Mar<OPTION VALUE="68">Platja d\'Aro<OPTION VALUE="69">Puigerdà</OPTION></SELECT>');

document.writeln('</TD></TR>');
document.writeln('           <TR><TD  class=linkmenu><b>Precio Mínimo</b></TD></TR>');
document.writeln('           <TR><TD>');
document.writeln('           <SELECT NAME=importe1 VALUE="" ID=importe1 class=caja style="width:120px"> ');
document.writeln('                                     <OPTION VALUE="" SELECTED>Indiferente');
document.writeln('                                    <OPTION VALUE=0>Menos 120.000');
document.writeln('                                    <OPTION VALUE=120000>120.000                ');
document.writeln('		    <OPTION VALUE=150000>150.000                ');
document.writeln('		    <OPTION VALUE=180000>180.000                ');
document.writeln('	                    <OPTION VALUE=210000>210.000                ');
document.writeln('		    <OPTION VALUE=240000>240.000                ');
document.writeln('		    <OPTION VALUE=300000>300.000                ');
document.writeln('		    <OPTION VALUE=330000>330.000');
document.writeln('		    <OPTION VALUE=360000>360.000');
document.writeln('		    <OPTION VALUE=400000>400.000');
document.writeln('		     <OPTION VALUE=420000>420.000');
document.writeln('		     <OPTION VALUE=450000>450.000');
document.writeln('		     <OPTION VALUE=480000>480.000');
document.writeln('		     <OPTION VALUE=510000>510.000');
document.writeln('		     <OPTION VALUE=540000>540.000');
document.writeln('		     <OPTION VALUE=570000>570.000');
document.writeln('		      <OPTION VALUE=600000>600.000</OPTION></SELECT> ');
document.writeln('           </TD></TR>');
document.writeln('           ');
document.writeln('          <TR><TD  class=linkmenu><b>Precio Máximo</b></TD></TR>');
document.writeln('           <TR><TD>');
document.writeln('           <SELECT NAME="importe2" class="caja" VALUE="" ID="importe2" style="width:120px">');
document.writeln('					<OPTION VALUE="" SELECTED>Indiferente');
document.writeln('                  <OPTION VALUE=120000>120.000                ');
document.writeln('					<OPTION VALUE=150000>150.000                ');
document.writeln('   					<OPTION VALUE=180000>180.000                ');
document.writeln('					<OPTION VALUE=210000>210.000                ');
document.writeln('					<OPTION VALUE=240000>240.000                ');
document.writeln('					<OPTION VALUE=300000>300.000                ');
document.writeln('					<OPTION VALUE=330000>330.000');
document.writeln('					<OPTION VALUE=360000>360.000');
document.writeln('					<OPTION VALUE=400000>400.000');
document.writeln('					<OPTION VALUE=420000>420.000');
document.writeln('					<OPTION VALUE=450000>450.000');
document.writeln('					<OPTION VALUE=480000>480.000');
document.writeln('					<OPTION VALUE=510000>510.000');
document.writeln('					<OPTION VALUE=540000>540.000');
document.writeln('					<OPTION VALUE=570000>570.000');
document.writeln('					<OPTION VALUE=600000>600.000');
document.writeln('                                                                                <OPTION VALUE=600000>Más');
document.writeln('                                                                                de');
document.writeln('                                                                                600.000</option></select>');
document.writeln('           </TD></TR>');
document.writeln('           <TR><TD  class=linkmenu><b>Tipo Oferta</b></TD></TR>');
document.writeln('           <TR><TD>');
document.writeln('            <table cellspacing=0 cellpadding=0 border=0 width=100%>');
document.writeln('            <tr><td>');
document.writeln('            <SELECT NAME=tipovivienda class=caja style="width:75px">');
document.writeln('                         <OPTION VALUE="1">Alquiler');
document.writeln('                         <OPTION VALUE="0" SELECTED>Venta</OPTION>');
document.writeln('                      </SELECT>');
document.writeln('           </td>');
document.writeln('           <td align=right><input type=image src=lupa.gif onClick="javascript:form[0].submit">&nbsp;&nbsp;</td></tr>');
document.writeln('           </table>');
document.writeln('           </TR>');
document.writeln('');
document.writeln('        </TABLE>  ');
document.writeln('  		</tr>');
document.writeln('  		</table>');
document.writeln('   </form>');
document.writeln(' <!--FI FORM BUSCAR-->  ');
document.writeln(' <!--MENU ZONAS-->');
document.writeln('       ');
document.writeln('  <table cellspacing=1 cellpadding=0 bgcolor=#7bb64a width=95%>');
document.writeln('       <tr><td>');
document.writeln('       <TABLE BORDER=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=1>');
document.writeln('          <TR><TD bgColor=#ccee73 class=titularmenu><b>Zonas disponibles:</b></TD></TR>');
document.writeln('           <TR><TD><a href="find.html?poblacion=64" class=linkmenu>&gt; Barcelona</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          <TR><TD><a href="find.html?poblacion=65" class=linkmenu>&gt; Mataró</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          <TR><TD><a href="find.html?poblacion=66" class=linkmenu>&gt; Palafolls</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          <TR><TD><a href="find.html?poblacion=67" class=linkmenu>&gt; Pineda de Mar</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          <TR><TD><a href="find.html?poblacion=68" class=linkmenu>&gt; Platja d\'Aro</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          <TR><TD><a href="find.html?poblacion=69" class=linkmenu>&gt; Puigerdà</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('          ');
document.writeln(' </TABLE>  ');
document.writeln('  		</tr>');
document.writeln('  		</table>');

document.writeln('  <!--FI MENU ZONAS-->');
document.writeln('  <!--MENU EMPRESA-->');
document.writeln('     <br>');
document.writeln('       <table cellspacing=1 cellpadding=0 bgcolor=#7bb64a width=95%>');
document.writeln('       <tr><td>');
document.writeln('       <TABLE BORDER=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=1>');
document.writeln('          <TR><TD bgColor=#ccee73 class=titularmenu><b>Fincas Demoicatalog Innova22</b></TD></TR>');
document.writeln('           <TR><TD><a href="findus.html" class=linkmenu>&gt; Dónde estamos</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('           <TR><TD><a href="aboutus.html" class=linkmenu>&gt; Quiénes somos</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('           <TR><TD><a href="formsubmit.html" class=linkmenu>&gt; Vender mi vivienda</a></TD></TR>');
document.writeln('           <TR><TD height=1 bgColor=#ccee73></TD></TR>');
document.writeln('');
document.writeln('        </TABLE>  ');
document.writeln('  		</tr>');
document.writeln('  		</table>');
document.writeln('    <!--FI MENU EMPRESA-->');
document.writeln('');
document.writeln('    </td>');
document.writeln('    <td width=400 bgcolor=#FFFFFF valign=top>');




document.writeln(buscar(poblacion,importe1, importe2,tipovivienda));

document.writeln('  </td> </TR>');
document.writeln('    <TR><TD width=100% colspan=2><p align=center class=linkmenu><b>Fincas Demoicatalog Innova22</b> Calle Demostracion, 4 - Barcelona<br>');
document.writeln('             Tel: 93 123 45 67 - <a href="mailto:info@innova22.com">info@innova22.com</a></p></td></tr>');
document.writeln('    <TR><TD height=1 bgColor=#ccee73 colspan=3></TD></TR>');
document.writeln(' </TABLE><br>');
document.writeln('</body></html>');











}  
