function abrirfoto(recurso,tipo,medidas){
cadena1=new String(tipo);
cadena2=new String(medidas);

imagen = new Image();
imagen.src = (recurso);
controla(recurso,tipo,medidas);
}
function controla(recurso,tipo,medidas){

 if((imagen.width!=0)&&(imagen.height!=0)){
    verfoto(recurso,tipo,medidas);
  }
  else{
    funcion="controla('"+recurso+"')";
    intervalo=setTimeout(funcion,10);
  }
}
function verfoto(recurso,tipo,medidas){
var ancho = imagen.width;
var ancho2 = ancho+1;
var alto = imagen.height;
var postop=(screen.height/2)-(alto/2);
var posleft=(screen.width/2)-(ancho/2);
var opciones = "toolbar=0,top=10,left="+posleft+",width="+(ancho+46)+",height="+(alto+90)+",resize=0";
var wentana = window.open("","",opciones);
with(wentana){
document.open();
document.write("<html><head><meta http-equiv='imagetoolbar' content='no'><meta http-equiv='imagetoolbar' content='false'>");
document.write("<meta http-equiv='Cache-Control' content='cache'>");
document.write("<meta HTTP-EQUIV='Expires' CONTENT='Tue, 01 Jan 2015 1:00:00 GMT'><meta HTTP-EQUIV='Pragma' CONTENT='cache'>");
document.write("<title>Carlos Vigueras</title></head>");
document.write("<body bgcolor='#000000'  topmargin='60'>");
document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'align='center'><tr><td align='center' valign='middle'><img src='"+recurso+"'></img>");
document.write("<div id='Layer1' style='position:absolute; width:110%; height:28px; z-index:-3; left: -1px; top: 3%;border-style:solid; border-width:1px; border-color:#666666; background-image: url(gifs/fondo_tercero.jpg); layer-background-image: url(gifs/fondo_tercero.jpg)'><div align='center'><font face=arial color='#fffff' size='1'>"+cadena1+"");
document.write("<br>"+cadena2+"</font></div></div>");
document.write("</td></tr></table>");
document.write("<div id='Layer1' style='position:absolute; width:100%; height:100%; z-index:3; left: 0; top: 0; visibility: visible; background-image: url(gifs/trans.gif); layer-background-image: url(gifs/trans.gif); border: 1px none #000000'></div>");
document.write("</body></html>");
document.close();
}
}



