
WindowUtils.prototype = new BaseObj();
WindowUtils.prototype.constructor = WindowUtils;
WindowUtils.prototype.baseClass = BaseObj.prototype.constructor;
WindowUtils.prototype.GetWindowHandlers = GetWindowHandlers;
WindowUtils.prototype.OpenNewWindow = OpenNewWindow;
WindowUtils.prototype.OpenNewCustomWindow = OpenNewCustomWindow;
WindowUtils.prototype.CloseWindow = CloseWindow;

function WindowUtils()
{
	this._newWin = new Array;
}

function GetWindowHandlers()
{
	return this._newWin;
}

function OpenNewCustomWindow(winPar, urlPar, titlePar, widthPar, heightPar, topPar, leftPar, menubarPar, toolbarPar, scrollbarsPar, statusPar, resizablePar)
{
	try
	{
		this._newWin[winPar] = window.open(urlPar, titlePar + winPar, 'width=' + widthPar + ',height=' + heightPar + ',top=' + topPar + ',left=' + leftPar + ',menubar=' + menubarPar + ',toolbar=' + toolbarPar + ',scrollbars=' + scrollbarsPar + ',status=' + statusPar + ',resizable=' + resizablePar);
	}
	catch (e) {
		window.status = "Cannot open new window - script.js";
		throw e;
	}
}

function OpenNewWindow(winPar, urlPar)
{
	try
	{
		this._newWin[winPar] = window.open(urlPar);
	}
	catch (e) {
		window.status = "Cannot open new window - script.js";
		throw e;
	}
}

function CloseWindow(winPar)
{
	try
	{
		if (winPar == -1)
		{
			window.close()
		}
		else
		{
			this._newWin[winPar].close();
		}
	}
	catch (e) {
		window.status = "Cannot close window - script.js";
		throw e;
	}	
}
