// Creates a popup child window that centers in the screen
// Preconditions: none
// Postconditions: a popup window appears.  If it loses focus and another is opened, the browser sets focus
//                 on the currently open one (instead of opening another).
// url: url of document to open
// name: unique name to give to child window (to prevent opening more than one)
// width: width in pixels of desired window
// height: height in pixels of desired window

function popupCentered(url, name, width, height)
{
	var x = (screen.width - width) / 2;
	var y = (screen.height - height) / 2;
	var popup = null;

	popup = window.open(url, name, 'resizable=yes,menuBar=no,toolBar=no,scrollbars=yes,width='+width+',height='+height+',top=' + y + ',left=' + x);
	popup.focus();
} // popupCentered

function popupCenteredFull(url, name, width, height)
{
	var x = (screen.width - width) / 2;
	var y = (screen.height - height) / 2;
	var popup = null;

	popup = window.open(url, name, 'resizable=yes,statusbar=yes,menuBar=yes,toolBar=yes,scrollBars=yes,width='+width+',height='+height+',top=' + y + ',left=' + x);
	popup.focus();
} // popupCentered
