// General/Global Modal variables and functions

var isHardClose = true;

/*
	This function returns a value of 0(Cancel) if the window is closed without using 
	the continue/cancel buttons
*/
function window.onunload()
{
	//do similar to cancel, if cancel not pressed
	if (isHardClose == true)
	{ 
		windowReturn = new Array();
		windowReturn[0] = 0;
		window.returnValue = windowReturn;
		window.close();
	}
}


/*
	This function returns a value of 0(Cancel) if the window is closed using 
	the cancel button
*/
function Cancel()
{
	windowReturn = new Array();
	isHardClose = false;
	windowReturn[0] = 0;
	window.returnValue = windowReturn;
	window.close();
}