function highmenu(LinkObject)
{
  LinkObject.className = "mouseovermenu";
}

function lowmenu(LinkObject)
{
  LinkObject.className = "menu";
}

function highsubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellA'+menuid).className = "mouseoversubmenu";
    document.getElementById('cellB'+menuid).className = "mouseoversubmenu";
  }
}

// need for Firefox (toggle mouse over menu on reload)
function activesubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellA'+menuid).className = "activesubmenu";
    document.getElementById('cellB'+menuid).className = "activesubmenu";
  }
}

function lowsubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellA'+menuid).className = "submenu";
    document.getElementById('cellB'+menuid).className = "submenu";
  }
}

function highundersubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellB'+menuid).className = "mouseoverundersubmenu";
    document.getElementById('cellC'+menuid).className = "mouseoverundersubmenu";
  }
}

// need for Firefox (toggle mouse over menu on reload)
function activeundersubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellB'+menuid).className = "activeundersubmenu";
    document.getElementById('cellC'+menuid).className = "activeundersubmenu";
  }
}

function lowundersubmenu(menuid)
{
  if (document.getElementById)
  {
    document.getElementById('cellB'+menuid).className = "undersubmenu";
    document.getElementById('cellC'+menuid).className = "undersubmenu";
  }
}

arrow = new Image(); arrow.src = "images/dot.gif";
empty = new Image(); empty.src = "images/transpix.gif";

function ChangePict(obj, boxid)
{
  if (document.images)
  {
    // document [boxid].src = obj.src;
  }
}

function Is ()
{
  // convert all characters to lowercase to simplify testing
  var agt = navigator.userAgent.toLowerCase();

  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);

  this.ns      = ( (agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) &&
                   (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) &&
                   (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) );
  this.ns2     = (this.ns && (this.major == 2));
  this.ns3     = (this.ns && (this.major == 3));
  this.ns4     = (this.ns && (this.major == 4));
  this.ns4up   = (this.ns && (this.major >= 4));
  this.nsonly  = (this.ns && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)));
  this.ns6     = (this.ns && (this.major == 5));
  this.ns6up   = (this.ns && (this.major >= 5));
  this.gecko   = (agt.indexOf('gecko') != -1);
  this.khtml   = (agt.indexOf('konqueror') != -1);

  this.ie      = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
  this.ie3     = (this.ie && (this.major < 4));
  this.ie4     = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
  this.ie4up   = (this.ie  && (this.major >= 4));
  this.ie5     = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1));
  this.ie5_5   = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
  this.ie5up   = (this.ie  && !this.ie3 && !this.ie4);
  this.ie5_5up = (this.ie && !this.ie3 && !this.ie4 && !this.ie5);
  this.ie6     = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
  this.ie6up   = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);

  // BUG: On AOL4, returns false if IE3 is embedded browser or if this is the first
  //      browser window opened.  Thus the variables is.aol, is.aol3, and is.aol4
  //      aren't 100% reliable.
  this.aol     = (agt.indexOf("aol") != -1);
  this.aol3    = (this.aol &&this.ie3);
  this.aol4    = (this.aol &&this.ie4);
  this.aol5    = (agt.indexOf("aol 5") != -1);
  this.aol6    = (agt.indexOf("aol 6") != -1);

  // NOTE: Opera and WebTV spoof Navigator.  We do strict client detection. If you
  //       want to allow spoofing, take out the tests for opera and webtv.
  this.opera   = (agt.indexOf("opera") != -1);
  this.opera2  = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
  this.opera3  = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
  this.opera4  = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
  this.opera5  = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
  this.opera5up= (this.opera && !this.opera2 && !this.opera3 && !this.opera4);

  this.webtv   = (agt.indexOf("webtv") != -1);

  this.aoltv   = ((agt.indexOf("navio") != -1) ||
                  (agt.indexOf("navio_aoltv") != -1));

  this.hotjava = (agt.indexOf("hotjava") != -1);
  this.hotjava3 = (this.hotjava && (this.major == 3));
  this.hotjava3up = (this.hotjava && (this.major >= 3));
}

function getWindow()
{
  this.width  = window.screen.width;
  this.height = window.screen.height;

  var is = new Is();

  if ( is.khtml )
  {
    this.width  = document.body.scrollWidth;
    this.height = document.body.scrollHeight;
  }
  else if ( is.ie6 || is.ie6up )
  {
    this.width  = document.documentElement.clientWidth;
    this.height = document.documentElement.clientHeight;
    if ( this.width == 0 || this.height == 0)
    {
      this.width  = document.documentElement.scrollWidth;
      this.height = document.documentElement.scrollHeight;
    }
  }
  else if ( is.gecko )
  {
    this.width  = window.innerWidth;
    this.height = window.innerHeight;
  }
  else if ( is.ie5 || is.ie5_5 || is.ie5up || ie.ie5_5up )
  {
    this.width  = document.body.clientWidth;
    this.height = document.body.clientHeight;
  }
  else if ( is.ie )
  {
    this.width  = document.body.scrollWidth;
    this.height = document.body.scrollHeight;
  }
  else if ( is.ns4 || is.ns4up )
  {
    this.width  = document.Page.document.width;
    this.height = document.Page.document.height;
  }
}

function fullHeightSubmenu()
{
  var Window = new getWindow();

  if ( document.getElementById )
  {
    if ( document.documentElement.offsetHeight )
    {
      headerHeight = document.getElementById("header").offsetHeight;
      menuHeight = document.getElementById("menu").offsetHeight;
    }
    else
    {
      headerHeight = 104;
      menuHeight = 28;
    }

     document.getElementById("submenu").height = Window.height - Math.max(menuHeight, 28) - Math.max(headerHeight, 104) - 31;
  }
}

function openPopupWindow (windowHref, windowWidth, windowHeight)
{
  var newWindow = window.open(windowHref, "showPicture", "width=" + windowWidth + ",height=" + windowHeight + ",resizable=no,scrollbars=no,dependent=yes,status=no");

  if (newWindow != null && !newWindow.closed )
  {
    newWindow.focus();
  }
}

// page not in frames
if ( !parent.frames ) location.href=root;

// initialize Netscape monitoring
if ( window.innerWidth )
{
  window.onresize = fullHeightSubmenu;
}

