function abreFoto(ruta,nom,rotul)
{
   imatge = new Image;
   imatge.src = ruta;
   //imatge.name = document.Foto.name
   titulo = imatge.name
   html = '<html><head><title>'+nom+'</title></head>';
   html += '<body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>';
   html += '<center><img src="'+ruta+'" alt="'+rotul+'" border=0 name="Foto"';
   html += 'onLoad="window.resizeTo(document.Foto.width+11,document.Foto.height+31)">';
   html += '</center></a></body></html>';
   popupImage = window.open('','_blank','scrollbars=0,resizable=0,titlebar=non');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close();
}
