function LoadMenu()
{
  timerID = "";
  navRoot = document.getElementById("ddm");
  for (i = 0; i < navRoot.childNodes.length; i++)
  {
    node = navRoot.childNodes[i];
    if (node.nodeName == "LI")
    {
      node.onmouseover = function()
      {
        if (this.id != "end_li")
        {
          this.style.backgroundImage = "url(../images/menuback_1.jpg)";
          this.className = "over";
          
          if (this.id == timerID)
          {
            clearTimeout(timer);
          }
          else if (timerID != "")
          {
            document.getElementById(timerID).style.backgroundImage = "url(../images/menuback.jpg)";
            document.getElementById(timerID).className = "out";
          }
        }
      }
      node.onmouseout = function()
      {
        timerID = this.id;
        timer = setTimeout("UnloadMenu('" + this.id + "')", 500);
      }
    }
  }
}
window.onload = LoadMenu;

function UnloadMenu(id)
{
  document.getElementById(id).style.backgroundImage = "url(../images/menuback.jpg)";
  document.getElementById(id).className = "out";
}

function OpenWin(url, width, height, location, menubar, status, toolbar, scrollbars, resizable)
{
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  window.open(url, 'title', 'width='+width+',height='+height+',left='+left+',top='+top+', location='+location+', menubar='+menubar+', status='+status+', toolbar='+toolbar+', scrollbars='+scrollbars+', resizable='+resizable+'');
}

function LaunchHelp(source)
{
  var height = 250;
  var width = 500;
  var location = 'no';
  var menubar = 'no';
  var status = 'no';
  var toolbar = 'no';
  var scrollbars = 'yes';
  var resizable = 'yes';
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  window.open(source, 'title', 'width='+width+',height='+height+',left='+left+',top='+top+', location='+location+', menubar='+menubar+', status='+status+', toolbar='+toolbar+', scrollbars='+scrollbars+', resizable='+resizable+'');
}

function LoadCategory(id, category_count)
{
  for (i = 1; i <= category_count; i++)
  {
    if (i == id)
    {
      document.getElementById("category_data_" + i).style.display = "block";
    }
    else
    {
      document.getElementById("category_data_" + i).style.display = "none";
    }
  }
}

timerID2 = "";

function LoadInfoData(id)
{
  if (id == timerID2)
  {
    clearTimeout(timer2);
  }
  else if (timerID2 != "")
  {
    document.getElementById(timerID2).className = "info_data";
  }
  document.getElementById(id).className = "info_data_over";
}

function LoadInfoData_2(id)
{
  if (id == timerID2)
  {
    clearTimeout(timer2);
  }
  else if (timerID2 != "")
  {
    document.getElementById(timerID2).className = "info_data";
  }
  document.getElementById(id).className = "info_data_over_2";
}

function UnloadInfoData(id)
{
  timerID2 = id;
  timer2 = setTimeout("UnloadInfoNow('" + id + "')", 500);
}

function UnloadInfoNow(id)
{
  document.getElementById(id).className = "info_data";
}
