var newwindow;
var vwidth
var vheight
var is_chrome=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;
function popitup5(url,title,iwidth,iheight,colour,idesc){
var pwidth,pheight;
if(!newwindow||newwindow.closed ){
pwidth=iwidth+30;
pheight=iheight+30;
newwindow=window.open('','htmlname','width='+pwidth+',height='+pheight+',resizable=yes,top=50,left=10');
}
vwidth = newwindow.innerWidth,
vheight = newwindow.innerHeight
if(vheight!=iheight||vwidth!=iwidth){
pwidth=iwidth+30;
//pheight=iheight+90;
pheight=iheight+120;
newwindow.resizeTo(pwidth,pheight);
}
newwindow.document.clear();
newwindow.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"><center>');
newwindow.document.writeln('<img src='+url+' title=\"'+title+'\" alt=\"'+title+'\">');
if(idesc){
newwindow.document.writeln(''+idesc+'');
}
newwindow.document.writeln('<\/center><\/body><\/html>');
newwindow.document.close();
if(is_chrome){newwindow.parent.blur();}
newwindow.focus();
}
// Routines to tidy up popup windows when page is left// Call with an onUnload="tidy5()" in body tag// Based on JavaScript provided by Peter Curtis at www.pcurtis.com
function tidy5(){if(newwindow && !newwindow.closed){newwindow.close();}}