var urlWidgetIngenie = "www.laclusaz.com";var jQueryIngenie; var initialiseIngenie = false; var initialiseEnCoursIngenie = false; var tabWidgetIngenie = new Array; var nbWidgetIngenie = 0; function initializeWidgetIngenie(nom,param){ //Parametre optionnel if( typeof(param) == 'undefined' ){ param = ''; } tmpWidget = new Array; tmpWidget["nomWidgetIngenie"] = nom; tmpWidget["urlWidgetIngenie"] = urlWidgetIngenie ; tmpWidget["paramWidgetIngenie"] = param; tabWidgetIngenie[nbWidgetIngenie] = tmpWidget; nbWidgetIngenie++; //Si l'on a pas encore initialiser de widget dans la page if(!initialiseIngenie){ if(!initialiseEnCoursIngenie){ initialiseEnCoursIngenie = true; /******** Load jQuery if not present *********/ if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.9.0') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"); if (script_tag.readyState) { script_tag.onreadystatechange = function () { // For old versions of IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandlerWidgetIngenieFirst(); } }; } else { script_tag.onload = scriptLoadHandlerWidgetIngenieFirst; } // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jQueryIngenie = window.jQuery; mainWidgetIngenie(nom,urlWidgetIngenie ,param); } } } else{ mainWidgetIngenie(nom,urlWidgetIngenie,param); } } /******** Appelle une fois que jQuery est chargé ******/ /******** On lance le tableau de Widget qui attendait d'être lancé ******/ function scriptLoadHandlerWidgetIngenieFirst(){ //JQUERRY UI var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"); if (script_tag.readyState) { script_tag.onreadystatechange = function () { // For old versions of IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandlerWidgetIngenie(); } }; } else { script_tag.onload = scriptLoadHandlerWidgetIngenie; } // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } /******** Appelle une fois que jQuery & jQueryUI est chargé ******/ /******** On lance le tableau de Widget qui attendait d'être lancé ******/ function scriptLoadHandlerWidgetIngenie(){ // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable jQueryIngenie = window.jQuery.noConflict(true); initialiseIngenie=true; for(var i=0;i