<!-- hide this script from non-javascript-enabled browsers
/*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* DO NOT MAKE ANY CHANGES TO THIS FILE!                                       
*	CONTACT Joe Frausto Jr. TO REQUEST A CHANGE TO THIS FILE                    
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*
* ------------------------------------------------------------------------------------ 
*  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.
*						New: OpenModalDialog - A modal dialog box retains the input focus while open. 
*						The user cannot switch windows until the dialog box is closed
*  
*  Author:	Joe Frausto Jr.
*  Created: 09/12/2000
*  History: 01/17/2002  Status option added
*						11/21/2003  Open Modal added
*  
* ------------------------------------------------------------------------------------ 
*/

  var PopUp = new Object();
  PopUp.ChildName = null;
  PopUp.Reload = 0;
  PopUp.CloseChild = 0;

function openIt(FileLocation, winName, newWidth, newHeight, iScrolling, iResizable, iStatus, AllOptions, iLocation, iMenubar, iToolbar, winReload, winCloseChild, iBrowserName)
{
  PopUp.Width = "width=" + newWidth;
  PopUp.Height = ",height=" + newHeight;
  PopUp.Scrolling = "";
  PopUp.Resizable = "";
	PopUp.Status = "";
  PopUp.Location = "";
  PopUp.Locationbar = "";
  PopUp.Menubar = "";
  PopUp.Toolbar = "";

	if (iScrolling == 1)
	  PopUp.Scrolling = ",scrollbars=1";
	if (iResizable == 1)
	  PopUp.Resizable = ",resizable=1";
	if (iStatus == 1)
	  PopUp.Status = ",status=1";
	if (iLocation == 1)
	  PopUp.Locationbar = ",location=1";
	if (iMenubar == 1)
	  PopUp.Menubar = ",menubar=1";
	if (iToolbar == 1)
	  PopUp.Toolbar = ",toolbar=1";

  PopUp.Reload = winReload;
  PopUp.CloseChild = winCloseChild;

	if (window.screen)
  {
		PopUp.Location = ",left=" + ((screen.availWidth - newWidth - 10) * .5) + ",top=" + ((screen.availHeight - newHeight - 30) * .5);
	}

	if (iBrowserName == "AOL")
	{
    PopUp.ChildName = window.open(FileLocation, winName, PopUp.Width + PopUp.Height);
	}
  else if (AllOptions)  
  {
    PopUp.ChildName = window.open(FileLocation, winName, PopUp.Width + PopUp.Height + PopUp.Location + ",toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1");
  }
  else
  {
    PopUp.ChildName = window.open(FileLocation, winName, PopUp.Width + PopUp.Height + PopUp.Location + PopUp.Scrolling + PopUp.Resizable + PopUp.Status + PopUp.Locationbar + PopUp.Menubar + PopUp.Toolbar);
  }
}

function openCenter(FileLocation, windowName, winWidth, winHeight, Scrolling, Resizable, Status, AllOptions, winReload, winCloseChild, iBrowserName)
{
	openIt(FileLocation,windowName,winWidth,winHeight,Scrolling,Resizable,Status,AllOptions,0,0,0,winReload,winCloseChild,iBrowserName);
}

function openDialog(FileLocation, windowName, winWidth, winHeight, Scrolling, Resizable, Status, AllOptions, Location, Menubar, Toolbar, winReload, winCloseChild, iBrowserName)
{
	openIt(FileLocation,windowName,winWidth,winHeight,Scrolling,Resizable,Status,AllOptions,Location,Menubar,Toolbar,winReload,winCloseChild,iBrowserName);
}

function openModal(FileLocation,winName,newWidth,newHeight,iScrolling,iResizable,iStatus,AllOptions,winReload,winCloseChild,iEdge,iCenter)
{
  PopUp.Width = "dialogWidth=" + newWidth;
  PopUp.Height = ";dialogHeight=" + newHeight;
  PopUp.Scrolling = ";scroll=0";
  PopUp.Resizable = ";resizable=0";
	PopUp.Status = ";status=0";
	PopUp.Edge = ";edge:sunken";
	PopUp.Center = ";center=1";
  PopUp.Reload = winReload;
  PopUp.CloseChild = winCloseChild;
	PopUp.Location = ""

	if (AllOptions)  
	{
		PopUp.Scrolling = ";scroll=1";
		PopUp.Resizable = ";resizable=1";
		PopUp.Status = ";status=1";
	}
	else
	{
		if (iScrolling == 1)
		  PopUp.Scrolling = ";scroll=1";
		if (iResizable == 1)
		  PopUp.Resizable = ";resizable=1";
		if (iStatus == 1)
		  PopUp.Status = ";status=1";
	}
	if (iEdge == 1)
	  PopUp.Edge = ";edge=raised";
	if (iCenter == 0)
	  PopUp.Center = ";center=0";

	if (window.screen)
  {
		PopUp.Location = ";dialogLeft=" + ((screen.availWidth - newWidth - 10) * .5) + ";dialogTop=" + ((screen.availHeight - newHeight - 30) * .5);
	}

  PopUp.ChildName = window.showModalDialog(FileLocation, winName, PopUp.Width + PopUp.Height + PopUp.Location + PopUp.Scrolling + PopUp.Resizable + PopUp.Status + PopUp.Edge + PopUp.Center);
	PopUp.ChildName.focus();
}
function openModalDialog(FileLocation,winName,newWidth,newHeight,winReload)
{
  PopUp.Width = "dialogWidth=" + newWidth;
  PopUp.Height = ";dialogHeight=" + newHeight;
  PopUp.Reload = winReload;

  PopUp.ChildName = window.showModalDialog(FileLocation, winName, PopUp.Width + PopUp.Height+ ";scroll=0;resizable=0;status=0");
  PopUp.ChildName.focus();
}

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);
		    }
		  }
		}
	}
	else if (typeof PopUp.ChildName == "undefined" && 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();
	}

function refreshPage(DomainName)
{
	openIt("http://" + DomainName + "functions/reload.htm","ReloadWin",100,100,0,0,0,0,0,0,0,0,0)
}

function refreshTopPage(DomainName)
{
	openIt("http://" + DomainName + "functions/reload_top.htm","ReloadWin",100,100,0,0,0,0,0,0,0,0,0)
}
// stop hiding -->
