<!-- hide this script from non-javascript-enabled browsers
/* ---------------------------------------------------------------------------------------- 
*  All intellectual property rights relating to this code are owned by J Business Solutions 
*  ----------------------------------------------------------------------------------------
*  Title: Dead Center windows
*  Purpose: Evaulate available screen size to place pop-up window
*           centered on screen.  Also close the pop-up when the
*           originating window regains focus.
*  
*  Author: Joe Frausto Jr.
*  Created: 09/12/2000
*  History:
*  
*  ------------------------------------------------------------------------------------ */

  var PopUp = new Object();
  PopUp.ChildName = null;
  PopUp.Reload = 0;
  PopUp.CloseChild = 0;
  
function openCenter(FileLocation,winName,newWidth,newHeight,iScrolling,iResizable,AllOptions,winReload,winCloseChild,iBrowserName)
{
	if (window.screen)
  {
    PopUp.Scrolling = "";
    PopUp.Resizable = "";
		if (iScrolling == 1)
	    PopUp.Scrolling = ",scrollbars=1";
		if (iResizable == 1)
	    PopUp.Resizable = ",resizable=1";
    PopUp.Width = screen.availWidth;
    PopUp.Height = screen.availHeight;
    PopUp.Reload = winReload;
    PopUp.CloseChild = winCloseChild;

		if (iBrowserName == "AOL")
		{
      PopUp.ChildName = window.open(FileLocation,winName,"width=" + newWidth + ",height=" + newHeight);
		}
    else if (AllOptions)  
    {
      PopUp.ChildName = window.open(FileLocation,winName,"width=" + newWidth + ",height=" + newHeight + ",left=" + ((PopUp.Width - newWidth - 10) * .5) + ",top=" + ((PopUp.Height - newHeight - 30) * .5) + ",toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1");
    }
    else
    {
      PopUp.ChildName = window.open(FileLocation,winName,"width=" + newWidth + ",height=" + newHeight + ",left=" + ((PopUp.Width - newWidth - 10) * .5) + ",top=" + ((PopUp.Height - newHeight - 30) * .5) + PopUp.Scrolling + PopUp.Resizable);
    }
	}
}

function blowOutChild()
{
  if (PopUp.ChildName != null)
	{
	  if (typeof PopUp.ChildName.closed == "boolean")
		{
		  if (PopUp.ChildName.closed == false)
		  {
		    if (PopUp.CloseChild)
		      PopUp.ChildName.close();
		    if (PopUp.Reload)
		   		location.reload(true);
		  }
		}
	}
}
window.onfocus = blowOutChild;
window.onunload = blowOutChild;

if (location.search && window.focus)
{ // for NN2
  if (location.search.indexOf("buFocus") >= 0)
	  window.focus();
 }
// stop hiding -->

