<!-- Web Generada con iCatalog Inmobiliarias http://www.innova22.com/icatalog. (V.2.1.47) (Licencia 942C - 1DB4 - 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] + "CA.html' class='smalltext'>" ;
     html=html+"<table width=156 cellspacing=0>";
     html=html+"<tr><td width='100%' height='1' bgcolor='9C9A9C'></td></tr>";
     html=html+"<tr><td width='100%' bgcolor='E7E5E2'><font face='Arial' color='#968B82' size='2'><p align='left' style='margin-left: 5'><b>" + DescPoblacio[ind] + "</b></p></font></td></tr>";
     html=html+"<tr><td><a href='" +  CodReg[ind] +"CA.html'><img border=0 src='" + ImageList[ind] + "-sm.jpg' width=156 height=117></a></td></tr>";
     html=html+"<tr><td  valign=top height=35><p align='left' style='margin-left: 5; margin-top: 5' class='texto'><a href='%%PRODUCTID%%CA.html' class='copy'>"+ Descripcion[ind]  +"</a></td></tr>";
     html=html+"<tr><td align='right' class='texto'>" + currency(Import1[ind]) + " €</td></tr>";
     html=html+"<tr><td width='100%' height='1' bgcolor='9C9A9C'></td></tr>";	
      html=html+"</table>";	 
            html=html+"</td>";
              html=html+"<td valign='top'>";


          //html=html+" <table cellspacing=1 cellpadding=0 bgcolor=#C0C0C0 width=50><tr><td>";
          //html=html+"<TABLE BORDER=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpading=1>";
          //html=html+"<TR><TD bgColor=#EFE7E7 colspan=2 class='textobig'>" + Descripcion[ind]  + "</TD></TR>";
           //html=html+"<TR onClick=\"javascript:document.location.href='"+ CodReg[ind] +"CA.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] +"CA.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% class=texto>";
           //html=html+"<TR><TD><b>Zona:</b></TD><TD>" + DescPoblacio[ind] + "</TD></TR>";
           //html=html+"<TR><TD><b>Superfície:</b></TD><TD>"+ Superficie[ind] +"</a></TD></TR>";
          // html=html+"<TR><TD colspan=2 align=right><b>" + currency(Import1[ind]) + " €</b></TD></TR>";
          //html=html+" <tr><td colspan=2 align=right><a href='"+ CodReg[ind] +"CA.html'  class='copy'>[+ Información]</a></td></tr>";
          //html=html+" </TABLE>";
          //html=html+"</TD>";
         // html=html+"</TABLE>";  
         //html=html+"</tr>";
        //html=html+"</table>";
                 if (sw < 2) {
                    html = html + "</td><td>";
                   sw++;
                  }else{
                    html = html + "</td></tr><tr><td>";
                    sw = 0;
                  }            

 

                  }
               }
           }
       }
   }  
          html = html + "</tr></td></table>";
 html="<table border=0 width=500><tr><td colspan=5 align=center class=texto> S'han trobat un total de  <b>" + c + "</b> resultats.<br>&nbsp;<TR><TD>" + html;
       return(html);
}

