// Global 'constants'
var IE = (document.all ? true : false);
var NS = (document.layers ? true : false);
var NS6 = (document.getElementById ? true : false);
var LEFT = (IE ? "pixelLeft" : "left");
var TOP = (IE ? "pixelTop" : "top");

// Global variables
var bMenuEnabled = false;
var Page;
var Tab;
var Bar;
var Floater;
var MenuAbout;
var MenuFreeware;
var MenuFavorites;
var MenuSurfices;

// Global script
function Initialize()
  {
  var HeightTab = (document.images["ShowMenu"] ? document.images["ShowMenu"].height : 17);
  var HeightBar = (document.images["HideMenu"] ? document.images["HideMenu"].height : 17);
  Page = new Page();
  Tab = new LinkBar("Tab", HeightTab);
  Bar = new LinkBar("Bar", HeightBar);
  Floater = new Floater("Floater");
  Floater.Position(Page.Width() - 125, 50);
  MenuAbout = new Menu("MenuAbout");
  MenuFreeware = new Menu("MenuFreeware");
  MenuFavorites = new Menu("MenuFavorites");
  MenuSurfices = new Menu("MenuSurfices");
  SetPositions();
  bMenuEnabled = true;
  window.setTimeout("OnTimer()", 100);
  }

function OnTimer()
  {
  SetPositions();
  Tab.OnTimer();
  Bar.OnTimer();
  Floater.OnTimer();
  window.setTimeout("OnTimer()", 100);
  }

function SetPositions()
  {
  var HeightTab = (document.images["ShowMenu"] ? document.images["ShowMenu"].height : 17);
  var HeightBar = (document.images["HideMenu"] ? document.images["HideMenu"].height : 17);
  var WidthHeader = (document.images["Header"] ? document.images["Header"].width : 650);
  var Left;
  Tab.Position(0, Page.Height() - HeightTab);
  Bar.Position(0, Page.Height() - HeightBar);
  Floater.Align(Page.Width() - 125);
  Left = ((Page.Width() - WidthHeader) / 2);
  Left = ((Left < 0) ? 0 : Left);
  MenuAbout.Position(Left + 240, 50);
  MenuFreeware.Position(Left + 340, 50);
  MenuFavorites.Position(Left + 440, 50);
  MenuSurfices.Position(Left + 540, 50);
  }

