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.className = "over";

          if (this.id == timerID)
          {
            clearTimeout(timer);
          }
          else if (timerID != "")
          {
            document.getElementById(timerID).className = "out";
          }
        }
      }
      node.onmouseout = function()
      {
        timerID = this.id;
        timer = setTimeout("UnloadMenu('" + this.id + "')", 250);
      }
    }
  }
}

function UnloadMenu(id)
{
  document.getElementById(id).className = "out";
}

function DoLoadPhoto (option, height, src)
{
  if (option > 700)
  {
    document.getElementById("ph_1").innerHTML = "";
    document.getElementById("ph_2").innerHTML = "";
  }
  else
  {
    side_width = ((800 - option) / 2);
    document.getElementById("ph_1").style.width = side_width + "px";
    document.getElementById("ph_2").style.width = side_width + "px";
    document.getElementById("ph_3").style.width = option + "px";

    document.getElementById("ph_1").style.height = height + "px";
    document.getElementById("ph_2").style.height = height + "px";
    document.getElementById("ph_3").style.height = height + "px";

    document.getElementById("ph_1").innerHTML = "<div style=\"border: 1px solid #666; height: 99%; width: 99%\"></div>";
    document.getElementById("ph_2").innerHTML = "<div style=\"border: 1px solid #666; height: 99%; width: 99%\"></div>";
  }
  document.getElementById("ph_3").innerHTML = "<img src=\"" + src + "\" id=\"photo_viewer\">";
  document.getElementById("photo_viewer").style.width = option + "px";
  document.getElementById("photo_viewer").style.height = height + "px";
}

function DoHoverPhoto (id, src)
{
  document.getElementById("thumb_" + id).src = src;
}
