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

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

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+50;
pheight=iheight+0;
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 + '\" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <center>');
newwindow.document.writeln('<table width="750" height="300" border="5" cellpadding="0" cellspacing="0" bordercolor="white"> <tr> <td align="center"> <img src=' + url + '> </td> </tr> </table>');
newwindow.document.writeln('<\/center> <\/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(); }
}






