﻿// JScript File
// open a popup window center screen
// author: p. jodoin
function PopUpWindow(sUrl, iWidth, iHeight, sScroll)
{
	
	var sWindowString;
	var dNew = new Date();
	var sRandName = dNew.getUTCMilliseconds();
	sRandName = sRandName.toString();

	var Xpos= (screen.availWidth - iWidth)/2;
	var Ypos= (screen.availHeight - iHeight)/2-10;

	if (sScroll == "")
		{
		sScroll = "no";
		}

	sWindowString = "width=" + iWidth + ",height=" + iHeight + ",screenX=" + Xpos + ",screenY="  + Ypos + ",toolbar=0,scrollbars=" + sScroll + ",location=0,directories=0,status=1,menubar=0,resizable=yes";
	newWindow = open(sUrl, sRandName, sWindowString);
	newWindow.moveTo(Xpos, Ypos);
	newWindow.location=sUrl;
 
}//nw()