activateMenu = function(main_menu) {
/* currentStyle restricts the Javascript to IE only */
	if (true) {
        var navroot = document.getElementById(main_menu);
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        
        for (i=0; i<lis.length; i++) {
           /* If the LI has another menu level */
        	var uls = lis[i].getElementsByTagName("UL");
            if(uls.length){
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                   /* display the inner menu */
             	   var uls = this.getElementsByTagName("UL");
             	   var x;
             	   for (x = 0; x<uls.length; x++) {
             	       uls[x].style.display="block";
             	   }
                }
                lis[i].onmouseout=function() {
              	   var uls = this.getElementsByTagName("UL");
             	   var x;
             	   for (x = 0; x<uls.length; x++) {
             	       uls[x].style.display="none";
             	   }
                }
                
          	   for (z = 0; z<uls.length; z++) {
         	       uls[z].style.display="none";
         	   }
            }
        }
    }
}
window.onload= function(){
    activateMenu('navbar');
}
