var newwindow;
var wheight = 0, wwidth = 0;
function popupWin(url, title, iwidth, iheight) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=parseInt(iwidth)+22;
pheight=parseInt(iheight)+80;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=0,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=parseInt(iwidth)+52;
pheight=parseInt(iheight)+130;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title><link href="archway_styles.css" rel="stylesheet" type="text/css"> <\/head> <body><div align="center" class="popupImage">');
newwindow.document.writeln('<img src='+'"'+ url + '"'+'border=1 >');
newwindow.document.writeln('<br><br>[ <a href="javascript:window.close()">Close</a> ]');
newwindow.document.writeln('</div><\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}

function tidy5() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}



