// Created 02.08.2000

// Functions
// Name					Descript
// ------------------------------------------------------------------------------------
// openWindow			Open a window in the center of the screen and sets focus to it.
// openWindowMenu		Same as openWindow, but the window will have the menu bars (so users can save, etc.)
// openWindowMax		Same as openWindow, but the window will be maximized

// Function: openWindow
// Centers the window in the center of the screen.
var putItThere = null;

var chasm = screen.availWidth;
var mount = screen.availHeight;

var nWidth  = 0;
var nHeight = 0;

function openWindow(cLocation, cWindowName, nWidth, nHeight) {
	putItThere = window.open(cLocation,cWindowName,'status,scrollbars,resizable,width=' + nWidth + ',height=' + nHeight + ',left=' + ((chasm - nWidth - 10) * .5) + ',top=' + ((mount - nHeight - 30) * .5));
	putItThere.focus();
}

function openWindowMenu(cLocation, cWindowName, nWidth, nHeight) {
	putItThere = window.open(cLocation,cWindowName,'menubar,status,scrollbars,resizable,width=' + nWidth + ',height=' + nHeight + ',left=' + ((chasm - nWidth - 10) * .5) + ',top=' + ((mount - nHeight - 30) * .5));
	putItThere.focus();
}

function openWindowMax(cLocation, cWindowName, nWidth, nHeight) {
	putItThere = window.open(cLocation,cWindowName,'status,scrollbars,resizable,width=' + screen.availWidth + ',height=' + screen.availHeight + ',left=' + screen.availLeft + ',top=' + screen.availTop);
	putItThere.focus();
}	

