
var screenWidth = screen.width;
var screenHeight = screen.height;
var fixedWidth = 800;
var fixedHeight = 600;
var centerLeft = (screenWidth - fixedWidth) / 2;
var centerTop = (screenHeight - fixedHeight) / 2;

function OpenNewFileCentered(szUrl,szWinName,iWidth,iHeight,bScroll) {
	var filesCenterLeft = (screenWidth - iWidth) / 2;
	var filesCenterTop = (screenHeight - iHeight) / 2;
	winNewFile = window.open(szUrl,szWinName, "menubar=0,left=" + filesCenterLeft + ",top=" + filesCenterTop + ",width=" + iWidth + ",height=" + iHeight + ",scrollbars="+bScroll);
	winNewFile.focus();
}

