

function ImagePopup(filename, width, height)
{
	if(!filename) return;
	// Create the window
	objWin = window.open('','','left=0,width=' + width + ',height=' + height + ',fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,scrolling=0,resizable=0,marginwidth=0,marginheight=0');
	// From here on, work with the new window
	with(objWin) {
		// Try to bring the window to front
		focus();
		// Now, create the HTML document carrying the picture...
		with(document) {
			open();
			write("<HTML><HEAD><TITLE>" + filename + "</TITLE></HEAD><BODY bgcolor=EEEEEE marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 onBlur='window.close();'>");
			write("<IMG src='" + filename + "'></BODY>");
			write("</HTML>");
			close();
		}
	}
	// All done
}


