function highlight(element, bgcolor, fgcolor)
{
   element.style.backgroundColor=bgcolor;
   element.style.color=fgcolor;
   return;
}

function unhighlight(element)
{
   element.style.backgroundColor='';
   element.style.color='';
   return;
}

function initializeLinkMouseover(divname, bgcolor, fgcolor)
{
   var divElement = document.getElementById(divname);
   if ( divElement )
   {
      var children = divElement.childNodes;
      for ( var i = 0; i < children.length; ++i )
      {
         var child = children[i];
         if ( child.tagName && child.tagName.toUpperCase() == "A" )
         {
            child.onmouseover= function(){highlight(this, bgcolor, fgcolor);};
            child.onmouseout= function(){unhighlight(this);};
         }
      }
   }
}

var topMenuBackground = '#B5EAA6';
var topMenuForeground = '#000';

function initializeTopMenu()
{
   initializeLinkMouseover('topMenu', topMenuBackground, topMenuForeground);
}

var subMenuBackground = '#34D134';
var subMenuForeground = '#000';

function initializeSubMenu()
{
   initializeLinkMouseover('subMenu', subMenuBackground, subMenuForeground);
}

var miscellaneousMenuBackground = '#A75F17';
var miscellaneousMenuForeground = '#FFF';

function initializeMiscellaneousMenu()
{
   initializeLinkMouseover('miscellaneousMenu', miscellaneousMenuBackground, miscellaneousMenuForeground);
}

var bottomMenuBackground = '#B5EAA6';
var bottomMenuForeground = '#000';

function initializeBottomMenu()
{
   initializeLinkMouseover('bottomMenu', bottomMenuBackground, bottomMenuForeground);
}

function initialize()
{
   initializeTopMenu();
   initializeSubMenu();
   initializeMiscellaneousMenu();
   initializeBottomMenu();
}

window.onload = initialize;


