	var newwindow;
	var wheight = 0, wwidth = 0;

	function popupPicture(url, title, iwidth, iheight, colour) {
		
	var pwidth, pheight;

	if ( !newwindow || newwindow.closed ) {
		pwidth=iwidth+50;
		pheight=iheight+60;
		newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
		wheight=iheight;
		wwidth=iwidth;
	}

	if (wheight!=iheight || wwidth!=iwidth ) {
		pwidth=iwidth+30;
		pheight=iheight+90;
		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 + '\"><center>');
		newwindow.document.writeln('<div style=\"width:' + (pwidth-20) + ';padding: 7px;border: 1px solid #ccc;\"><a href=\"javascript:close();\"><img src=\"' + url + '\" alt=\"' + title + '\" style=\"border: 1px solid #D7DADB;\" /></a><br /><a href=\"javascript:close();\">Close</a></div>');
		newwindow.document.writeln('<\/center> <\/body> <\/html>');
		newwindow.document.close();
		newwindow.focus();
	}

		function popup() {
			if (newwindow && !newwindow.closed) { newwindow.close(); }
		}
