/******************************************* Fonctions lancées au chargement *******************************************/
function initPrimary() {
   if (arguments.callee.done) return;
   arguments.callee.done = true;
   if (_timer) {
      clearInterval(_timer);
      _timer = null;
   }
  // Liste des fonctions à exécuter
  // hide();
}

function hide(){
    var sMenu = document.getElementsByTagName('UL');
    for (var i=0; i<sMenu.length; i++){
        if(sMenu[i].className == "affiche")
            sMenu[i].className = "nonAffiche";
    }
}

function menu(id){
    hide();
    var sMenu = document.getElementById(id);
    sMenu.className = 'affiche';
}

/******************************************* Préchargement *******************************************/
if (document.addEventListener) {
   document.addEventListener("DOMContentLoaded", initPrimary, false);
}
/*@cc_on @*/
/*@if (@_win32)
   document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
   var script = document.getElementById("__ie_onload");
   script.onreadystatechange = function() {
      if (this.readyState == "complete") {
         initPrimary();
      }
   };
/*@end @*/
 
if (/WebKit/i.test(navigator.userAgent)) {
   var _timer = setInterval(function() {
      if (/loaded|complete/.test(document.readyState)) {
         initPrimary();
      }
   }, 10);
}
 
window.onload = function () {
  initPrimary();
};