function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function acces(theURL,winName,features) 
{
 var widthIni = features.indexOf("width=") + 6;
 var widthFin = features.indexOf(",", widthIni);
 if (widthFin == -1) widthFin = features.length;
 var nWidth = features.substr(widthIni, widthFin - widthIni);

 var heightIni = features.indexOf("height=") + 7;
 var heightFin = features.indexOf(",", heightIni);
 if (heightFin == -1) heightFin = features.length;
 var nHeight = features.substr(widthIni, heightFin - heightIni);

 var winl = (screen.width - nWidth) / 2; 
 var wint = (screen.height - nHeight) / 2;

 features += ',top=' + wint + ',left=' + winl;
 wprod=window.open(theURL,winName,features);
}

function finestra(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function vervideo(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

<!-- Rollover TD
function overTD(td){ td.bgColor='#3D4357'; td.style.cursor='hand'; } 
function outTD(td){ td.bgColor='#474E66'; td.style.cursor='default'; } 
function clickTD() { 
  //recoger carpeta de producto como variable
  var url = window.top.location.pathname;
  var temp = url.lastIndexOf('/');
  var nomprod = url.substring(0, temp);
  temp = nomprod.lastIndexOf('/');
  nomprod = nomprod.substring(temp + 1);
  
  //si el segmento es home cinema...
  var tempHC = url.lastIndexOf('/');
  var nomprodHC = url.substring(0, tempHC);
  tempHC = nomprodHC.lastIndexOf('/');
  nomprodHC = nomprodHC.substring(0, tempHC);
  tempHC = nomprodHC.lastIndexOf('/');
  nomprodHC = nomprodHC.substring(tempHC + 1);
  if (nomprodHC == 8) { nomprod = nomprod + '_homecinema'; }
  
  //destino ZIPS
  window.location.href='/zips/'+nomprod+'.zip'; 
} 
//--> 

function Fmapa(theURL,winName,features) 
{
 var widthIni = features.indexOf("width=") + 6;
 var widthFin = features.indexOf(",", widthIni);
 if (widthFin == -1) widthFin = features.length;
 var nWidth = features.substr(widthIni, widthFin - widthIni);

 var heightIni = features.indexOf("height=") + 7;
 var heightFin = features.indexOf(",", heightIni);
 if (heightFin == -1) heightFin = features.length;
 var nHeight = features.substr(widthIni, heightFin - heightIni);

 var winl = (screen.width - nWidth) / 2; 
 var wint = (screen.height - nHeight) / 2;

 features += ',top=' + wint + ',left=' + winl;
 window.open(theURL,winName,features);
}

function getCookieVal(offset){
  var endstr = document.cookie.indexOf(";",offset);
  if (endstr == -1) endstr = document.cookie.length;
  return (unescape(document.cookie.substring(offset,endstr)));
}

function GetCookie (name){
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0, j;
  
  while (i < clen){
    j = i + alen;
    
    if (document.cookie.substring(i,j) == arg) return getCookieVal(j);
    i = document.cookie.indexOf(" ",i) + 1;
    if (i == 0) break;
  }
  
  return null;
}

function goCotas(){
  /*var ck = GetCookie("SBVJRCD");
  
  if(ck != "ID=99gd550dc5573bga4df:TM=1127f720073:LM=1g13170dg3086:GM=1:S=vIJgmDUgp2_N14Ud0nF"){
    acces('/figueras/actionServlet?accio=acceso&lang=EN&dir=en', 'acces', 'width=350, height=245, location=yes, scrollbars=no');
  }*/
}

focus();