/* Fonction qui gère le menu - Eric Ferrante*/
expandable = function() {
	if (document.all && document.getElementById) {	
		navRoot = document.getElementById("menu");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+="over"; 
				}
				node.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}
			}
		}
	}
}

function startList() {
  if (navigator.appName != "Microsoft Internet Explorer") {
	navRoot = document.getElementById("niveau0");
	for (i=0; i<navRoot.childNodes.length; i++) {
	  var node = navRoot.childNodes[i];
	  if (node.nodeName=="LI") {
		var sousnode = node.getElementsByTagName("UL");
		if (sousnode[0] != null) {
			sousnode[0].onmouseover=function() {
		      this.parentNode.className+="actif";
			}
			sousnode[0].onmouseout=function() {
			  this.parentNode.className=this.parentNode.className.replace("actif", "");
			}
		}
	  }
    }
  }
}

function startListIE() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		navRoot = document.getElementById("niveau0");
		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 sousnode = node.getElementsByTagName("UL");
			  if (sousnode[0] != null) {
				sousnode[0].onmouseover=function() {
		          this.parentNode.className+="actif";
			    }
				sousnode[0].onmouseout=function() {
			      this.parentNode.className=this.parentNode.className.replace("actif", "");
			    }
		      }
			}
		}
	}
}

function startList_utm() {
  if (navigator.appName != "Microsoft Internet Explorer") {
	navRoot = document.getElementById("niveau0-utm");
	for (i=0; i<navRoot.childNodes.length; i++) {
	  var node = navRoot.childNodes[i];
	  if (node.nodeName=="LI") {
		var sousnode = node.getElementsByTagName("UL");
		if (sousnode[0] != null) {
			sousnode[0].onmouseover=function() {
		      this.parentNode.className+="actif";
			}
			sousnode[0].onmouseout=function() {
			  this.parentNode.className=this.parentNode.className.replace("actif", "");
			}
		}
	  }
    }
  }
}

function startListIE_utm() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		navRoot = document.getElementById("niveau0-utm");
		navLogo = document.getElementById("logo");
		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 sousnode = node.getElementsByTagName("UL");
			  if (sousnode[0] != null) {
				sousnode[0].onmouseover=function() {
		          this.parentNode.className+="actif";
			    }
				sousnode[0].onmouseout=function() {
			      this.parentNode.className=this.parentNode.className.replace("actif", "");
			    }
		      }
			}
		}
		for (i=0; i<navLogo.childNodes.length; i++) {
			var nodeL = navLogo.childNodes[i];
			if (nodeL.nodeName=="LI") {
				nodeL.onmouseover=function() {
		          this.className+=" over";
			    }
				nodeL.onmouseout=function() {
		          this.className=this.className.replace(" over", "");
			    }
			}
		}
	}
}

/* Fonction qui gère les accès directs */
accessTo = function(form){
	/* AJOUT serge : le 06/07/2006
		form correspond à l'objet combobox. Toutes les combos de l'accès direct sont
		gérées par cette méthode.
		algo : 
			l'élément 0 de la combo contient comme value # car non sélectable
			les autres contiennent l'URL de la page à impacter
			SI value est différente de #
			ALORS on change de page en retournant true
			SINON on retourne false
	*/ 
	if(form.options[form.selectedIndex].value != "#") {
		document.location = form.options[form.selectedIndex].value;
		return true;
	}
	return false;
}


/* Fonction pour l'affichage mac - Eric Ferrante - 21/03/07 */
function menu_mac() {
	if (navigator.appVersion.indexOf("Mac",0)>0) {
	  navRootMac = document.getElementById("niveau0");
	  for (i=0; i<navRootMac.childNodes.length; i++) {
	    var nodeMac = navRootMac.childNodes[i];
	    if (nodeMac.nodeName=="LI") {
		  var sousnodeMac = nodeMac.getElementsByTagName("A");
		    if (sousnodeMac[0] != null) {
		      sousnodeMac[0].style.paddingLeft = "10px";
		      sousnodeMac[0].style.paddingRight = "10px";
		      sousnodeMac[0].style.fontWeight = "normal";
			}
	    }
	  }
	}
}

