// JScript File
var DialogHelper = new Object();
DialogHelper.Init = function()
{
	if (typeof(window.innerHeight) == 'number') {
		this.windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			this.windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				this.windowHeight = document.body.clientHeight;
			}
		}
	}
	if (typeof(window.innerWidth) == 'number') {
		this.windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			this.windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				this.windowWidth = document.body.clientWidth;
			}
		}
	}
}
DialogHelper.GetValue = function () { return null; }
DialogHelper.SetValue = function () {}
DialogHelper.Open = function ( sUri, sName, iW, iH, sParams)
{
	//apply mask
	document.getElementById("pnlPleaseWite").style.display = "";
	//open dialog
	this.activeDialog = window.open(sUri + "&r=" + (new Date()).getTime(), sName, "width=" + iW + ",height=" + iH + ",left=" + ((screen.availWidth - iW) / 2) + ",top=" + ((screen.availHeight - iH) / 2) + sParams);
}
DialogHelper.Close = function ()
{
	if (this.activeDialog != null && this.activeDialog.closed)
		document.getElementById("pnlPleaseWite").style.display = "none";//remove mask
}
DialogHelper.PrepareToClose= function ()
{
	window.setTimeout("DialogHelper.Close()", 250);
}

