function popitup5(url, title, iwidth, iheight, colour) {
var newwindow;
var wheight = 0, wwidth = 0;
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+30;
pheight=iheight+30;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=no, scrollbars=yes, toolbars=no, top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+30;
pheight=iheight+90;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\">');
newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
newwindow.document.writeln('<p align=\"right\">' + '<form>' + '<input type=\"button\"'+ 'value=\"Imprimir Foto\"' +'onClick=\"window.print()\" \/>'+ '<input type=\"button\"'+ 'value=\"Cerrar\"' +'onClick=\"window.close()\" \/>' + '<\/form>' + '<\/p>');
newwindow.document.writeln('<\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}

// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy5()" in body tag

function tidy5() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->

var newwindow;
function abre(url)
{
	newwindow=window.open(url,'name','height=600,width=800'), newwindow.moveTo(50,50);
	if (window.focus) {newwindow.focus()}
}