<!-- Web Generada con Mis Productos.net http://www.misproductos.net (Licencia 975C - E2CF - 1451)--> 



varaux = 1;

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 Proyector(desc) {
 var arr = new Array(9)
 arr[0] = "sony"; arr[1] = "toshiba"; arr[2] = "epson"; arr[3] = "canon"; arr[4] = "mitsubishi";
 arr[5] = "nec"; arr[6] = "panasonic"; arr[7] = "lg"; arr[8] = "optoma";
 marca=""
 desc=desc.toLowerCase()
 for(i=0;i<arr.length&&marca=="";i++) {
   if (desc.indexOf(arr[i])>0) {marca=arr[i]}
 }
 document.getElementById('MarcaProyector').style.background="url('"+marca+"Logo.gif') no-repeat top right"
}

function Precio(txt) {
 txt=txt.replace(".","");
 txt=txt.replace(",",".");
 txt=String(txt*1.18);
 txt=currency(txt);
 document.write(txt);
}

function PdfProyector(txtraw, specs) {
  var txt = txtraw;
  if (txt.indexOf('Proyector')>=0||txt.indexOf('Projector')>=0) {
    txt=txt.replace("portátil","");
    txt=txt.replace("portàtil","");
    txt=txt.replace("portatil","");
    txt=txt.replace("Projector","Proyector");
    txt=txt.replace("projector","proyector");
    txt=txt.replace("16:9","");
    txt=txt.replace(/[  ]+/g," ");
    txt=txt.replace(/[ ]+/g,"%20");
    document.write('</tr><tr><td colspan=2>&nbsp;</td></tr><tr><td valign=top width=27><img height=25 width=24 border=0 src="pdf.gif" alt="'+specs+''+txtraw+'"></td><td valign=top>');
    document.write('<a class="lnkproducte" target="_blank" style="FONT-SIZE: 10px;" href="pdf/'+txt+'.pdf">');
    document.write(specs+'<br>'+txtraw+'</a><br><br></td>');
  }
};
