// popup a window with a centered image
function popwin(imageUrl, bgColor, winWidth, winHeight, pageTitle) {
	var posTop = Math.round(screen.height * .1);
	var posLeft = Math.round(screen.width * .1);
	var winSpecs = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,top="+posTop+",left="+posLeft+",width="+winWidth+",height="+winHeight;
	var code = "<html><head><title>" + pageTitle + "</title></head><body bgcolor='" + bgColor + "' marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>";
	code += "<table width='100%' height='100%'><tr><td width='100%' height='100%' valign='middle' align='center'>";
	code += "<a href='javascript:window.close()'><img src='" + imageUrl + "' border=0></a></div></td></tr></table></body></html>";
	newWindow = window.open("", "", winSpecs);
	newWindow.document.open();
	newWindow.document.write(code);
	newWindow.document.close();
}