function main(){
CodReg = new Array('APART--DE-LUXE-A-PEDRALBES-10005','CASA-SENYORIAL-A-LA-COSTA-BRAVA-10001','CASA-AL-CENTRE-DE-PINEDA-10003','APARTAMENT-A-PORT-D-ARO-10004','DIAGONAL-MAR---ILLA-DE-LA-LLUM-10006','MATARO---C--ROCAFONDA-10011','CORSEGA-220-(AMB-MUNTANER)-10008','PIS-AL-CENTRE-DE-MATARO-10010','APARTAMENT-DE-MUNTANYA-10009' );
DescPoblacio = new Array('Barcelona','Palafolls','Pineda de Mar','Platja d\'Aro','Barcelona','Mataró','Barcelona','Mataró','Puigerdà' ); 
Descripcion = new Array('Apart. de Luxe a Pedralbes','Casa senyorial a la Costa Brava','Casa al centre de Pineda','Apartament a Port d&#39Aro','Diagonal Mar - Illa de la Llum','Mataró - C. Rocafonda','Còrsega 220 (amb Muntaner)','Pis al centre de Mataró','Apartament de muntanya' );
CodPoblacio=new Array('64','66','67','68','64','65','64','65','69' );
Import1= new Array(560500.77,700900,0,200000,1050900,180000,900000,220000,120500 );
ImageList=new Array('1000501','1000100','1000300','1000400','1000600','nopicture','nopicture','nopicture','nopicture' );
TipoViviendaList=new Array('1','2','2','1','1','4','0','1','1' );
Superficie=new Array('40','1200','280','200','180','1','150','1','0' );

 
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;
          }
        
      } 

document.writeln('<html>');
document.writeln('<head>');
document.writeln('<title>Fincas Demoicatalog Innova22</title>');
document.writeln('<style type="text/css">');
document.writeln('.textobig {font-family:Verdana;font-size:12px;color:#767262;}');
document.writeln('');

document.writeln('.texto {font-family:Verdana;font-size:11px;color:#767262;}');
document.writeln('.textotar {font-family:Verdana;font-size:11px;color:#E77B1E;}');
document.writeln('.linkmenu {font-family:Verdana;font-size:11px;color:#767262;text-decoration:none}');
document.writeln('.linkmenu2 {font-family:Verdana;font-size:12px;color:#767262;text-decoration:none}');
document.writeln('.linksmall {font-family:Verdana;font-size:10px;color:#767262;text-decoration:none}');
document.writeln('.preu {font-family:Verdana;font-size:12px;color:#E77B1E;text-decoration:none}');
document.writeln('.titolmenu {font-family:Verdana;font-size:11px;color:#767262;text-decoration:bold}');
document.writeln('.textom {font-family:Verdana;font-size:10px;color:#767262;}');
document.writeln('.copy {font-family:Verdana;font-size:11px;color:#767262;text-decoration:none}');
document.writeln('A.copy {color:#E77B1E}');
document.writeln('</style>');
document.writeln('<script languague="JavaScript">');
document.writeln('  varaux = 1;');
document.writeln('</script>');

