//
// Version 1.0
//

// Global variable for handle to popup window.
var popUpWin = null;

//------------------------------------------------------------------------------
//
// Function to open a popup window, given the page. The size and other
// attributes for the spawned window are set in the function
//
// args: thePage - url of page to be opened in popup window
//
// rtns: none
//
//------------------------------------------------------------------------------
function openPopup(thePage)
{
   if( popUpWin == null || popUpWin.closed )
   {
      var winOptions = "resizable=yes,toolbar=no,scrollbars=no,statusbar=no,menubar=no,width=400,height=350";
      popUpWin = window.open(thePage,"thePopUp",winOptions);
   }

   if( popUpWin.open )
   {
      popUpWin.location.href=thePage;
      popUpWin.focus();
   }
}

//------------------------------------------------------------------------------
//
// Function to close a popup window.
//
// args: none
//
// rtns: none
//
//------------------------------------------------------------------------------
function closePopup()
{
   if( popUpWin != null && !popUpWin.closed )
   {
      popUpWin.close();
   }
}
