//Copyright © 2000 PAULGRANT.ON.CA Inc.
//http://paulgrant.on.ca

var gWinPopup			= null;

var giPopWidth			= 600; //screen.width * 0.60;
var giPopHeight			= 410; //screen.height * 0.50;

var sPopupProperties	= "directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=yes,toolbar=no";

var bNS					= ((window.navigator.appName.indexOf("Netscape")	> -1) ? true : false);

function DoPopup(sFileName, iWidth, iHeight, sTitle)
{
	var iPopWidth	= ((iWidth) ? iWidth : giPopWidth);
	var iPopHeight	= ((iHeight) ? iHeight : giPopHeight);

	var iX			= Math.round((screen.width - iPopWidth) / 2);
	var iY			= Math.round((screen.height - iPopHeight) / 2);

	var sPos		= ((bNS == true) ? ("screenX=" + iX + ",screenY=" + iY) : ("left=" + iX + ",top=" + iY) );

	var sPopAttrib	= sPopupProperties + ",height=" + iPopHeight + ",width=" + iPopWidth + "," + sPos;

	if(gWinPopup != null)
		gWinPopup.close();

	gWinPopup = window.open(sFileName, "Popup", sPopAttrib);

	gWinPopup.focus();

	if(sTitle)
	{
		gWinPopup.document.title = sTitle;
	}

	return true;
}

//End.