// Portions of the original script didn't work properly so I modifed it to the following
// which seems to work okay
var newwindow;
function popitup5(url, title, caption, iwidth, iheight, color) {
// If a window is open, close it - resizing it didn't work
if (newwindow && !newwindow.closed) { newwindow.close(); }

// Position the window centered horizontally and vertically (up 10px)
PositionX=(screen.width-iwidth)/2;
PositionY=(screen.height-iheight)/2-10;

// Since any previous window is always closed, open an empty window of the right size and position
newwindow=window.open('','htmlname','width=' + iwidth +',height=' +iheight + ',resizable=1,top=' +PositionY +',left='+PositionX);

// Dynamically write a web page into that window to display the image
newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + color + '\">');
newwindow.document.writeln('<div style="text-align:center;font-size:12px;font-family:Verdana, Arial, Geneva, Helvetica, sans-serif;">');
newwindow.document.writeln('<img src=' + url + '>');
newwindow.document.writeln('<br> ' + caption);
newwindow.document.writeln('<\/div> <\/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 
// which site was not available 6/24/2004
