<!--


function zPopWindow(zURL,zName,xSize,ySize,zOptLevel) {
	// a zOptLevel value of 1 yields a window with no ornamentation, bars, menus etc
	// a zOptLevel value of 2 yields the same window as 1, but with scroll bars
	// a zOptLevel value of 3 (or nothing, or anything but 1 or 2) yields a window with full menus, etc
	W = screen.width;
	H = screen.height;
	if (!xSize) { xSize = W / 1.25; }
	if (!ySize) { ySize = H / 1.25; }
	if (!zName) { zName = "NewWindow"; }
	xPos = (W - xSize) / 2;
	yPos = (H - ySize) / 2;

	if (zOptLevel == 1) {
		var zWinOpts = 'height=' + ySize + ',width=' + xSize + ',left=' + xPos + ',top=' + yPos + 'screenX=' + xPos + ',screenY=' + yPos;
	} else if  (zOptLevel == 2) {
		var zWinOpts = 'height=' + ySize + ',width=' + xSize + ',scrollbars=yes,left=' + xPos + ',top=' + yPos + 'screenX=' + xPos + ',screenY=' + yPos;
    } else {
		var zWinOpts = 'height=' + ySize + ',width=' + xSize + ',resizable=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,left=' + xPos + ',top=' + yPos + 'screenX=' + xPos + ',screenY=' + yPos;
	}

	var PopWin = window.open(zURL,zName,zWinOpts);
	
	
}
//-->


function OpenImage(strImageName,iWidth,iHeight) 
{
	iHeight=iHeight + 40
	var strWindowName = new String(Math.round(Math.random() * 100000));
	var iLeftPos=screen.width/2 - (iWidth/2);
	var iTopPos=screen.height/2 - (iHeight/2);
	var strFileName = "/image.asp?ImageID=" + strImageName

	window.open(strFileName,strWindowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+iWidth+",height="+iHeight+",left=" + iLeftPos + ",top=" + iTopPos );
}

function OpenNewWindow(strFileName,strWindowName,strProperties) 
{
	if (strWindowName == "NewWindow") 
	{
		//generate random window ID
		 strWindowName = new String(Math.round(Math.random() * 100000));
	}
	window.open(strFileName,strWindowName,strProperties)
}
//used for the downloadable files
function OpenDocument(strFileName) 
{
	var iWidth=680;
	var iHeight=590;
	var iLeftPos=screen.width/2 - (iWidth/2);
	var iTopPos=screen.height/2 - (iHeight/2);
	var strWindowName='View' + new String(Math.round(Math.random() * 100000));

	window.open(strFileName,strWindowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+iWidth+",height="+iHeight+",left="+iLeftPos+",top=" + iTopPos);
}

function OpenDemo(strFileName,strWindowName) 
{
	var iWidth=644;
	var iHeight=506;
	var iLeftPos=screen.width/2 - (iWidth/2);
	var iTopPos=screen.height/2 - (iHeight/2);

	window.open(strFileName,strWindowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+iWidth+",height="+iHeight+",left="+iLeftPos+",top=" + iTopPos);
}