// Functions by Peter Curtis at www.pcurtis.com

var newWin;
var wheight = 0, wwidth = 0;
function popitup5(url, title, iwidth, iheight, colour) {
	var pwidth, pheight;
	if ( !newWin || newWin.closed ) {
	pwidth=iwidth+30;
	pheight=iheight+42;
	newWin=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;
		newWin.resizeTo(pwidth, pheight);
		wheight=iheight;
		wwidth=iwidth;
	}
	newWin.document.clear();
	newWin.focus();
	newWin.document.writeln('<html> <head> <title>' + title + '<\/title> <style type="text/css" media="all">body {font-family: sans-serif;font-size:10px;}<\/style> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
	newWin.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
	newWin.document.writeln('<a href="javascript:window.close();">Close this picture<\/a> | Image &copy;2006 by the author <\/center> <\/body> <\/html>');
	newWin.document.close();
	newWin.focus();
}
function tidy5() {
	if (newWin && !newWin.closed) { newWin.close(); }
}