function startList() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("menu_sup");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}

function hideShowLI()
{
  var objLI = this;
  for(var j = 0; j  < objLI.childNodes.length; j++)
  {
    if(objLI.childNodes.item(j).nodeName == "UL")
    {
      if(objLI.childNodes.item(j).style.display != "" && objLI.childNodes.item(j).style.display != "none")
      {
        objLI.childNodes.item(j).style.display = "none";
        return;
      } else {
        objLI.childNodes.item(j).style.display = "block";
        return;
      }
    }
  }
}

function initialiseMenus()
{
  var objULCollection = document.body.getElementsByTagName("UL");		
  for(var h = 0; h < objULCollection.length; h++)
  {
    var objUL = objULCollection[h];
    if (objUL.className != "sidemenu") {
      continue;
    }
    var objLICollection = objUL.getElementsByTagName("LI");		
    for(var i = 0; i < objLICollection.length; i++)
    {		
      var objLI = objLICollection[i];										
      for(var j = 0; j  < objLI.childNodes.length; j++)
      {
        if(objLI.childNodes.item(j).nodeName == "UL")
        {
          objLI.onclick=hideShowLI;
        }
      }
    }
  }
  startList();
}

window.onload = initialiseMenus;



