var newwindow=0;
var wheight=0, wwidth=0;

function popUpWin(url,title,iwidth,iheight,colour) {
var pwidth, pheight;

if (!newwindow || newwindow.closed) {
pwidth=iwidth;
pheight=iheight;
newwindow=window.open('','htmlname','width=' + pwidth + ',height=' + pheight + 'resizable=1, top=50, left=50');
wheight=iheight;
wwidth=iwidth;
}

if(wheight!=iheight || wwidth!=iwidth) {
pwidth=iwidth;
pheight=iheight;
newwindow.resizeTo(pwidth,pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>'+title+'<\/title> <link href="../../../popup.css" rel="stylesheet" type="text/css" /> <\/head> <body class="popupbg" bgcolor=\"' + colour + '\"> <center>');
newwindow.document.writeln('<p> <img src ="../../../images/setformtxtlogo.gif"> <\/p> <img src='../../../oldsite/ + url + ' class="imgbdr"> <p> <a href="#" onclick="window.close()"><< Close window >><\/a> <\/p>');
newwindow.document.writeln('<\/center> <\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}

function tidy() {
if(newwindow && !newwindow.closed) {newwindow.close();}
}


