
var imagen=new Image();


function mostrar(save,alt)
{
  winWidth=imagen.width;
  winHeight=imagen.height;
  winLeft= (screen.width) ? (screen.width-winWidth)/2 : 0;
  winTop= (screen.height) ? (screen.height-100-winHeight)/2 : 0;
  winset="menubar=0,status=0,width="+winWidth+",height="+winHeight+",titlebar=no";
  winset+=",top="+winTop+",left="+winLeft;
  var aux=open("","",winset);
  
  
  aux.document.writeln("<HTML><HEAD><TITLE>.::: Efom :::.</TITLE>");    
 // if (!save) //No se pude usar el boton derecho del ratón
 //  {
 //   aux.document.writeln("<SCRIPT>");
//	txt="function click(e) {\n";
//	txt+="if (document.all) {\n";
//	txt+="if (event.button==2||event.button==3) {\n";
//	txt+="  alert('efom.com®');\n";
//	txt+="  return false;}}\n";
//	txt+="else if (document.layers||document.getElementById) {\n";
//	txt+="  if (e.which == 3) {\n";
//	txt+="  alert('efom.com®');\n";
//	txt+="  return false;}}}\n";
//	txt+="if (document.layers) {\n";
//	txt+="document.captureEvents(Event.MOUSEDOWN);}\n";
//	txt+="document.onmousedown=click;\n";
 //  aux.document.writeln(txt);
 //   aux.document.writeln("</SCRIPT>");
 //  }
  aux.document.writeln("<BODY bgcolor='#ffffff' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><CENTER>");
  aux.document.writeln("<img  src='"+imagen.src+"' alt='"+alt+"' >");
  aux.document.writeln("</CENTER></BODY></HTML>");
}

function EsperaCarga(save1,alt1)
{
 if (imagen.width>1 && imagen.height>1) 
    {//alert(imagen.width+"///"+imagen.height);
	 mostrar(save1,alt1);
	 return true} 
  else { setTimeout('EsperaCarga('+save1+',"'+alt1+'")', 200);}
}

function Verfoto(url,save,alt)
//url -> Directorio en el que se encuentra la imagen desde la home
//save -> Booleano que indica si se puede salvar con el boton derecho o no
//alt -> Texto alternativo de la imagen
{
  //var base="http://www.findfine.com/"
  imagen.width=0;
  imagen.height=0;
  imagen.src=url;
  EsperaCarga(save,alt);
}