document.writeln('</head>');
document.writeln('');
document.writeln('<body topMargin=5 leftmargin=0 rigthmargin=0>');
document.writeln('');
document.writeln('<table width="100%" cellspacing="0" cellpadding="0" >');
document.writeln('  <tr>');
document.writeln('    <td><!--LOGO-->');
document.writeln('    </td>');
document.writeln('  </tr>');
document.writeln('  <tr>');
document.writeln('    <td><!--PART PRINCIPAL-->');
document.writeln('      <!--BARRA SUPERIOR-->');
document.writeln('      <table width="100%" cellspacing="0">');
document.writeln('        <tr>');
document.writeln('          <td bgcolor="9C9A9C" heigth="1"><!--LINEA NEGRA-->');
document.writeln('          </td>');
document.writeln('');
document.writeln('        </tr>');
document.writeln('        <tr>');
document.writeln('          <td ><!--flahs-->');
document.writeln('          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.writeln('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"');
document.writeln('  id="flash" width="790" height="200">');
document.writeln('  <param name="movie" value="flashCA.swf">');
document.writeln('  <param name="bgcolor" value="#FFFFFF">');
document.writeln('  <param name="quality" value="high">');
document.writeln('  <param name="allowscriptaccess" value="samedomain">');
document.writeln('  <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="790" height="200" name="flash" src="flash.swf" bgcolor="#FFFFFF" quality="high" swLiveConnect="true" allowScriptAccess="samedomain">');
document.writeln('</object>');

document.writeln('          </td>');
document.writeln('');
document.writeln('        </tr>');
document.writeln('        <tr>');
document.writeln('          <td bgcolor="9C9A9C" heigth="1"><!--LINEA NEGRA-->');
document.writeln('          </td>');
document.writeln('');
document.writeln('        </tr>');
document.writeln('');
document.writeln('        <tr>');
document.writeln('          <td bgcolor="E7E5E2" heigth="50">');
document.writeln('            <table width="698">');
document.writeln('              <tr>');
document.writeln('                <td width="170" class=titolmenu><p align="left" style="margin-left: 15"><b>&nbsp;</b></p></td>');
document.writeln('                <td width="430"><!--MENU HORITZONTAL-->');
document.writeln('                                 <table border=0 cellspacing=1 cellpadding=0>');
document.writeln('                                        <tr><td align=center width=152 onMouseOver="menuA.style.backgroundColor=\'#E77B1E\'" onMouseOut="menuA.style.backgroundColor=\'E7E5E2\'"><a href="indexCA.html" class=linkmenu2>Pàgina principal</a></td><td class=linkmenu>|</td>');
document.writeln('                                              <td align=center width=145 onMouseOver="menuB.style.backgroundColor=\'#E77B1E\'" onMouseOut="menuB.style.backgroundColor=\'#E7E5E2\'"><a href="aboutusCA.html" class=linkmenu2>Qui som</a></td><td  class=linkmenu>|</td>');
document.writeln('                                             <td align=center width=145 onMouseOver="menuC.style.backgroundColor=\'#E77B1E\'" onMouseOut="menuC.style.backgroundColor=\'#E7E5E2\'"><a href="findusCA.html" class=linkmenu2>On som</a></td><td  class=linkmenu>|</td>   ');
document.writeln('                                              <td align=center width=145 onMouseOver="menuD.style.backgroundColor=\'#E77B1E\'" onMouseOut="menuD.style.backgroundColor=\'#E7E5E2\'"><a href="formsubmitCA.html" class=linkmenu2>Vendre vivenda</a></td> ');
document.writeln('                                       </tr>');
document.writeln('                                        <tr ><td  height=2 id="menuA"></td><td  heigth=5></td>');
document.writeln('                                        <td  height=2 id="menuB"></td><td  heigth=5></td>');
document.writeln('                                        <td  height=2 id="menuC"></td><td  heigth=5></td>');
document.writeln('                                         <td  height=2 id="menuD"></td><td  heigth=5></td>');
document.writeln('                                         </tr></table>');
document.writeln('                </td>');
document.writeln('                <td align=right><!--BANDERES MULTIIDIOMA-->');


document.writeln('	');
document.writeln('<a href="indexCA.html"><img src="microCA.gif" border=0 alt="Català"></a> <a href="indexES.html"><img src="microES.gif" border=0 alt="Castella"></a> <a href="indexEN.html"><img src="microEN.gif" border=0 alt="Angles"></a> ');


document.writeln('                </td>');
document.writeln('            </table>');
document.writeln('          </td>');
document.writeln('        </tr>');
document.writeln('      </table>');
document.writeln('      <!--FI BARRA SUPERIOR-->');
document.writeln('    </td>');
document.writeln('  </tr>');
document.writeln('  <tr>');
document.writeln('    <td>');
document.writeln('      <table width="700" cellspacing="0" cellpadding="0">');
document.writeln('        <tr>');
document.writeln('          <td width="160" valign=top><!--MENU-->');
document.writeln('          <table cellspacing=0 cellpadding=0 width=100%>');
document.writeln('         	 	');
document.writeln('         		');
document.writeln('<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr>');
document.writeln('<tr><td width=20 height=25 id="tipviv2"></td><td onMouseOver="tipviv2.style.backgroundColor=\'#E77B1E\'" onMouseOut="tipviv2.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?tipovivienda=2" class=linkmenu>Cases</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr>');
document.writeln('<tr><td width=20 height=25 id="tipviv1"></td><td onMouseOver="tipviv1.style.backgroundColor=\'#E77B1E\'" onMouseOut="tipviv1.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?tipovivienda=1" class=linkmenu>Pisos</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr>');
document.writeln('<tr><td width=20 height=25 id="tipviv0"></td><td onMouseOver="tipviv0.style.backgroundColor=\'#E77B1E\'" onMouseOut="tipviv0.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?tipovivienda=0" class=linkmenu>Obra nova</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr>');
document.writeln('<tr><td width=20 height=25 id="tipviv4"></td><td onMouseOver="tipviv4.style.backgroundColor=\'#E77B1E\'" onMouseOut="tipviv4.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?tipovivienda=4" class=linkmenu>Locals</a></td></tr>');
document.writeln('         		<tr><td  heigth=1 colspan=2 bgcolor="9C9A9C"></td></tr>');

document.writeln('				<tr bgcolor="E7E5E2"><td width=20 height=25 ></td><td class=titolmenu><b>VIURE A...</b></td></tr>');
document.writeln('         	   <tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr>');
document.writeln('<tr><td width=20 height=25 id="pobl64"></td><td onMouseOver="pobl64.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl64.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=64" class=linkmenu>Barcelona</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> <tr><td width=20 height=25 id="pobl65"></td><td onMouseOver="pobl65.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl65.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=65" class=linkmenu>Mataró</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> <tr><td width=20 height=25 id="pobl66"></td><td onMouseOver="pobl66.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl66.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=66" class=linkmenu>Palafolls</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> <tr><td width=20 height=25 id="pobl67"></td><td onMouseOver="pobl67.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl67.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=67" class=linkmenu>Pineda de Mar</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> <tr><td width=20 height=25 id="pobl68"></td><td onMouseOver="pobl68.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl68.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=68" class=linkmenu>Platja d\'Aro</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> <tr><td width=20 height=25 id="pobl69"></td><td onMouseOver="pobl69.style.backgroundColor=\'#E77B1E\'" onMouseOut="pobl69.style.backgroundColor=\'#FFFFFF\'"><p align="left" style="margin-left: 5"><a href="findCA.html?poblacion=69" class=linkmenu>Puigerdà</a></td></tr>');
document.writeln('         		<tr><td background="back_menu.jpg" heigth=1 colspan=2></td></tr> ');

document.writeln('                          ');
document.writeln('');
document.writeln('         	</table>');
document.writeln('<p align="center">');
document.writeln('<img src=logocorp.jpg alt="Fincas Demoicatalog Innova22"></p>	');
document.writeln('          </td>');
document.writeln('          <td width="1" bgcolor="E7E5E2"><!--LINEA VERTICAL-->');
document.writeln('          </td>');
document.writeln('          <td width="534" class="texto" valign="top">');
document.writeln('            <p align="left"   style="margin-left: 40; margin-top: 15">');


document.writeln(buscar(poblacion,importe1, importe2,tipovivienda));


document.writeln('    <p class="textom" align=center><b>Fincas Demoicatalog Innova22</B> Tel: 93 123 45 67 - <A href="mailto:info@innova22.com" class=linksmall>info@innova22.com</A> ');
document.writeln('</td>');
document.writeln('        </tr>');
document.writeln('      </table>');
document.writeln('      ');
document.writeln('      </td></tr>');
document.writeln('    ');
document.writeln('     <tr><td colspan=2 height=1 bgcolor="E7E5E2"></td></tr>');
document.writeln('</table>');
document.writeln('<table border=0 width=100%><tr><td>&nbsp; &nbsp;<a class=linkmenu href="http://www.innova22.com/icatalog/inmobiliarias/">Web per a immobiliaries per  <img src=logoi22.gif width="17" height="15" alt="Innova22" border=0></a></td><td align=right><a class=linkmenu href="http://www.finding-casa.com" alt="Finding Casa">Afiliat al portal immobiliari FindingCasa</a></td></tr></table>');
document.writeln('');
document.writeln('</body>');
document.writeln('</html>');


}  
