addEvent(window,"load", initMenus);
function bandeau_rotation() {
	var bandeauRoot = document.getElementById("bandeau_accueil");
	if (bandeauRoot) {
		var mis = 1 + Math.round(Math.random()*15);
		bandeauRoot.setAttribute("src","/images/utm/bandeau_0" + mis + ".jpg");
		//bandeauRoot.style.backgroundImage ="url(/images/2006/bandeau_0" + mis + ".jpg)";
	}


}
function load_fonction(){
bandeau_rotation();
startList();
}
function startList() {
  if (navigator.appName != "Microsoft Internet Explorer") {
	navRoot = document.getElementById("menu_principal");
	for (i=0; i<navRoot.childNodes.length; i++) {
	  var node = navRoot.childNodes[i];
	  if (node.nodeName=="LI") {
		var largeur = getComputedStyle(node, null).getPropertyValue("width");
		var hauteur = getComputedStyle(node, null).getPropertyValue("height");
		var sousnode = node.getElementsByTagName("UL");
		if (sousnode[0] != null) {
		  	sousnode[0].style.width = largeur;
			if (hauteur != "17px") {
				sousnode[0].style.top = hauteur;
			} else {
				sousnode[0].style.top = "19px";
			}
			sousnode[0].onmouseover=function() {
		      this.parentNode.className+="actif";
			}
			sousnode[0].onmouseout=function() {
			  this.parentNode.className=this.parentNode.className.replace("actif", "");
			}
		}
	  }
    }
  }
if (navigator.appName == "Microsoft Internet Explorer") {
		navRoot = document.getElementById("menu_principal");
		for (i=0; i<navRoot.childNodes.length; i++) {
			var node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
		          this.className+=" over";
			    }
				node.onmouseout=function() {
		          this.className=this.className.replace(" over", "");
			    }
			  var largeur = node.offsetWidth;
			  var sousnode = node.getElementsByTagName("UL");
			  if (sousnode[0] != null) {
		  		sousnode[0].style.width = largeur-2;
				sousnode[0].onmouseover=function() {
		          this.parentNode.className+="actif";
			    }
				sousnode[0].onmouseout=function() {
			      this.parentNode.className=this.parentNode.className.replace("actif", "");
			    }
		      }
			}
		}
	}
}
function diplome(){

	var lis, liSousMenus, dom, domaines;
	domaines= new Array('LLA','SHS','STS');
	
	
	for(var k=0;k<domaines.length;k++){
	dom = document.getElementById(domaines[k]);
	if(dom){
		//menus = document.getElementsByTagName("ul");
	
	lmd=dom.getElementsByTagName("ul");
	//lla.style.display="none";
			if(lmd.length > 0 ){
				
				for(var j=0; j<lmd.length; j++){
					
				//if(lmd[j].className.match(classeMenuDeroulant)){
						lmd = lmd[j];
						lis = lmd.getElementsByTagName("li");

						for(var i=0; i<lis.length; i++){
							liSousMenus = lis[i].getElementsByTagName("ul");
						
	if(liSousMenus.length > 0){	
	

								// a un sous-menu
								addEvent(lis[i],"mouseover", montrePremierSousMenu);
								addEvent(lis[i],"focus", montrePremierSousMenu);
								addEvent(lis[i],"mouseout", cachePremierSousMenu);	
								addEvent(lis[i],"blur", cachePremierSousMenu);	
							}
						}
					//} 
				}
			}
		}
	}
}
