
tmpPathImagenes="";function openWindow(url){var ancho=screen.availWidth*3/4;var alto=screen.availHeight*19/20;var leftGeneral=(screen.availWidth-ancho)/2;var topGeneral=(screen.availHeight-alto)/2;var x=window.open(url,"foto","width="+ancho+",height="+alto+",left="+leftGeneral+",top="+topGeneral+",menubar=0,resizable=1,scrollbars=1,toolbar=0,directories=0,status=0,alwaysRaised=yes");}
var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase();if(window.opera){var i=xUA.indexOf('opera');if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7;}}else if(navigator.vendor!='KDE'&&document.all&&xUA.indexOf('msie')!=-1){xIE4Up=parseFloat(navigator.appVersion)>=4;xIE4=xUA.indexOf('msie 4')!=-1;xIE5=xUA.indexOf('msie 5')!=-1;}else if(document.layers){xNN4=true;}
xMac=xUA.indexOf('mac')!=-1;function getAltoCliente(){var h=0;if(xOp6Dn)h=window.innerHeight;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)h=document.body.clientHeight;else if(isDef(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h-=16;}
return h;}
function getAnchoCliente(){var w=0;if(xOp6Dn)w=window.innerWidth;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)w=document.body.clientWidth;else if(isDef(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w-=16;}
return w;}
function isDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}
return true;}
function getEstilo(oEle,sProp,bInt){var s,p='undefined';var dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(oEle,'');if(s)p=s.getPropertyValue(sProp);}else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase());}
p=oEle.currentStyle[sProp];}else return null;return bInt?(parseInt(p)||0):p;}
function xGetElementById(e){if(typeof(e)!='string')return e;if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;return e;}
function getAlto(e,h){if(!(e=xGetElementById(e)))return 0;if(esNum(h)){if(h<0)h=0;else h=Math.round(h);}
else h=-1;var css=isDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=getAltoCliente();}else if(css&&isDef(e.offsetHeight)&&isCadena(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=getEstilo;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1);}
else if(isDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h;}}
h-=(pt+pb+bt+bb);if(isNaN(h)||h<0)return;else e.style.height=h+'px';}
h=e.offsetHeight;}else if(css&&isDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight;}
return h;}
function ocultar(e){return getVisibilidad(e,0);}
function meterHtml(e,h){if(!(e=xGetElementById(e))||!isCadena(e.innerHTML))return null;var s=e.innerHTML;if(isCadena(h)){e.innerHTML=h;}
return s;}
function izquierda(e,iX){if(!(e=xGetElementById(e)))return 0;var css=isDef(e.style);if(css&&isCadena(e.style.left)){if(esNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=0;}}else if(css&&isDef(e.style.pixelLeft)){if(esNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}
return iX;}
function moverA(e,x,y){izquierda(e,x);alto(e,y);}
function esNum(){for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}
return true;}
function getAltoScroll(e,bWin){var offset=0;if(!isDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&isDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}else{e=xGetElementById(e);if(e&&esNum(e.scrollTop))offset=e.scrollTop;}
return offset;}
function mostrar(e){return getVisibilidad(e,1);}
function isCadena(s){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}
return true;}
function alto(e,iY){if(!(e=xGetElementById(e)))return 0;var css=isDef(e.style);if(css&&isCadena(e.style.top)){if(esNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=0;}}
else if(css&&isDef(e.style.pixelTop)){if(esNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}
return iY;}
function getVisibilidad(e,bShow){if(!(e=xGetElementById(e)))return null;if(e.style&&isDef(e.style.visibility)){if(isDef(bShow))e.style.visibility=bShow?'visible':'hidden';return e.style.visibility;}
return null;}
function getAncho(e,w){if(!(e=xGetElementById(e)))return 0;if(esNum(w)){if(w<0)w=0;else w=Math.round(w);}else w=-1;var css=isDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=getAnchoCliente();}
else if(css&&isDef(e.offsetWidth)&&isCadena(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=getEstilo;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1);}else if(isDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w;}}
w-=(pl+pr+bl+br);if(isNaN(w)||w<0)return;else e.style.width=w+'px';}
w=e.offsetWidth;}else if(css&&isDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth;}
return w;}
function v(archivo,ancho,alto){if(ancho==undefined){ancho=245;}
if(alto==undefined){alto=275;}
archivo=tmpPathImagenes+archivo;getAncho('foto',ancho+2);getAlto('foto',alto+6+20+12);getAncho('c1',ancho+6);getAlto('c1',alto);getAncho('cerrarfoto',ancho-6);var tabla='<table border="0" width="99%" style="background-color:black;height: 100%;">';tabla+='<tr><td style="background-color:#F6E3CE;">'+'<img src="'+archivo+'">'+'</td>'
+'<td class="DatosCabecera"></td></tr>';meterHtml('c1',tabla);posIzq=parseInt((getAnchoCliente()-ancho+3)/2);if(getAltoCliente()<alto){posAlto=getAltoScroll()+10;}else{posAlto=getAltoScroll()+parseInt((getAltoCliente()-alto-20)/2);}
posIzq=posIzq+300;moverA('foto',posIzq,posAlto);setTimeout("mostrar('foto')",50);}
function cerrar_foto(){ocultar('foto');}
function vcar(archivo,idcar,nombre,ancho,alto){if(ancho==undefined){ancho=245;}
if(alto==undefined){alto=275;}
if(archivo=="noImagen.jpg"){archivo="images/"+archivo;}else{archivo=tmpPathImagenes+archivo;}
getAncho('foto',ancho+2);getAlto('foto',alto+6+20+12);getAncho('c1',ancho+6);getAlto('c1',alto);getAncho('cerrarfoto',ancho-6);var tabla=getTablaCarGastos(archivo,idcar,nombre);meterHtml('c1',tabla);posIzq=parseInt((getAnchoCliente()-ancho+3)/2);posIzq=20;if(getAltoCliente()<alto){posAlto=getAltoScroll()+10;}else{posAlto=getAltoScroll()+parseInt((getAltoCliente()-alto-20)/2);}
posAlto=posAlto-50;moverA('foto',posIzq,posAlto);setTimeout("mostrar('foto')",50);}
function getTablaCar(archivo,idcar,idtd){var numCar=0;for(i=0;i<arrayCaracteristicas.length;i++){if(arrayCaracteristicas[i][CAR_id]==idcar){numCar=i;break;}}
var masGastos=LIT_masGastos;masGastos=masGastos.replace('{1}',arrayCaracteristicas[numCar][CAR_gastosEnvio]+' '+LIT_euro);var tabla='<table border="0" width="99%" height="100%" style="background-color:#2A1B0A;" cellpadding="10">';var nombre=window.document.getElementById('g'+idtd).innerHTML;var numero=window.document.getElementById('n'+idtd).innerHTML;tabla=tabla+'<tr><td style="background-color:#F6E3CE;" align="center">'+'<img src="'+archivo+'">'+'</td>'
+'<td>'
+'<table border="0" class="DatosCabeceraMasPeque">'
+'<tr><td colspan="2" class="DatosGrabados"><b>'+numero+'&nbsp;&nbsp;&nbsp;'+nombre+'</b></td></tr>'
+'<tr><td>&nbsp;</td></tr>'
+'<tr><td colspan="2"><B><U>'
+((arrayCaracteristicas[numCar][CAR_isColor]=='false')?LIT_aguafuerteTinta:LIT_aguafuerteColor)
+'</U></B></td></tr>'
+'<tr><td>'+LIT_plancha+':</td><td>'+arrayCaracteristicas[numCar][CAR_planchaAncho]+' x '+arrayCaracteristicas[numCar][CAR_planchaAlto]+' '+LIT_cm+'</td></tr>'
+'<tr><td>'+LIT_papel+':</td><td>'+arrayCaracteristicas[numCar][CAR_papelAncho]+' x '+arrayCaracteristicas[numCar][CAR_papelAlto]+' '+LIT_cm+'</td></tr>'
+((arrayCaracteristicas[numCar][CAR_isTiradaLimitada]=='true')?'<tr><td colspan="2">'+LIT_tiradaLimitada+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_tirada]!='0')?'<tr><td>'+LIT_tirada+':</td><td>'+arrayCaracteristicas[numCar][CAR_tirada]+' '+LIT_ejemplares+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_isPruebaAutor]=='true')?'<tr><td colspan="2">'+LIT_pruebaAutor+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_pedidoMinimo]!='0')?'<tr><td>'+LIT_pedidoMin+':</td><td>'+arrayCaracteristicas[numCar][CAR_pedidoMinimo]+' '+LIT_ejemplares+' (*) </td></tr>':'')
+'<tr><td>'+LIT_precioEjemplar+':</td><td>'+arrayCaracteristicas[numCar][CAR_precioEjemplar]+' '+LIT_euro+' ('+((arrayCaracteristicas[numCar][CAR_gastosEnvio]=='0')?LIT_sinGastosEspana:masGastos)+')'+'</td></tr>'
+'<tr><td><b>'+LIT_total+':</b></td><td><b>'+arrayCaracteristicas[numCar][CAR_total]+' '+LIT_euro+'</b>'+((arrayCaracteristicas[numCar][CAR_pedidoMinimo]!='0')?' (**)':'')+'</td></tr>'
+'<tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td colspan="2" class="DatosLeyenda">'+LIT_ofertavariospedidos+'</td></tr>'
+((arrayCaracteristicas[numCar][CAR_pedidoMinimo]!='0')?'<tr><td colspan="2" class="DatosLeyenda">'+LIT_variosEjemplares+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_pedidoMinimo]!='0')?'<tr><td colspan="2" class="DatosLeyenda">'+LIT_totalVarios+'</td></tr>':'')
+'</table>'
+'</td></tr>'
+'</table>';return tabla;}
function getTablaCarGastos(archivo,idcar,idtd){var numCar=0;for(i=0;i<arrayCaracteristicas.length;i++){if(arrayCaracteristicas[i][CAR_id]==idcar){numCar=i;break;}}
var masGastos=LIT_masGastos;masGastos=masGastos.replace('{1}',arrayCaracteristicas[numCar][CAR_gastosEnvio]+' '+LIT_euro);var tabla='<table border="0" width="99%" height="100%" style="background-color:#2A1B0A;" cellpadding="10">';var nombre=window.document.getElementById('g'+idtd).innerHTML;var numero=window.document.getElementById('n'+idtd).innerHTML;tabla=tabla+'<tr><td style="background-color:#F6E3CE;" align="center">'+'<img src="'+archivo+'">'+'</td>'
+'<td>'
+'<table border="0" class="DatosCabeceraMasPeque">'
+'<tr><td colspan="3" class="DatosGrabados" align="center"><b><u>'+numero+'&nbsp;-&nbsp;'+nombre+'</u></b></td></tr>'
+'<tr><td colspan="3">&nbsp;</td></tr>'
+'<tr><td colspan="3"><B><U>'
+((arrayCaracteristicas[numCar][CAR_isColor]=='false')?LIT_aguafuerteTinta:LIT_aguafuerteColor)
+'</U></B></td></tr>'
+'<tr><td>'+LIT_plancha+':</td><td colspan="2" width="70%">'+arrayCaracteristicas[numCar][CAR_planchaAncho]+' x '+arrayCaracteristicas[numCar][CAR_planchaAlto]+' '+LIT_cm+'</td></tr>'
+'<tr><td>'+LIT_papel+':</td><td colspan="2">'+arrayCaracteristicas[numCar][CAR_papelAncho]+' x '+arrayCaracteristicas[numCar][CAR_papelAlto]+' '+LIT_cm+'</td></tr>'
+((arrayCaracteristicas[numCar][CAR_isTiradaLimitada]=='true')?'<tr><td colspan="3">'+LIT_tiradaLimitada+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_tirada]!='0')?'<tr><td>'+LIT_tirada+':</td><td colspan="2">'+arrayCaracteristicas[numCar][CAR_tirada]+' '+LIT_ejemplares+'</td></tr>':'')
+((arrayCaracteristicas[numCar][CAR_isPruebaAutor]=='true')?'<tr><td colspan="3">'+LIT_pruebaAutor+'</td></tr>':'')
+'<tr><td nowrap="nowrap"><b>'+LIT_precioEjemplar+':</b></td><td colspan="2"><b>'+arrayCaracteristicas[numCar][CAR_precioEjemplar]+' '+LIT_euro+'</b></td></tr>'
+'<tr><td colspan="3">'+getTablaGastos()+'</td></tr>'
+'</table>'
+'</td></tr>'
+'</table>';return tabla;}
function getTablaGastos(esModoPopup){if(esModoPopup!=undefined&&esModoPopup==true){tmpLIT_enviosGastos=opener.LIT_enviosGastos;tmpLIT_enviosEspana=opener.LIT_enviosEspana;tmpGastoEspana=opener.gastoEspana;tmpLIT_enviosEuropa=opener.LIT_enviosEuropa;tmpGastoEuropa=opener.gastoEuropa;tmpLIT_enviosResto=opener.LIT_enviosResto;tmpGastoResto=opener.gastoResto;}else{tmpLIT_enviosGastos=LIT_enviosGastos;tmpLIT_enviosEspana=LIT_enviosEspana;tmpGastoEspana=gastoEspana;tmpLIT_enviosEuropa=LIT_enviosEuropa;tmpGastoEuropa=gastoEuropa;tmpLIT_enviosResto=LIT_enviosResto;tmpGastoResto=gastoResto;}
var tablaGastos='<table border="1" class="TablaGastos">';tablaGastos=tablaGastos
+'<tr>'
+'<td class="TablaGastosVertical" colspan="2">'+tmpLIT_enviosGastos+'<\/td>'
+'<\/tr>'
+'<tr>'
+'<td class="TablaGastosHorizontal">'+tmpLIT_enviosEspana+'<\/td>'
+'<td class="TablaGastosVertical">'+tmpGastoEspana+' €<\/td>'
+'<\/tr>'
+'<tr>'
+'<td class="TablaGastosHorizontal">'+tmpLIT_enviosEuropa+'<\/td>'
+'<td class="TablaGastosVertical">'+tmpGastoEuropa+' €<\/td>'
+'<\/tr>'
+'<tr>'
+'<td class="TablaGastosHorizontal">'+tmpLIT_enviosResto+'<\/td>'
+'<td class="TablaGastosVertical">'+tmpGastoResto+' €<\/td>'
+'<\/tr>'
+'<\/table>';return tablaGastos;}
function getTablaGastosOficios(){var tablaGastos='<table border="1" class="TablaGastos">';tablaGastos=tablaGastos
+'<tr>'
+'<td class="TablaGastosVertical" colspan="2">'+LIT_enviosGastos+'<\/td>'
+'<\/tr>'
+'<tr>'
+'<td class="TablaGastosHorizontal">'+LIT_enviosEspana+'<\/td>'
+'<td class="TablaGastosVertical">'+gastoOficio+' €<\/td>'
+'<\/tr>'
+'<tr>'
+'<td class="TablaGastosHorizontal">'+LIT_enviosResto+'<\/td>'
+'<td class="TablaGastosVertical">'+gastoRestoOficio+' €<\/td>'
+'<\/tr>'
+'<\/table>';return tablaGastos;}
function paginarPopup(bSiguiente){var next=parseInt(ID_TD);var url='';if(bSiguiente==true){if(bIsOtraCarac==false&&opener.document.getElementById('b'+next)!=undefined){url=new String(opener.document.getElementById('b'+next));bIsOtraCarac=true;}else{next=next+1;if(next<0){next=opener.iNumGrabados-1;}
if(next>opener.iNumGrabados-1){next=0;}
url=new String(opener.document.getElementById('a'+next));bIsOtraCarac=false;}}else{if(bIsOtraCarac==true){url=new String(opener.document.getElementById('a'+next));bIsOtraCarac=false;}else{next=next-1;if(next<0){next=opener.iNumGrabados-1;}
if(next>opener.iNumGrabados-1){next=0;}
if(opener.document.getElementById('b'+next)!=undefined){url=new String(opener.document.getElementById('b'+next));bIsOtraCarac=true;}else{url=new String(opener.document.getElementById('a'+next));bIsOtraCarac=false;}}}
if(opener.document.getElementById('a'+next)!=undefined){url=url.split('\'');url=new String(url[1]);var param=url.split('?');param=new String(param[1]);param=param.split('&');var nombreFoto=new String(param[0]);ID_CAR=new String(param[1]);ID_TD=new String(param[2]);meterHtml('tablita',getTablaCarGastos(nombreFoto,ID_CAR,ID_TD,opener.P_ANCHO,opener.P_ALTO));}}