﻿// Function that sets the mouseover and mouseout functions
// for each LI in the main nav

function ExpandMenu()
{ 
   var i, k, dropdownbar, thisClass, liTag, regEx = /\s*navhover/, number = '', liclass, csClass = 'navhover', dropdownid = 'dropdownbar';
 
   //for(i = 0; i < 10; i++)
   //{
   var navSet = $j('.SpecialDropDownListContainer');
   
   for (x = 0; x < navSet.length; x++)
   {
      //dropdownbar = document.getElementById(dropdownid + number);
      dropdownbar = navSet[x];  
      if (dropdownbar) {
          liTag = dropdownbar.getElementsByTagName("li");

          if (liTag) {
              for (k = 0; k < liTag.length; k++) {
                  liTag[k].onmouseover = function() {
                      liclass = this.className;
                      thisClass = (liclass) ? liclass + ' ' + csClass : csClass;
                      this.className = thisClass;
                  };

                  liTag[k].onmouseout = function() {
                      liclass = this.className;
                      this.className = (liclass) ? liclass.replace(regEx, '') : '';
                  };
              }
          }
      }
      //}
     
      //number = i + 1;
   }
}


