var newWin;

function popUp(imageToShow, width, height)
{	
	height+=50;
	width+=30;
	var showScrollbars = "no";

	if (height+30 > window.screen.height)
		{ height = window.screen.height - 80;
		showScrollbars = "yes" }
	if (width+30 > window.screen.width)
		{ width = window.screen.width - 50;
		showScrollbars = "yes" }

	var left = parseInt((window.screen.width - (width))/2)
	var top = parseInt((window.screen.height - (height))/2) -20

	// if the imageToShow is an htm or asp file
	//if (imageToShow.indexOf(".htm") > 0 || imageToShow.indexOf(".asp") > 0)
		newWin = window.open(imageToShow, "screenShot", "height=" + height + ",width=" + width + ", left=" + left + ",top=" + top + ",toolbar=no,scrollbars=" + showScrollbars + ",menubar=no,resize=no")
//	else
	//	newWin = window.open("../library/screenShot.asp?image=" + imageToShow, "screenShot","height=" + height + ",width=" + width + ", left=" + left + ",top=" + top + ",toolbar=no,scrollbars=" + showScrollbars + ",menubar=no,resize=no")
	newWin.focus();
}

function closePopUp()
{
if (newWin)
	newWin.close();
}