function WinOpen(foto,titulo,w,h)
{
	/*
		width (w) & height (h) podrían calcularse mediante
			img = new Image()
			img.src = "fotos/"+foto
				y esperando a que se acabe de cargar la imagen con	setTimeout
				preguntar por img.height & img.width
				
			esto está muy bien con una conexión rápida de lo contario se está
			demasiado rato cargando la imagen y hasta que no lo haga no puede 
			mostrar la imagen, así que de momento lo pasamos como parámetro
	*/
	
	var loc;
	
	if (window.location.href.toLowerCase().substring(0,5)=="file:")
	{
		loc="fotos/index.html"
	}
	else
	{
		loc="http://members.fortunecity.es/loshijosdelcura/fotos/";
	}
	
	x=(screen.width-w)/2;
		y=(screen.height-h)/2;
		
		msg=open("",foto.substring(0,foto.length-4),"height="+(h+20)+",width="
					+(w+25)+",status=no,toolbar=no,"
					+"directories=no,menubar=no,location=no,resizable=no,left=0,top=0"
					+",screenX="+x+",screenY="+y);
				
		msg.document.write("<html><title>"+titulo+"</title>"
			+ "<body bgcolor=#000000>" 
			+ "<center><img src="+loc+foto
			+ " alt='"+titulo+"' align=center valign=center></center>"
			+ "</body></html>");
		msg.moveTo(x,y);	
}
