// Set the horizontal and vertical position for the popup
defaultWidth=590;
defaultHeight=443;

leftPosition=100;
topPosition=100;

function popImage(imageURL, imageWidth, imageHeight)
{
	if (!(parseInt(imageWidth)>0))
		imageWidth=defaultWidth;

	if (!(parseInt(imageHeight)>0))
		imageHeight=defaultHeight;

	if (parseInt(screen.height) > 0)
		topPosition=(screen.height-imageHeight)/2;

	if (parseInt(screen.width) > 0)
		leftPosition=(screen.width-imageWidth)/2;

	imgWin=window.open('about:blank','Image','directories=no,location=no,menubar=no,resizable=no,toolbar=no,scrollbars=no,left='+leftPosition+',top='+topPosition+',width='+imageWidth+',height='+imageHeight);
	with (imgWin.document)
	{
		writeln('<html><head><title>Image</title><style>body{margin:0px;}</style>');
		writeln('</head><body bgcolor=000000 scroll="no">')
		writeln('<img name="Image" src='+imageURL+' style="display:block"></body></html>');
		close();
	}
}