function AjustaImagen() 
{ 
     var NS = document.all;
     if(!NS){self.moveTo((self.screen.width - self.outerWidth) / 2, (self.screen.height - self.outerHeight) / 2);}
     else{self.moveTo((self.screen.width-document.body.clientWidth) / 2, (self.screen.height-document.body.clientHeight) / 2);}
     self.focus();  
}

function AbrirVentana(URL,ancho,alto)
{ 

var Izquierda = (screen.width) ? (screen.width-ancho)/2 : 0;
var Top = (screen.height) ? (screen.height-alto)/2 : 0;

if (screen.width <=800)
{
	ancho = ancho * 0.8;
	alto = alto * 0.8;
}

var ventana = null;
ventana = window.open("/detalleimagen.shtml?"+URL+"&Imagen%20detallada&" + ancho +"&" + alto, "_Blank", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no, left='+Izquierda+',top='+Top+', width="+ancho+",height="+alto);

}


