startList = function()

  {

  var node = document.getElementById("nav");

    

  AssignMenuEvents(node) ;

  }



function AssignMenuEvents(pObject)

  {

  var node ;

  var vPreviousIndex ;

  

  for (i=0; i < pObject.childNodes.length; i++)

    {

    node = pObject.childNodes[i];



    if (node.tagName == "LI")

      {

      if (document.all && document.getElementById)

        {

        node.onmouseover=function()

                           {

                           this.className+=" over";

                           }



        node.onmouseout=function()

                           {

                           this.className=this.className.replace(" over", "");

                           }

        node.onclick   = MenuClickHandlerIE;

        }

      else

        {

      node.addEventListener("click", MenuClickHandlerMoz, false);

        }

      }



    if (node.childNodes.length > 0)

      {

      vPreviousIndex = i ;

      AssignMenuEvents(node);

      i = vPreviousIndex ;

      }

    }

  }



function MenuClickHandlerIE()

  {

  var node ;

  var vFoundAction = false ;

  pNode = event.srcElement ;

  

  for (i=0; i < pNode.childNodes.length; i++)

    {

    node = pNode.childNodes[i];



    if (node.tagName == "A")

      {

      vFoundAction = true ;

      

      if (node.click)

        {

        node.click();

        }

      else

        {

        window.location.replace(node.href);

        }

      }

    if (vFoundAction)

      {

      break ;

      }

    }

  event.cancelBubble  = true ;

  }





function MenuClickHandlerMoz(e)

  {

  var node ;

  var vFoundAction = false ;

  pNode = e.target  ;

  

  for (i=0; i < pNode.childNodes.length; i++)

    {

    node = pNode.childNodes[i];



    if (node.tagName == "A")

      {

      vFoundAction = true ;

      

      if (node.onclick)

        {

        node.onclick();

        }

      else

        {

        window.location.replace(node.href);

        }

      }

    if (vFoundAction)

      {

      break ;

      }

    }

  e.cancelBubble  = true ;

  }



window.onload=startList;


