
function GUIManager()
{
	this._dialogs = new Array();
	this.openActionWindow = function openActionWindow(queryStr, width, height)
	{
		var url = window.location.protocol + "//" + window.location.host + window.location.pathname;
		var tmpDialog = window.open(url + queryStr, 'dialog', 'height=' + height + ',width=' + width + ',menubar=no,left=' + ((screen.width - width) / 2) + ',top=' + ((screen.height - height) / 2) + ',scrollbars=yes');
		tmpDialog.focus();
		this._dialogs[this._dialogs.length] = tmpDialog;
	}
	this.openPrintWindow = function openPrintWindow(queryStr, width, height)
	{
		var url = window.location.protocol + "//" + window.location.host + window.location.pathname;
		var tmpDialog = window.open(url + queryStr, 'dialog', 'height=' + height + ',width=' + width + ',menubar=yes,left=' + ((screen.width - width) / 2) + ',top=' + ((screen.height - height) / 2) + ',scrollbars=yes');
		tmpDialog.focus();
		this._dialogs[this._dialogs.length] = tmpDialog;
	}
	this.closeDialogs = function closeDialogs()
	{
		for (var i = 0; i < this._dialogs.length; ++i)
		{
			var tmpDialog = this._dialogs.shift();
			if (tmpDialog != null)
			{
				tmpDialog.focus();
				tmpDialog.stop();
				tmpDialog.close();
			}
		}
	}
}

guiManager = new GUIManager();