/**
 * Exécution de fonctions Javascript après chargement de l'arbre DOM
 *
 * @author     Eric Giovannetti <eric@bleuroy.com>
 * @copyright   BleuRoy.com
 * @version    1.0.0
 */
function LOADER_JustDoIt() {
   if (arguments.callee.done) return;
   arguments.callee.done = true;
   if (_timer) {
      clearInterval(_timer);
      _timer = null;
   }
   // Liste des fonctions à exécuter
    MENU_Gestion("horizontal");
    ROLLOVER_Gestion();
    if(document.getElementById('elementFaq')) { FAQ_Gestion(); }
    if(document.getElementById('iframe') && !document.getElementById('flashAccueil')) { createIframe(); }
    if(document.getElementById('flashAccueil')) { createFlashAccueil(); }
}

// Loader Gecko
if (document.addEventListener) {
   document.addEventListener("DOMContentLoaded", LOADER_JustDoIt, false);
}

// Loader Paladin
/*@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") {
         LOADER_JustDoIt();
      }
   };
/*@end @*/
 
// Loader WebKit
if (/WebKit/i.test(navigator.userAgent)) {
   var _timer = setInterval(function() {
      if (/loaded|complete/.test(document.readyState)) {
         LOADER_JustDoIt();
      }
   }, 10);
}
 
// Loader Obsolète
window.onload = function () {
  LOADER_JustDoIt();
};
