<!--
// $Id: menu.js,v 1.2 2009/09/22 18:13:04 shelton Exp $
// Set link-style displaying - inverse color, change cursor to pointer
function set_linkStyle(myid) 
{
  elem = document.getElementById(myid);
  elem.style.color = link_color;
  elem.style.cursor = "pointer";
}

// Set normal-style displaying - normal color, normal cursor
function set_normalStyle(myid) 
{
  elem = document.getElementById(myid);
  elem.style.color = normal_color;
  elem.style.cursor = "auto";
}

// Set normal displaying (against hide text)
function set_normalDisplay(myid) 
{
  elem = document.getElementById(myid);
  elem.style.display = "inline";
}

// Hide displaying (against normal text)
function set_hideDisplay(myid) 
{
  elem = document.getElementById(myid);
  elem.style.display = "none";
}

// Clean LI margin and set "opened" background
function cleanMargin_and_setBackground(myid)
{
  elem = document.getElementById(myid);
  parental = elem.parentNode;

  parental.style.paddingBottom = 0;
  parental.style.backgroundImage = "blue-with-opened-level.JPG";
}

// Set LI margin and reset backgroupnd to "flapped"
function setMargin_and_resetBackground(myid)
{
  elem = document.getElementById(myid);
  parental = elem.parentNode;

  parental.style.paddingBottom = "5px";
  parental.style.backgroundImage = "blue-with-flapped-lever.JPG";
}

// Switch item state between opening subitems and hide subitems
function switch_state(flapid)
{
  // We should drop "margin-bottom: 5px", when set normal display
  // and insert it again, when set hide display
  if (flapped[flapid] == 1)
    {
      set_normalDisplay(flapid);
      cleanMargin_and_setBackground(flapid);
      flapped[flapid] = 0;
    }
   else
     {
       set_hideDisplay(flapid);
       setMargin_and_resetBackground(flapid);
       flapped[flapid] = 1;
     }
}
-->
