function setNodes(node)
{
  for (x=0; x<node.childNodes.length; x++)
  {
    child = node.childNodes[x];
    if(child.nodeName=="LI")
   {
   // make its mouseover add the over class
   child.onmouseover=function()
   {
        this.className+=" over";
      }

   // have its mouseout remove the over class
      child.onmouseout=function() 
      {
        this.className=this.className.replace(" over", "");
      }
    }
  }
}


// we will run this function at page load
startList = function()
{
    // for ie and bad browsers
    if (document.all&&document.getElementById) 
    {
    // this is our drop down menu
    cssdropdownRoot = document.getElementById("cssdropdown");
    
    // loops through all the children in the drop down menu
    setNodes(cssdropdownRoot);
    for (z=0; z<cssdropdownRoot.childNodes.length; z++)
    {
      node = cssdropdownRoot.childNodes[z];
      if(node.nodeName == "LI")
      {
        for (y=0; y<node.childNodes.length; y++)
        {
            node2 = node.childNodes[y];
          if(node2.nodeName == "UL")
          {
            setNodes(node2);
            for (x=0; x<node2.childNodes.length; x++)
            {
              node3 = node2.childNodes[x];
              if(node3.nodeName == "LI")
              {
                for (w=0; w<node3.childNodes.length; w++)
                {
                  node4 = node3.childNodes[w];
                  if(node4.nodeName == "UL")
                    setNodes(node4);
                }
              }
            }
          }
        }
      }
    }
  }
}

// have the function run at pageload
if (window.attachEvent)
  window.attachEvent("onload", startList)
else
  window.onload=startList;
