
<!--
//The following group of functions handle pop-up windows
function WinOpen(sURL, sName, intTop, intLeft, intWidth, intHeight)
{
	var windowprops;
	if (null == sURL) {
		alert("ERROR: WinOpen() requires a URL");
		return;
	}
	if (null == sName)
		sName = '';
	if (null == intTop)
		intTop = 200;
	if (null == intLeft)
		intLeft = 200;
	if (null == intWidth)
		intWidth = 200;
	if (null == intHeight)
		intHeight = 200;
	windowprops = "location=no,scrollbars=yes,menubar=no,toolbar=no,locationbar=no,resizable=yes,alwaysRaised=yes,height="+intHeight+",width="+intWidth+",left="+intLeft+",top="+intTop;
	return window.open(sURL,sName,windowprops);
}
		
function IgnoreEvents(e)
{
  return false;
}

//Opens a dialog box. Return value differs based on IE vs. other browser.
//IE returns the "return value" (variant) from the dialog box.
//Other browsers will return a handle to the window.
function ShowDialog(sURL, intWidth, intHeight)
{
	if (null == sURL) {
		alert("ERROR: ShowDialog() requires a URL");
		return;
	}
	if (null == intWidth)
		intWidth = 360;
	if (null == intHeight)
		intHeight = 200;

	if (window.showModalDialog)
	{
		vReturnValue = window.showModalDialog(URL, window,
			"scroll:no;dialogWidth:" + intWidth + "px;dialogHeight:" + intHeight + "px");
	}
	else
	{
		window.top.captureEvents (Event.CLICK|Event.FOCUS);
		window.top.onclick=IgnoreEvents;
		window.top.onfocus=HandleFocus; 
		winModalWindow = window.open (URL, "ModalChild",
		   "dependent=yes,width=" + intWidth + ",height=" + intHeight);
		winModalWindow.focus();
		return winModalWindow;
	}
}

 
function HandleFocus(winModalWindow)
{
  if (winModalWindow)
  {
    if (!winModalWindow.closed)
    {
      winModalWindow.focus();
    }
    else
    {
      window.top.releaseEvents (Event.CLICK|Event.FOCUS);
    }
  }
  return false;
}
// -->
