

var newwindow;
var wheight = 0, wwidth = 0;

function imgpop(url, title, iwidth, iheight) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+50;
pheight=iheight+70;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+50;
pheight=iheight+110;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head><LINK rel="STYLESHEET" href="../stylecss.css" type="text/css"> <title>' + title + '</title> </head> <body class="pop"> <center>');
newwindow.document.writeln('<img src=' + url + ' class="pop">');
newwindow.document.writeln('<br><a href="javascript: self.close();">close this window</a></center> </body> </html>');
newwindow.document.close();
newwindow.focus();
}

// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy()" in body tag

function tidy() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
