// Tobin Electrical Components Web Page
// ====================================
//
// Author: David Tobin
//
// This file provides the Javascript functions that are used to
// activate a "pop up" window from the main page of the website.


// INSTRUCTIONS:
// -------------
//
//    * If you need to change the contents of the "pop up" window, use
//      a web-page editor (such as Microsoft Frontpage Express) to edit the "TobinPopup.htm" file.
//
//    * The "PARAMETERS" section below allows for the appearance of the pop up
//      window to be customised.  Simply change the required parameter and then save this file.



// PARAMETERS:        
// -----------
var ShowPopupWindow = true   // Valid values:  true    (The popup window will be shown)
                             //                false   (Prevents the popup window being shown)

var PopupWidth = 550         // Width in pixels of the Popup Window
var PopupHeight = 420        // Height in pixels of the Popup Window

var PopupLeft = 80           // X-Position of the Popup Window (pixels from left edge of screen)
var PopupTop = 80            // Y-Position of the Popup Window (pixels from top of screen)

var PopupScrollbars = "yes"  // Set to "no" for no scrollbars, 
                             // or "yes" for scrollbars on the Popup Window.

var PopupResizable = "yes"   // Set to "no" for non-resizable Popup Window, 
                             // or "yes" for resizable Popup Window.







//***************************************************************************
//************* DO NOT MODIFY ANY CODE BELOW THIS LINE!!!! ******************
//***************************************************************************
function openTobinPopup()
{
   if( !ShowPopupWindow ) return;   // Don't show the window if it's been switched off in the PARAMETERS section

   if(self.TobinPopup)
   {
      if(self.TobinPopup.close) self.TobinPopup.close();
   }
   newWinProperties = "location=no,scrollbars=" + PopupScrollbars + ",directories=no,menubar=no,"
   newWinProperties = newWinProperties + "left=" + PopupLeft + ",top=" + PopupTop
   newWinProperties = newWinProperties + ",toolbar=no,resizable=" + PopupResizable 
   newWinProperties = newWinProperties + ",status=No,width=" + PopupWidth + ",height=" + PopupHeight;

   TobinPopup=window.open('TobinPopup.htm', 'TobinPopup', newWinProperties);
   if(TobinPopup.focus)
   {
      TobinPopup.focus();
   }
}
