Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 16578)
+++ /extensions/Autosize/autosize.inc.php	(revision 16579)
@@ -137,5 +137,5 @@
 			if (typeof (save_framework) == 'function')
 			   save_framework('".$ma_page."');  
-         var cookie_path   ='". cookie_path() ."' 
+       var cookie_path   ='". cookie_path() ."' 
 			</script>";
           
Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css	(revision 16578)
+++ /extensions/Autosize/css/autosize.css	(revision 16579)
@@ -54,9 +54,10 @@
 
 #theImage { 
- /* margin: 10px;
+  /*margin: 10px;
  border: 10px solid #f0FFf0;
   padding: 10px;
  
-  background-color: #00FF00; */
+  background-color: #00FF00;  
+  */
 }
 #theMainImage {
@@ -69,5 +70,5 @@
 }
 
-#imageInfos {
+#imageInfos, #imageInfoBar {
 /* margin : 20px;
   border: 20px solid #FFf0f0;
@@ -76,2 +77,4 @@
   background-color: #FF0000; */
 }
+
+#theImageAndTitle {  z-index: 4; }
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 16578)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 16579)
@@ -1,1818 +1,1489 @@
-Parent = "#theImage";
+
 // problème avec GMaps+diaporama:
-// corriger   gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow'])) 
-  function Toggle_bp() {
-    cl_visible = !cl_visible;  
-    jQuery().newResize();
-    Wait_Affichage();
-    set_cl();
-  }
-  function set_cl(){
-  if (typeof cl_visible == "undefined") return;
-  if (typeof src1 == "undefined") return;
-
-    if (cl_visible) src = src1;
-    else src = src2;
-
-    if (cl_visible) {
-      src_info = src3;
-      src_infos_1 = src3;
+// corriger   gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow']))
+//==============================================================
+(function (jQuery) {
+  jQuery(document).ready(function () {
+    //===================
+    // VARIABLES  
+    //===================
+    var theMainImage_obj = "#theMainImage";
+
+    type_src = "div";
+    old_window = { width: 0, height: 0 };
+    List_autosize = new Array();
+    nu_img = 0;
+    tempo = 0;
+    //====================================================
+
+    var infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();  // Cadre general
+    var infos_theImage = jQuery("#theImage").infos();                  // Container
+    var infos_theMainImage = jQuery(theMainImage_obj).infos();          // Image 
+    var infos_imageInfos = jQuery("#imageInfos").infos();              // Informations
+
+
+    var infos_the_page = jQuery("#the_page").infos();
+    var infos_content = jQuery("#content").infos();
+    var infos_titrePage = jQuery("#titrePage").infos();
+    var infos_imageInfoBar = jQuery("#imageInfoBar").infos();
+    var infos_theHeader = jQuery("#theHeader").infos();
+    var infos_imageToolBar = jQuery("#imageToolBar").infos();
+    var infos_body = jQuery("body").infos();
+    var infos_llgbo = jQuery("#llgbo").infos();
+    var infos_llgboh2 = jQuery("#llgboh2").infos();
+    if (typeof (options) == "undefined") {
+      options = { imageAutosize: false }
     }
-    else {
-      src_info = src4;
-      src_infos_1 = src5;
+
+    // jQuery(':Autosize');
+    old_window = { width: 0, height: 0 };
+
+    if (typeof (options) == "undefined") {
+      options = { imageAutosize: false }
     }
-    zoom = jQuery('#zoom ').val() ;
-    jQuery('#bp_cla').attr('alt', src_info);
-    jQuery('#bp_cla').attr('title', src_info);
-
-    jQuery('#bp_cla').attr('Stitle', src_info);
-    jQuery('#bp_cla').attr('Stip', zoom + "%");
-
-  //jQuery('#bp_cla span').text(src_infos_1 +"    "+ zoom + "%");
-    jQuery('#bp_cla span').text(zoom+"%" );
-    bp_scr = jQuery('#bp_img_cla');
-
-    if (bp_scr.length > 0) {
-        bp_scr.get(0).src = src;
-        jQuery('#bp_img_cla').attr('alt', src_info);
-        jQuery('#bp_img_cla').attr('title', src_info);   
+
+    var defaults = {
+      id_map: 'autosize',
+      imageAutosizeMargin: 0,
+      imageAutosize: false
+    };
+    options = jQuery.extend(defaults, options);
+
+    //=============================================================
+    // REPONSE ACTION
+    //=============================================================
+    jQuery("#reset").click(function () {
+      location.reload();
+    });
+
+    //===========================================================
+    //  REPONSE TRIGGER 
+    //===========================================================
+    jQuery('#pamoorama').live('ON', function (e) {
+      jQuery(jQuery('.debug').get(1)).trigger('ON');
+      if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) {
+        Bandeau_bas = infos_Description_f("#theImage");
+        Bandeau = Bandeau_bas.top;
+      }
+    });
+    //=============================================================
+    jQuery('#ret_autosize').live('ON', function (e) {
+      if (nu_img == "") nu_img = 8;
+      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+
+    });
+
+    //==================================
+    // jQuery("#llgbo").trigger("ON");
+    //==================================
+    jQuery("#llgbo").live('ON', function (e) {
+      infos_llgbo = jQuery("#llgbo").infos();
+      //llgboframe 
+      marges_llgbo = 0;
+
+      if (infos_llgbo.height > 0) {
+        ll2 = jQuery("#llgbo div:last").infos();
+        ll1 = jQuery("#llgbo div:first").infos();
+        ll2 = "";
+        jQuery("#llgbo div").each(function (i) {
+          if (this.id == "") return;
+          var llgbo_frame = document.getElementById(this.id);
+          this.removeAttribute("width");
+          this.removeAttribute("height");
+          ll2 = this;
+        });
+
+        ll2 = jQuery(ll2).infos();
+        ll1 = ll1.width;
+        ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right;
+        marges_llgbo = (ll1 - ll2);
+        infos_llgbo.borderwidth.left = parseInt(marges_llgbo / 2);
+        infos_llgbo.borderwidth.right = parseInt(marges_llgbo / 2);
+        infos_llgbo.borderwidth.top = parseInt(marges_llgbo / 2);
+        infos_llgbo.borderwidth.bottom = parseInt(marges_llgbo / 2);
+        infos_llgboh2 = jQuery("#llgboh2").infos();
+      }
+    });
+    //==============================
+    // jQuery("#mapPicture").trigger("ON");
+    //==============================
+    jQuery("#mapPicture").live('ON', function (e) {
+      p2 = jQuery("#infoSwitcher").infos();
+    });
+    //==============================
+    // jQuery("#map").trigger("ON");
+    //==============================
+    jQuery("#map").live('ON', function (e) {
+
+    });
+
+    //===================================
+    // jQuery("#theImage").trigger("ON");
+    //===================================
+    jQuery("#theImage").live('ON', function (e) {
+      theImage_init("#theImage");
+    });
+
+    /***********************
+    *
+    **********************/
+    jQuery("#theMainImage").error(function (e) {
+      alert(this.src + ' Image does not exist !!');
+    });
+
+    jQuery("#theMainImage,.preload, .next1 , ").load(function (e) {
+      theImg = this;
+      name_src = theImg.src;
+      if (theImg.naturalWidth)
+        img_init.width = theImg.naturalWidth;
+      if (theImg.naturalHeight)
+        img_init.height = theImg.naturalHeight;
+
+      theMainImage_obj = "#theMainImage";
+
+      nds = jQuery("#imageInfos").css("display"); //inline-block 
+      Zone_image = Calcul_Image(nds == "none");
+
+
+      jQuery(theMainImage_obj).width(Zone_image.image.width);
+
+
+
+    });
+
+    //=================================================================
+    jQuery(document).live('gallyInterfaceReady', function (e) {
+      i = jQuery(this).text();
+      jQuery(this).trigger('ON');
     }
 
-   
-
-}
-
-function Wait_pamoorama() {
-    if (jQuery("#pamoorama").length) {
+          );
+    // jQuery("#theImage").trigger("OK");
+    jQuery("#theImage").live('Start_right', function (e) {
+      if (nu_img == "") nu_img = 7;
+      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+      test_w = window.myPamoorama.autoSlideFx.to;
+      test_w = window.myPamoorama.autoScrollFx.to;
+    });
+
+    jQuery("#theImage").live('Start_left', function (e) {
+      if (nu_img == "") nu_img = 7;
+      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+      test_w = window.myPamoorama.autoSlideFx.to;
+      test_w = window.myPamoorama.autoScrollFx.to;
+
+    });
+
+    // Custom Event, ON to turn on a debug.
+    jQuery('.debug').live('ON', function (e) {
+
+      nu_img = jQuery(this).text();
+      jQuery('.debug').trigger('OFF');
+      jQuery(this).addClass('debugOn');
+
+    });
+
+    // On Click = debugs On
+    jQuery('.debug').live('click', function (e) {
+      i = jQuery(this).text();
+      jQuery(this).trigger('ON');
+    });
+
+    // Custom Event, Turn off a debug
+    jQuery('.debug').live('OFF', function (e) {
+      jQuery(this).removeClass('debugOn');
+    });
+
+    // on Double Click, remove the debug from the DOM
+    jQuery('.debug').live('dblclick', function () {
+      jQuery(this).fadeOut(function () { jQuery(this).remove() });
+    });
+
+    // Add another debug to the DOM
+    jQuery('#adddebugs').click(function () {
+      i = jQuery('.debug').length;
+      jQuery('<div>' + i + '</div>')
+          .addClass('debug')
+          .appendTo('#debugsContainer');
+    });
+
+
+
+    //=====================================================================
+    // jQuery("#theImageAndInfos").trigger("ON");
+    jQuery("#theImageAndInfos").live('ON', function (e) {
+      infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
+
+
+    }); // fin click #theImageAndInfos ON
+    //=====================================================================
+    jQuery("#infoSwitcher").click(function () {
+      jQuery("#llgbo").trigger("ON");
+      jQuery("#theImage").css({ textAlign: "center" });
+
+      Autosize_resize(true);
+
+    }); // fin click infoSwitcher
+    //====================================================
+
+    //piwigo 2.4
+    // Add another debug to the DOM 
+    jQuery('#derivativeCheckedAutosize').click(function () {
+      pathnames = jQuery(this).attr("href").split(":");
+      try {
+        eval(pathnames[1]);
+      } catch (e) {
+        n = false;
+      }
+    }); // fin click derivativeCheckedAutosize
+    //====================================================
+    jQuery("#derivativeSwitchBox a").click(function () {
+      var theImg = document.getElementById("theMainImage");
+      if (theImg) {
+        pathnames = jQuery(this).attr("href").split(":");
+
+        try {
+          eval(pathnames[1]);
+          n = true;
+        } catch (e) {
+          n = false;
+        }
+        n = false;
+        infos_theMainImage = jQuery(theMainImage_obj).infos();
+        infos_theImage = jQuery("#theImage").infos();
+        theImg.removeAttribute("width");
+        theImg.removeAttribute("height");
+        rapport = parseInt(img_init.width) / parseInt(img_init.height);
+        if (n == true) {
+          Autosize_resize(true);
+        } else {
+          var nw = "100% x 100%".split("x");
+          if (jQuery(this).text().match(RegExp("x", "gi"))) {
+            nw = jQuery(this).text().split("(")[1].split(")")[0];
+            nw = nw.split("x");
+            jQuery("#theImage").css({ marginRight: "auto", marginLeft: "auto", textAlign: "center" });
+
+            if (theImg.naturalWidth)
+              img_init.width = theImg.naturalWidth;
+            if (theImg.naturalHeight)
+              img_init.height = theImg.naturalHeight;
+
+            wx = parseInt(nw[0]);
+            //wh = parseInt(wx / rapport);
+            //jQuery("#theImage").css("height", wh + "px");
+            jQuery(theImg).width(wx);
+            // jQuery(theImg).height(wh);
+          }
+        }
+      }
+
+    });  // fin click #derivativeSwitchBox a
+    //==========================================================
+    //=========================================================================
+    Autosize_init = function (name, value) {
+      // default configuration properties
+      var defaults = {
+        id_map: 'autosize'
+      };
+      options = jQuery.extend(defaults, options);
+
+      jQuery("#the_page").css({ top: "0px" });
+
+      infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); // Cadre general
+      infos_theImage = jQuery("#theImage").infos();
+
+      infos_theMainImage = jQuery(theMainImage_obj).infos();         // Cadre general
+      if (infos_theMainImage.nodeName) {
+
+      }
+      if (infos_theMainImage.width == 0) {
+        infos_theMainImage = jQuery("#theImage img").infos();
+        if (infos_theMainImage.id == "")
+          jQuery("#theImage img").attr("id", "theMainImage");
+        infos_theMainImage = jQuery(theMainImage_obj).infos();
+      }
+      infos_imageInfos = jQuery("#imageInfos").infos();             // Cadre general
+      infos_the_page = jQuery("#the_page").infos();
+      infos_content = jQuery("#content").infos();
+      infos_titrePage = jQuery("#titrePage").infos();
+      infos_imageInfoBar = jQuery("#imageInfoBar").infos();
+      infos_theHeader = jQuery("#theHeader").infos();
+      infos_imageToolBar = jQuery("#imageToolBar").infos();
+      infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
+      Zone_Affichage = jQuery("#theImage").infos();
+
+      jQuery.cl_cookie('path', cookie_path, { path: cookie_path });
+      typeMap = jQuery.cl_cookie('picture_map');
+      typeSave = jQuery.cl_cookie('picture_deriv');
+      old_img = jQuery.cl_cookie('img');
+      old_img_h = jQuery.cl_cookie('img_h');
+      old_img_w = jQuery.cl_cookie('img_w');
+      old_window_height = jQuery.cl_cookie('window_height');
+      old_window_width = jQuery.cl_cookie('window_width');
+      //============================================================
+      img_init = { height: img_height, width: img_width };  // taille initiale
+      img_defaut = { height: scaled_height, width: scaled_width };
+      img_reelle = { height: img_height, width: img_width };
+      img_finale = { height: 0, width: 0 };
+      img_top = "0";
+      rapport = -1;
+      marges_llgbo = 0;
+      //=============================================================
+      Type_Img = "";
+      nopano = false;
+      rapport = parseInt(img_init.width) / parseInt(img_init.height);
+      old_window = { width: 0, height: 0 };
+    } // Autosize_init
+    //===========================================================================
+    Autosize_resize = function (force, parametres) {
+
+      if (force && force == true) old_window.width = 0;
+      id_map = jQuery(theMainImage_obj).attr("usemap");
+      if (typeof id_map == "undefined") id_map = jQuery("#theImage").attr("usemap");
+      if (typeof id_map == "undefined") id_map = "Autosize";
+      if (options.id_map) {
+        //  id_map = options.id_map;
+      }
+      if (id_map) {
+        if (id_map.match(RegExp("#map", "gi")) || id_map.match(RegExp("original", "gi"))) {
+          return true;
+        }
+      }
+
+      if (options.imageAutosize) {
+        // Wait_Affichage();
+        return true; //stripped
+      }
+
+      if (typeof cl_visible == "undefined") return true;
+      if (!cl_visible == true) { return true; }
+      var chk = eval(user_status + "_enabled");
+      if (chk == "") { return true; }
+      //================================================================= 
+      var winwidth = jQuery(window).width();
+      var winheight = jQuery(window).height();
+      nds = jQuery("#imageInfos").css("display"); //inline-block //block simple
+      Zone_image = Calcul_Image(nds == "none");
+      //=============================================================
+      if (Type_Img == "pamoorama") {
+        if (theMainImage_obj == "#pamoorama") {
+          Set_Pamoorama();
+        }
+      }
+      if (Type_Img == "map") {
+
+        Set_Map();
+
+      }
+
+      //=================================================================
+      set_cl();
+      jQuery("#theImage").width(Zone_image.container.width);
+      jQuery("#theImage").height(Zone_image.container.height);
+      n = winwidth - old_window.width;
+      if (Math.abs(n) < 1) {
+        n = winheight - old_window.height;
+        if (Math.abs(n) < 1) {
+          return false;
+        }
+      }
+
+      if (Math.abs(n) > 30) nu_img = 0;
+      nu_img++;
+      if (nu_img > 10) return true;
+
+      old_window = jQuery(window).infos();
+      //========= Récupération des informations =============       
+
+
+      var Licence = jQuery(".licencetag");
+      infos_Licence = jQuery(".licencetag").infos();
+
+
+      //=================================================================
+
+      switch (Type_Img) {
+        case "map":
+
+          Set_Map(true);
+
+          ;
+
+          break
+        case "panorama":
+          if (!theMainImage_obj) {
+            theMainImage_obj = "#theMainImage";
+            if (theMainImage_obj.length > 0)
+              return;
+            theMainImage_obj = jQuery().Get_Img_Maxi("#Panorama img[alt]");
+
+            if (theMainImage_obj.length > 0)
+              theMainImage_obj = theMainImage_obj[0];
+            else
+              theMainImage_obj = jQuery().Get_Img_Maxi("#Panorama img[alt]");
+          }
+          infos_theImage = jQuery(theMainImage_obj).infos();
+          infos_the_page = jQuery("#the_page").infos();
+          jQuery("#theImage").height(infos_theImage.height);
+          img_finale.height = infos_theImage.height;
+
+          break
+        case "img":
+
+          if (!theMainImage_obj) return true;
+          if (theme.match(RegExp("luciano", "g"))) {
+            theMainImage_obj = "#the_page #The_MainImage";
+          }
+
+          infos_the_page = jQuery("#the_page").infos();
+
+
+          break
+        case "img_autre":
+          if (!theMainImage_obj) {
+            if (DEBUG_autosize == "true") alert("The_MainImage=null");
+            return true;
+
+          }
+          infos_theImage = jQuery(theMainImage_obj).infos();
+          infos_the_page = jQuery("#the_page").infos();
+
+
+          break
+        case "embed":
+          //
+          if (infos_img.width == 0)
+            infos_img = jQuery("#thePicturePage").infos();
+          if (infos_img.width == 0)
+            infos_img = jQuery("#the_page").infos();
+          infos_theImage = infos_img;
+          infos_the_page = jQuery("#the_page").infos();
+          Bandeau_bas.height = Bandeau_bas.top;
+
+          iph1 = jQuery("#theImage div").infos();
+          if ((winheight - iph1.bottom) > 0)
+            Bandeau_bas.height = (winheight - iph1.bottom) + 50;
+          else
+            Bandeau_bas.height = 50;
+
+
+          if (rapport < 0) {
+            img_height = infos_img.height;
+            img_width = infos_img.width;
+            img_reelle.height = img_height;
+            img_reelle.width = img_width;
+          }
+
+          break
+        case "charlie":
+          infos_theImage = infos_img;
+          infos_the_page = jQuery("#the_page").infos();
+          if (rapport < 0) {
+            img_height = parseInt(infos_img.height);
+            img_width = parseInt(infos_img.width);
+            img_reelle.height = parseInt(infos_img.height);
+            img_reelle.width = parseInt(infos_img.width);
+          }
+          break
+
+
+        case "pamoorama":
+          img_reelle = { height: img_height, width: img_width };
+          //=========================================================
+          img_reelle.height = img_height;
+          img_reelle.width = Zone_Affichage.width;
+          if (myPamoorama) theMainImage_obj = myPamoorama.image;
+          infos_theImage = jQuery("#pamoorama").infos();
+          infos_theImage.height = infos_theImage.height;
+          infos_the_page = jQuery("#the_page").infos();
+          break
+      }
+      //================= Vérification Taille image minimun autorisée ========
+      MinWidth = jQuery(theMainImage_obj).css("minWidth");
+      if (MinWidth == "0px")
+        MinWidth = mini_width;
+      MinHeight = jQuery(theMainImage_obj).css("minHeight");
+      if (MinHeight == "0px")
+        MinHeight = mini_height;
+
+      MaxWidth = jQuery(theMainImage_obj).css("maxWidth");
+      if (MaxWidth == "0px")
+        MaxWidth = winwidth;
+      MaxHeight = jQuery(theMainImage_obj).css("maxHeight");
+      if (MaxHeight == "0px")
+        MaxHeight = mwinheight;
+
+      //=============== Vérification taille minimale  autorizée ======================
+      var miniWidth = jQuery(theMainImage_obj).Get_Val_int(MinWidth, mini_width);
+      var miniHeight = jQuery(theMainImage_obj).Get_Val_int(MinHeight, mini_height);
+      if (winwidth < mini_width2) mini_width2 = winwidth;
+
+      var miniWidth2 = jQuery(theMainImage_obj).Get_Val_int(MinWidth, mini_width2);
+      var miniHeight2 = jQuery(theMainImage_obj).Get_Val_int(MinHeight, mini_height2);
+
+
+      var maxWidth = jQuery(theMainImage_obj).Get_Val_int(MaxWidth, winwidth, "0");
+      maxHeight = jQuery(theMainImage_obj).Get_Val_int(MaxHeight, winheight, "0");
+
+      mini_width = parseInt(miniWidth);
+      mini_height = parseInt(miniHeight);
+      img_reelle.width = parseInt(img_reelle.width);
+      if (img_reelle.width < mini_width)
+        return true;
+      img_reelle.height = parseInt(img_reelle.height);
+      if (img_reelle.height < parseInt(mini_height))
+        return true;
+      //======================================================================
+      set_cl();
+      Set_Pamoorama();
+
+
+
+      //=============== Zone d'affichage ============================  
+      Zone_Affichage.width = Zone_image.container.width;
+      Zone_Affichage.height = Zone_image.container.height;
+
+      var Licence = jQuery(".licencetag");
+      infos_Licence = jQuery(".licencetag").infos();
+
+      //====================================================
+      if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin;
+      else Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
+      //==========================================================================
+
+
+
+      //=================================================
+      if (Zone_Affichage.height < mini_height2)
+        Zone_Affichage.height = mini_height2;
+      if (Zone_Affichage.width < mini_width2)
+        Zone_Affichage.width = mini_width2;
+      //=================================================
+
+
+
+      //=============================================================
+      var height_user = eval(user_status + "_height");
+      var width_user = eval(user_status + "_width");
+      var reg1 = new RegExp("%", "g");
+      if (height_user.match(reg1))
+        Image_height = img_reelle.height * parseInt(height_user) / 100;
+      else
+        Image_height = parseInt(height_user);
+      echelle_max = parseFloat(echelle_max, '3');
+      var echelle = parseFloat(Image_height / img_reelle.height, 3);
+
+      if (echelle > echelle_max) { echelle = echelle_max; }
+
+      Image_height = parseInt(img_reelle.height * echelle);
+
+      var widthmin = winwidth;
+
+      if (check_auto_w == 'checked="checked"') {
+
+        //==== largeur à atteindre ===
+        var width_user = eval(user_status + "_width");
+        // Largeur maximale en fonction du statut
+        if (width_user.match(reg1))
+        // pourcentage
+          Image_width = widthmin * parseInt(width_user) / 100;
+        else
+          Image_width = parseInt(width_user);
+
+      }
+      Image_height = parseInt(Image_width / rapport);
+      Image_width = parseInt(Image_height * rapport);
+      //====================================================
+      //  Zone_image.image.height = Image_height;
+      //  Zone_image.image.width = Image_width;
+
+      Set_Pamoorama();
+      set_cl();
+      jQuery(theMainImage_obj).height(Zone_image.image.height);
+      jQuery("#theImage").width(Zone_image.container.width);
+      jQuery("#theImage").height(Zone_image.container.height);
+
+      return true;
+
+      //===============================================================
+      jQuery("#theImage").width(Zone_Affichage.width);
+      jQuery("#theImage").height(Zone_Affichage.height);
+      jQuery(theMainImage_obj).removeAttr("width");
+      jQuery(theMainImage_obj).css({ height: Image_height }); //image
+
+      //================================================================
+
+      align_auto = "center";
+      if (jQuery("#theImg").css("textAlign"))
+        align_auto = jQuery("#theImg").css("textAlign");
+
+
+      var marges = 0;
+
+      if (typeof (infos_img) != "undefined") {
+        widthmin -= infos_img.borderwidth.left || 0;
+        widthmin -= infos_img.borderwidth.right || 0;
+      }
+      widthmin -= marges;
+      if (typeof Bandeau_t != "undefined") {
+        widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
+        Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
+      } else {
+
+        jQuery.autosize.resize();
+      }
+      if (Image_width > widthmin) {
+        //   Image_width largeur à atteindre
+        //  Calcul du rapport d'agrandissement
+        var echelle_w = parseFloat((widthmin) / img_reelle.width, 3);
+        if (echelle_w > echelle_max) { echelle_w = echelle_max; }
+        Image_width = parseInt(img_reelle.width * echelle_w);
+        if (rapport > 0)
+          Image_height = parseInt(Image_width / rapport);
+      }
+
+
+
+
+      //===================================================
+
+      img_finale.height = Image_height;
+      img_finale.width = Image_width;
+      if (theme.match(RegExp("stripped", "gi"))) {
+        img_finale.width -= (llgboframe.top * 2);
+        if (rapport > 0) img_finale.height = (img_finale.width / rapport);
+        else img_finale.height -= (llgboframe.top * 2);
+
+      }
+      zoom = echelle;
+      if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) {
+        //=============LLGBO2 ===========================
+        t1 = llgboframe;
+        if (!theMainImage_obj.src) {
+          theMainImage_obj = jQuery("#llgbo").find("img").get(0)
+          if (!theMainImage_obj.src) {
+            theMainImage_obj = jQuery("#theImage").find("div").get(0)
+          }
+        }
+        if (theMainImage_obj.src) {
+          wingbo = img_finale.width;
+          heightgbo = img_finale.height;
+          if (Type_Img == "panorama") {
+            heightgbo = infos_theImage.height;
+            img_finale.height = infos_theImage.height;
+          }
+
+          img_finale.width -= marges_llgbo;
+          if (jQuery("#slideshow").infos().width > 0) {
+            img_finale.height -= (marges_llgbo * 1.5);
+          } else {
+            img_finale.height -= marges_llgbo
+          }
+
+
+          if (wingbo > winwidth) {
+            jQuery("#llgbo").width(winwidth);
+            jQuery("#llgbo").height(winheight);
+            jQuery("#llgbo").css("width", winwidth + "px");
+            jQuery("#llgbo").css("height", winheight + "px");
+          }
+          else {
+            jQuery("#llgbo").width(wingbo);
+            jQuery("#llgbo").height(heightgbo);
+            jQuery("#llgbo").css("width", wingbo + "px");
+            jQuery("#llgbo").css("height", heightgbo + "px");
+          }
+
+          a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]");
+          a1 = jQuery("area[rel=prev]");
+          a2 = jQuery("area[rel=next]");
+          a3 = jQuery("area[rel=up]");
+          nb_zone = 3;
+          if (a1.length == 0) {
+            nb_zone -= 1;
+          }
+          if (a2.length == 0) {
+            nb_zone -= 1;
+          }
+
+
+          var Largeur_zone = (img_finale.width / nb_zone);
+          var Hauteur_zone = (img_finale.height);
+          var init_zone = 0;
+
+          if (a1.length > 0) {
+            coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone };
+
+            jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
+            init_zone += Largeur_zone;
+          }
+
+          coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height };
+
+          if (a0.length > 0) {
+            jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" });
+            jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" });
+          } else {
+            jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" });
+          }
+          init_zone += Largeur_zone;
+
+          if (a2.length > 0) {
+            coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height };
+            jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
+          }
+          //    jQuery("#theImage").height(heightgbo + marges_llgbo / 2);
+        }
+      }
+
+      //================ Zone affichage =========================
+
+      //  jQuery("#theImage").css("top", "0px");
+      jQuery("#standard").css("top", 0 + "px");
+      jQuery("#comments").css("top", 0 + "px");
+      //========== Image Remise à l'échelle =======================
+
+      img_finale.height = parseInt(img_finale.height);
+      img_finale.width = parseInt(img_finale.width);
+      //=========================================================================
+      //=== cadre = theImage
+      if (theme.match(RegExp("simple", "gi"))) {
+        jQuery("#theImage").width(Zone_Affichage.width); //centrer simple black
+        jQuery("#theImage").css({ width: Zone_Affichage.width + "px",
+          marginLeft: "auto"
+        });
+
+      } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
+        jQuery("#theImage").css({ width: "auto", marginLeft: "auto" });
+      } else if (theme.match(RegExp("saruka", "gi"))) {
+
+        jQuery("#theImage").css({ width: Zone_Affichage.width + "px" });
+      } else if (theme.match(RegExp("elegant", "gi"))) {
+
+        // jQuery("#theImage").css("width", "auto");
+        jQuery("#theImage").css({ height: Zone_Affichage.height + "px", width: "auto" }); //conteneur
+
+      } else {
+        jQuery("#theImage").css("width", "auto");
+
+      }
+      // ;
+
+      if (Type_Img == "panorama" || Type_Img == "pamoorama") {
+        img_finale.height = infos_theImage.height;
+        Zone_Affichage.height = img_finale.height;
+
+      }
+
+      if (typeof (gmaps) != "undefined") {
+        Gmap_ = gmaps.maps[0];
+        if (Gmap_.sizeMode == 'A') {
+          jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" });
+
+        }
+      }
+      //============= flv,mov,mpg  ok
+      /* wmv nok
+      * avi nok
+      //===========================================
+      */
+      if (Type_Img == "charlie") {
+        t1 = jQuery("#charlie").infos();
+
+        /**/
+
+        pdf = 0;
+        jQuery("#charlie div").each(function (i) {
+
+
+          p1 = jQuery(this).infos();
+          pdf += p1.padding.right + p1.padding.left;
+        });
+        img_finale.width -= pdf;
+
+        jQuery("#charlie").css({
+          width: img_finale.width + pdf + "px",
+          height: img_finale.height + "px",
+          marginLeft: "auto"
+        });
+
+
+        if (MainImage.length > 0) {
+          img_finale.height = parseInt(img_finale.width / rapport);
+          img_finale.height -= 30;
+          img_finale.width = rapport * img_finale.height;
+
+
+          MainImage.width(img_finale.width);
+          MainImage.height(img_finale.height);
+          jQuery("#embedplayer").width(300);
+          jQuery("#embedplayer").height(15);
+        } else {
+          jQuery("#player").css("width", img_finale.width + "px");
+          jQuery("#player").css("height", img_finale.height + "px");
+
+          jQuery("#embedplayer").css("width", img_finale.width + "px");
+          jQuery("#embedplayer").css("height", img_finale.height + "px");
+
+          jQuery("embed").css({ width: img_finale.width + "px",
+            height: img_finale.height + "px"
+          });
+          jQuery("object").css({ width: img_finale.width + "px",
+            height: img_finale.height + "px"
+          });
+          jQuery("video").css({ width: img_finale.width + "px",
+            height: img_finale.height + "px"
+          });
+
+
+
+          jQuery("video").height(img_finale.height);
+          jQuery("video").width(img_finale.width);
+
+          jQuery("object").width(img_finale.width);
+          jQuery("object").height(img_finale.height);
+          //jQuery("#theImage").height(img_finale.height + Bandeau_bas.height); //??             
+
+          jQuery(theMainImage_obj).height(img_finale.height);
+          jQuery("#theImage").css("height", "auto");
+        }
+
+
+      } else if (Type_Img == "embed") {
+
+        if (MainImage.length > 0) {
+          img_finale.height = parseInt(img_finale.width / rapport);
+          img_finale.height -= 30;
+          img_finale.width = rapport * img_finale.height;
+
+
+          MainImage.width(img_finale.width);
+          MainImage.height(img_finale.height);
+          jQuery("#embedplayer").width(300);
+          jQuery("#embedplayer").height(15);
+        } else {
+          jQuery("#theImage").css("height", "auto");
+          jQuery("embed").css("height", img_finale.height);
+          jQuery("object").css({ height: img_finale.height + "px" });
+
+          jQuery("object").width(img_finale.width);
+          jQuery("object").height(img_finale.height);
+        }
+
+      } else if (Type_Img == "panorama") {
+        if (typeof asp_options != "undefined")
+          n = asp_options;
+        n1 = jQuery("#Panorama div").width();
+        jQuery(".panorama-viewport").css("margin", "auto");
+        n = infos_imageToolBar;
+
+
+      } else if (Type_Img == "pamoorama") {
+        Set_Pamoorama();
+
+
+
+
+      } else if (theMainImage_obj != null && theMainImage_obj.src) {
+        //--- background ?? ---
+        jQuery(theMainImage_obj).height(img_finale.height);
+        jQuery(theMainImage_obj).width(img_finale.width);
+        jQuery(theMainImage_obj).css({ height: img_finale.height + "px ",
+          width: img_finale.width + "px "
+        });
+
+
+      } else {
+        //===map ? luciano ===
+        //   jQuery(theMainImage_obj).css({ height: img_finale.height + "px ",  width: img_finale.width + "px });
+        //   jQuery(theMainImage_obj).height(img_finale.height );
+        //   jQuery(theMainImage_obj).width(img_finale.width );
+        //   jQuery(theMainImage_obj).attr({ width: img_finale.width  });
+        h = img_finale.height;
+        h = Zone_Affichage.height - Zone_Affichage.borderwidth.top - Zone_Affichage.borderwidth.bottom;
+        h -= (infos_theImage.borderwidth.bottom + infos_theImage.borderwidth.top);
+
+        jQuery(theMainImage_obj).attr({ height: h - 3 }); //image
+        if (theme.match(RegExp("elegant", "gi"))) {
+          return true;
+
+        }
+        if (theme.match(RegExp("luciano", "g"))) {
+          imgl = 180;
+          l = Zone_Affichage.left;
+
+          jQuery(".imageNumber").css({ left: l + "px"
+
+          });
+          jQuery("#theImage" + " #theImg IMG").css({ height: img_finale.height + "px ",
+            width: (img_finale.width - imgl) + "px ", marginTop: "0px"
+          })
+        }
+
+      }
+
+      var theImg = document.getElementById("theMainImage");
+      if (theImg) {
+        theImg.removeAttribute("width");
+        theImg.removeAttribute("height");
+        jQuery(theMainImage_obj).css("width", img_finale.width + "px");
+      }
+
+      jQuery("#navThumbPrev").css({ overflow: "hidden" });
+      jQuery("#navThumbNext").css({ overflow: "hidden" });
+      n = typeof inittoolbar;
+      if (Type_Img == "map") {
+        jQuery("#navThumbNext").css({ display: 'none' });
+        jQuery("#navThumbPrev").css({ display: 'none' });
+        jQuery("#theImage").css({ marginTop: infos_imageToolBar.height + "px", marginLeft: "0px",
+          width: winwidth + "px",
+          height: winheight + "px"
+        });
+        //mapPicture 
+      }
+      try {
+        if (theme.match(RegExp("gally", "gi"))) {
+          if (typeof inittoolbar == "function") {
+            if (typeof (currentTab) == "undefined") inittoolbar();
+            else initializeImageMode("resize");
+          } else {
+            tp = gallyPP.getImageProp();
+            if (typeof (GallyPP) == "function")
+              gallyPP = new GallyPP();
+
+            iph = jQuery("#imageHeaderBar").infos();
+            jQuery("#imageToolBar").css({ top: iph.bottom + "px", position: "absolute" });
+            jQuery("#theImage").width(winwidth);
+          }
+          //===========================================================================
+          if (jQuery("#navThumbPrev").length > 0) {
+            jQuery("#navThumbPrevContainer").css({ left: "0px"
+            });
+          }
+          if (jQuery("#navThumbNext").length > 0) {
+            jQuery("#navThumbNextContainer").css({ left: "0px"
+            });
+          }
+          //=============================================================================
+          if (!theme.match(RegExp("lapis", "gi"))) {
+            if (typeof initializeImageMode == "function") {
+              initializeImageMode("resize");
+            }
+
+          }
+
+        } else if (theme.match(RegExp("simple", "g"))) {
+
+          jQuery("#imageToolBar").css({ position: "static" });
+
+          infos_imageInfoBar = jQuery("#imageInfoBar").infos();
+          if (infos_imageInfoBar.bottom < infos_img.bottom) {
+            //   jQuery("#imageInfoBar").height(infos_img.bottom);
+          }
+
+        } else {
+
+          //    jQuery("#imageToolBar").css("position", "static");
+        }
+      } catch (e) {
+
+      }
+      zoom = img_finale.height / img_height;
+      h0 = jQuery("#content").height();
+      if (h0 == null) {
+        h0 = winheight - Zone_Affichage.top;
+      }
+      h1 = (h0 - img_finale.height) / 2;
+      //  jQuery("#theImage").css({ marginTop: h1 + "px" });
+
+      zoom = parseInt(zoom * 100);
+      jQuery('#zoom ').val(zoom);
+      set_cl();
+
+
+      //  --- réglage de la hauteur de page en fonction du copyright-----------
+      if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos();
+
+      if (theme.match(RegExp("stripped", "gi"))) {
+        var TitleBox = jQuery("#imageTitleContainer");
+        if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px");
+      } else {
+
+      }
+
+
+      /*
+      if (!theme.match(RegExp("luciano", "gi"))) {
+      jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" });
+      jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" });
+      jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
+      }
+      */
+      infos_frame = jQuery("#theImage").infos();
+      if (theme.match(RegExp("stripped", "gi"))) {
+        /*
+        infos_theImageBox = jQuery("#theImageAndTitle").infos();
+        p1 = jQuery(".randomButtons").infos();
+        p2 = jQuery("#imageHeaderBar").infos();
+        p3 = infos_content.top;
+        p1 = options.imageAutosizeTitle;
+
+        jQuery("#theImage").width("width", infos_theImageBox.width + "px");
+        //jQuery("#theImageAndTitle").css("position", "relative");
+        jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px",
+        paddingTop: "0px", textAalign: "center", marginLeft: "auto"
+        });
+
+        jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px",
+        paddingTop: "0px", marginLeft: "auto"
+        }); */
+        t1 = infos_theImageBox.top;
+        l1 = infos_theImageBox.left;
+        // infos_theImageBox = jQuery("#theImage").infos();
+
+      } else {
+
+        t1 = infos_frame.top;
+        l1 = infos_frame.left;
+        infos_theImageBox = jQuery("#theImage").infos(); //theImage
+      }
+      infos_theImageBox.margin.margin = infos_frame.margin.margin;
+      infos_theImageBox.top = t1;
+      infos_theImageBox.left = l1;
+      //  infos_theImageBox.position = "absolute";
+
+      Window_Affichage = infos_theImageBox;
+      if (DEBUG_autosize == "_true") {
+        //   jQuery("#theImage").css("border", "solid green");
+
+        jQuery("#Debug5").css({ background: "red",
+          position: "absolute",
+          border: "green solid 2px",
+          textAlign: align_auto,
+          margin: "auto",
+          top: Window_Affichage.top + "px",
+          left: Window_Affichage.left + "px",
+          width: Window_Affichage.width + "px",
+          height: Window_Affichage.height + "px"
+        }); //red
+        jQuery("#Debug4").css({ top: infos_frame.bottom - infos_description.height + "px" }); //green
+      }
+
+      //Wait_Affichage();
+
+      return true;
+      //_____________________________________________________   
+    }; // Autosize 
+
+
+
+    /********************************************
+    *  window unLOAD
+    ********************************************/
+    jQuery(window).unload(function () {
+      try {
+        if (typeof theMainImage_obj != "undefined") {
+          var theImg = document.getElementById("theMainImage");
+          jQuery.cl_cookie('img', theImg.src, cookie_path); // créer un cookie avec une valeur
+          theImg.useMap = theImg.useMap || "autosize";
+
+          jQuery.cl_cookie('picture_map', theImg.useMap, { path: cookie_path });
+          jQuery.cl_cookie('img_h', jQuery(theMainImage_obj).height(), { path: cookie_path });
+          jQuery.cl_cookie('img_w', jQuery(theMainImage_obj).width(), { path: cookie_path });
+
+          if (typeof Window_Affichage != "undefined") {
+            jQuery.cl_cookie('window_height', Window_Affichage.height, { path: cookie_path });
+            jQuery.cl_cookie('window_width', Window_Affichage.width, { path: cookie_path });
+          }
+        }
+      } catch (r) {
+
+      }
+
+    }); //unload
+
+    /********************************************
+    *  window LOAD
+    ********************************************/
+    jQuery(window).load(function () {
+      href = location.href;
+      var aff_ok = false;
+
+      DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false";
+      if (DEBUG_autosize == "true") {
+        for (var i = 0; i < 10; i++) {
+          jQuery('#adddebugs').click();
+        }
+        jQuery(jQuery('.debug').get(i - 1)).click();
+      }
+
+      /*
+      jQuery.post(href, function (data) {
+      nu_img--;
+      if (nu_img < 0) nu_img = 9;
+      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+      //alert("Data Loaded: " + data);
+      Wait_Affichage();
+      });
+      */
+      // jQuery(':Set_Class');
+      if (typeof img_width == "undefined") {
+        if (List_autosize.length == 0) return;
+        wait_resize = false;
+        if (List_autosize_resize()) Wait_Affichage();
+        return true;
+      }
+      //=========================================================         
+
+
+
+
+      //============================================================
+      Autosize_init();
+      Bandeau_bas = infos_Description_f("#theImage");
+      if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
+      else Bandeau = 0;
+
+      theMainImage_obj = theMainImage_obj;
+      Wait_Affichage();
+      Autosize_resize(true, { id_map: "autosize" });
+
+
+    }); // window.onload
+    /***********************************************************
+    *  RESIZE 
+    ***********************************************************/
+    jQuery(window).resize(
+                       function (event, ui) {
+                         List_autosize_resize(event, ui);
+                         if (Autosize_resize(true))
+                           if (Autosize_resize(true));
+                         Wait_Affichage();
+                       });
+
+    /************************************
+    * Extend 
+    ************************************/
+    jQuery.fn.extend({
+      //==========================================================
+      infos_description: function (e) {
+        return infos_Description_f(e);
+      },
+      //=============================================================
+      on: function (e) {
+        return;
+      },
+      /*
+      * recherche la plus grande image (hauteur ou largeur)
+      */
+      Get_Img_Maxi: function (myobj) {
+        return Get_Img_Maxi(myobj);
+      },
+      //============================================================
+      affiche_debug: function (aff_infos) {
+        affiche_debug(aff_infos);
+      }
+
+
+    }); //  fin extend  
+    //=================================================================================
+ 
+      /*****************
+      * changeImgSrc1
+      ******************/
+      changeImgSrc = function (url, typeSave, typeMap) {
+        var theImg = document.getElementById("theMainImage");
+        if (theImg) {
+          theImg.removeAttribute("width");
+          theImg.removeAttribute("height");
+          //  theImg.useMap = "#map" + typeMap;
+          if (typeMap == "Autosize") {
+            theImg.useMap = "#" + typeMap;
+          } else {
+            theImg.useMap = "#map" + typeSave;
+          }
+          jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
+          jQuery('#derivativeChecked' + typeMap).css('visibility', 'visible');
+
+          document.cookie = 'picture_deriv=' + typeSave + ';path="' + cookie_path + '" ';
+          jQuery.cl_cookie('picture_deriv', typeSave, { path: cookie_path });
+          jQuery.cl_cookie('picture_map', typeMap, { path: cookie_path });
+          theImg.src = url; // charge Image 
+
+        }
+      }          //changeImgSrc1
+
+    Wait_pamoorama = function () {
+      if (jQuery("#pamoorama").length) {
         mypanorama = window.myPamoorama;
         if (!mypanorama) {
           tempo = tempo + 1;
-          if (tempo > 10) 
-          return true;
-
-            setTimeout("Wait_pamoorama()", 500);
-            return false;
+          if (tempo > 10)
+            return true;
+          setTimeout("Wait_pamoorama()", 500);
+          return false;
         }
         if (mypanorama.skipInit == false) {
-            setTimeout("Wait_pamoorama()", 500);
-            return false;
-        }
+          setTimeout("Wait_pamoorama()", 500);
+          return false;
+        }
+        //=============================================================
         infos_pamoorama = jQuery("#pamoorama").infos();
         new_width = infos_pamoorama.width - (infos_pamoorama.borderwidth.left + infos_pamoorama.borderwidth.right);
-        if (Math.abs(new_width - myPamoorama.options.width) > 10) {
-            setTimeout("Wait_pamoorama()", 500);
-            return false;
-        }
-
+        Zone_image = Calcul_Image(false);
+        Set_Pamoorama();
+        if (Math.abs(infos_pamoorama.height) < 50) {
+          setTimeout("Wait_pamoorama()", 500);
+          return false;
+        }
         nopano = true;
-        old_window = { width: 0, height: 0 };
-        jQuery('#pamoorama').trigger('ON');
-
-    }
-}
-
-
-//==========================================================================
-function Wait_Affichage() {
- 
-  if (typeof fade_in == "undefined") fade_in = 1000;
-    fade_in = parseInt(fade_in);
-    /*
-    if (!jQuery().newResize()) {
-        setTimeout("Wait_Affichage()", 500);
-        return
-    }
-  
-    nu_img++; 
-    
-    */
-  if (typeof fade_in == "undefined") fade_in = 0;
-    if (fade_in == 0) {
-        jQuery(Parent).css({ opacity: "1" });
-
-      jQuery("#theImg").css({ opacity: "1" });
-      jQuery("#imageTitleContainer").css({ opacity: "1" });
-      jQuery("#theImageAndTitle").css({ opacity: "1" });
-
-      
-
-
-    } else {
-    jQuery(Parent).animate({ opacity: "1" },
-                                         fade_in, "swing",
-                                         function (i) {
-                                           jQuery(Parent).css({ opacity: "1" });
-                                           jQuery("#theImg").css({ opacity: "1" });
-                                           jQuery("#imageTitleContainer").css({ opacity: "1" });
-                                           jQuery("#theImageAndTitle").css({ opacity: "1" });
-
-                                       if (DEBUG_autosize == "true") {
-
-                                         nu_img--;
-                                         if (nu_img < 1) nu_img = 1;
-
-                                         bp1 = jQuery('.debug').get(nu_img);
-                                         jQuery(bp1).trigger('ON');
-                                       }
-                                         }
-                                       );
-
-                                       }
-
-
-    //   if (nu_img > 1) return;
-  if(typeof stb!="undefined")
-    stb.stop().fadeTo(3500, 0);
-
- jQuery("#theImage").trigger('ON');
-
-  if (typeof The_MainImage == "undefined") return true;
-  if (The_MainImage == null) return;
-  if (jQuery(The_MainImage).length > 0) {
-    if (typeof img_h == "undefined") {
-    img_h = jQuery(The_MainImage).height();
-    img_w = jQuery(The_MainImage).width();
-      }
-    jQuery("#src_img_h").val(img_h);
-    jQuery("#src_img_w").val(img_w);
-    jQuery("#ret_autosize").val(src_img);
-    if (typeof Window_Affichage =="undefined" ) {
-        Window_Affichage = { height: Zone_Affichage.height,
+        theMainImage_obj = "#pamoorama";
+      }
+    } // Wait_pamoorama
+    //====================================================================================
+    Wait_Affichage = function () {
+      if (typeof fade_in == "undefined") fade_in = 1000;
+      fade_in = parseInt(fade_in);
+      /*
+      if (!Autosize_resize()) {
+      setTimeout("Wait_Affichage()", 500);
+      return
+      }  
+      nu_img++;     
+      */
+      if (typeof fade_in == "undefined") fade_in = 0;
+      if (fade_in == 0) {
+        jQuery("#theImage").css({ opacity: "1" });
+        jQuery("#theImg").css({ opacity: "1" });
+        jQuery("#imageTitleContainer").css({ opacity: "1" });
+        jQuery("#theImageAndTitle").css({ opacity: "1" });
+      } else {
+        jQuery("#theImage").animate({ opacity: "1" },
+                                                 fade_in, "swing",
+                                                 function (i) {
+                                                   jQuery("#theImage").css({ opacity: "1" });
+                                                   jQuery("#theImg").css({ opacity: "1" });
+                                                   jQuery("#imageTitleContainer").css({ opacity: "1" });
+                                                   jQuery("#theImageAndTitle").css({ opacity: "1" });
+
+                                                   if (DEBUG_autosize == "true") {
+
+                                                     nu_img--;
+                                                     if (nu_img < 1) nu_img = 1;
+
+                                                     bp1 = jQuery('.debug').get(nu_img);
+                                                     jQuery(bp1).trigger('ON');
+                                                   }
+                                                 }
+                                               );
+
+      }
+      //   if (nu_img > 1) return;
+      if (typeof stb != "undefined")
+        stb.stop().fadeTo(3500, 0);
+      if (typeof theMainImage_obj == "undefined") return true;
+
+      if (theMainImage_obj.selector) {
+        theMainImage_obj = theMainImage_obj.selector;
+      }
+      // jQuery("#theImage").trigger("ON");
+      theImage_init("#theImage");
+
+      if (theMainImage_obj == null) return;
+      if (jQuery(theMainImage_obj).length > 0) {
+        if (typeof img_h == "undefined") {
+          img_h = jQuery(theMainImage_obj).height();
+          img_w = jQuery(theMainImage_obj).width();
+        }
+        jQuery("#src_img_h").val(img_h);
+        jQuery("#src_img_w").val(img_w);
+        jQuery("#ret_autosize").val(src_img);
+        if (typeof Window_Affichage == "undefined") {
+          Window_Affichage = { height: Zone_Affichage.height,
             width: Zone_Affichage.width
-        };
-    }
-    jQuery("#window_height").val(Window_Affichage.height);
-    jQuery("#window_width").val(Window_Affichage.width);
-
-    jQuery("#ret_autosize").trigger('ON', { 
-        width: img_w,
-        height: img_h,
-        theImage: The_MainImage,
-        src_img: src_img,
-        window_height: Window_Affichage.height,
-        window_width: Window_Affichage.width
-    });
-  }
- 
-}
-
-//=======================================================================
-function Calcul_Image(all_width) {
-  // theImageAndInfos(jaune) -> theImage(vert) -> [llgbo] -> theMainImage
-  // + infos_imageInfos(red)
-  infos_theImage = jQuery("#theImage").infos();
-
-  infos_the_page = jQuery("#the_page").infos();
-          infos_imageToolBar = jQuery("#imageToolBar").infos();
-          infos_imageInfos = jQuery("#imageInfos").infos();
-          //  infos_llgbo = jQuery("#llgbo").infos();
- 
-          infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
-
-          pos_left = infos_theImage.left;
-          x = infos_body.left;
-          imageInfos_width = jQuery("#imageInfos").css("width");
-          infos_body = jQuery("body").infos();
-
-           retrait_w = infos_theImage.margin.left
-                        + infos_theImage.margin.right
-                        + infos_theImage.borderwidth.left
-                        + infos_theImage.borderwidth.right
-                        + infos_theImage.padding.left
-                        + infos_theImage.padding.right;
-
-           retrait_w += infos_the_page.margin.left
-                        + infos_the_page.margin.right
-                        + infos_the_page.borderwidth.left
-                        + infos_the_page.borderwidth.right
-                        + infos_the_page.padding.left
-                        + infos_the_page.padding.right;
-
-           retrait_w += infos_body.margin.left +
-                        infos_body.margin.right;
-
-           retrait_h = infos_theImage.margin.top
-                        + infos_theImage.margin.bottom
-                        + infos_theImage.borderwidth.top
-                        + infos_theImage.borderwidth.bottom
-                        + infos_theImage.padding.top
-                        + infos_theImage.padding.bottom;
-
-           t0 = infos_imageToolBar.bottom + infos_imageToolBar.margin.top + infos_imageToolBar.margin.bottom;
-           if ((t0 > 0) && (infos_theImageAndInfos.top == 0))
-             retrait_h += t0;
-
-           else
-             retrait_h += infos_theImageAndInfos.top;  // top+height 
-
-            jQuery("#theMainImage").css({margin:"auto"        
-            });
-
-           retrait_img = infos_theMainImage.borderwidth.left
-            + infos_theMainImage.borderwidth.right
-            + infos_theMainImage.padding.left
-            + infos_theMainImage.padding.right;
-           retrait_img += infos_llgbo.borderwidth.right + infos_llgbo.borderwidth.right;
-
-        if (theme.match(RegExp("elegant", "gi")) ) {
-          if (all_width != true) {
-            new_width = 8  +
-                        infos_imageInfos.width +
-                        infos_imageInfos.borderwidth.left +
-                        infos_imageInfos.borderwidth.right +
-                        infos_imageInfos.margin.left +
-                        infos_imageInfos.borderwidth.right +
-                        infos_imageInfos.padding.left +
-                        infos_imageInfos.padding.right;                    
-              }else{
-                  new_width=0 ;
-              }
-                width_theImage= (jQuery(window).width() - new_width) 
-              
-        }else if (theme.match(RegExp("stripped", "gi")) ) {
-                width_theImage = (jQuery(window).width() ); 
-        }else{
-                width_theImage = (jQuery(window).width() );
-          }
-
-
-              b = 2;
-
-              n = Bandeau_t;
-              if (infos_llgbo.top > 0) {
-                if ((infos_llgbo.top - retrait_h)>0 ) {
-                  b = infos_llgbo.top - retrait_h;
-                } else {
-                b = infos_llgbo.top;
-                }
-              }
-              retrait_h += (b * 2)
-          height_theImage = jQuery(window).height() - retrait_h  ;  
-          width_theImage -= retrait_w ;
-          //===============================================================
-          width_theMainImage = width_theImage - retrait_img;
-          height_theMainImage = parseInt(width_theMainImage / rapport) - (retrait_img );
-          //===============================================================
-          // test débordement
-          if ((height_theMainImage  ) > height_theImage -(retrait_img + (b*2))) {           
-            height_theMainImage = height_theImage - (retrait_img );
-            width_theMainImage = parseInt(height_theMainImage * rapport);
-          } else {
-            width_theMainImage = width_theImage - (retrait_img);
-            height_theMainImage = parseInt(width_theMainImage / rapport);
-          }
-          height_theImage += (b * 2);
-
-        Zone_image = {
-          image: {  width: width_theMainImage    ,
-                    height: height_theMainImage 
-                    },
-                  container: { 
-                    width: width_theImage  ,
-                    height: height_theImage  
-                              }
-                };
-  
-           Zone_image.marge = { width: retrait_w, height: retrait_h };
-           //============ a corriger en fonction window ====
-        
-             return Zone_image;
-  }
-
-//=====================================================================
-function Autosize_resize(Obj) {
-    conf = jQuery(Obj).get(0).conf;
-    Obj = jQuery(Obj).get(0).obj;
-    myWindow = jQuery("#" + conf.parent).infos();
-    if (myWindow.width == 0) myWindow = jQuery(window).infos();
-    marge_basse = 0;
-    if (conf.MargeBasse)
-        marge_basse = jQuery().Get_Val_int (conf.MargeBasse );
-    marge_top = 0;
-    if (conf.MargeHaute)
-        marge_top = jQuery().Get_Val_int(conf.MargeHaute);
-    infos_Obj = jQuery(Obj).infos();
-    h1_left = jQuery(Obj).absoluteLeft();
-    h1_top = jQuery(Obj).absoluteTop();
-
-    if (h1_top < infos_Obj.height)
-        h1 = (myWindow.height - h1_top - marge_basse - marge_top);
-    else
-        h1 = (myWindow.height - marge_basse);
-    rap = infos_Obj.height / infos_Obj.width;
-    w2 = parseInt(h1 / rap);
-    if (w2 < infos_Obj.width)
-        marginLeft = infos_Obj.left + parseInt((infos_Obj.width - w2) / 2) + "px";
-    else
-        marginLeft = "auto";
-    jQuery(Obj).css({ width: "auto", marginTop: marge_top,
-        marginLeft: "auto", marginBottom: 0 + "px",
-        verticalAlign: "middle", textAlign: "center"
-    });
-    jQuery(Obj).height(h1);
-    //=============================================================
-  if (conf.ResizePicture == "true")
-    imgs = jQuery(Obj).find("img");
-  else
-    imgs = jQuery(Obj).find("img");
-  Parent = Obj;
-
-    Obj_w = jQuery(Obj).width();
-    Obj_h = jQuery(Obj).height();
-  if (imgs.length>0) {
-    jQuery(imgs).each(function (i) {
-        img = jQuery(this);
-      h1_top = jQuery(img).absoluteTop() - h1_top; 
-      h1_bottom =  Obj_h  - h1_top;
-      infos_img = { width: conf.width[i], height: conf.height[i] }; //origine 
-        img_rap = conf.rap[i];
-        if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
-      h1 -= h1_top;
-      if (h1 > Obj_h - h1_top) {
-        h1 = Obj_h-h1_top;        
-      }
-      w2 = parseInt(h1 * img_rap);
-        if (w2 > 0 && h1 > 0 && img.length > 0) {
-            img.height(h1);
-            img.width(w2);
-        }
-    });
-  }else{
-  imgs = jQuery(Obj).children();
-  jQuery(imgs).each(function (i) {  
-    if (this.height > 0) {
-      h1_top = jQuery(this).absoluteTop() - h1_top;
-      h1_bottom = Obj_h - h1_top;
-      infos_img = { width: conf.width[i], height: conf.height[i] }; //origine 
-      img_rap = conf.rap[i];
-      if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
-      h1 -= h1_top;
-      if (h1 > Obj_h - h1_top) {
-        h1 = Obj_h - h1_top;
-      }
-      w2 = parseInt(h1 * img_rap);
-      if (w2 > Obj_w ) {
-        w2 = Obj_w;
-      }
-
-      if (w2 > 0 && h1 > 0 ) {
-        this.height=(h1);
-        this.width=(w2);
-      }
-
-    }
-    name = this.name;
-    });
-
-
-
-  }
-
-}
-    //===============================================
-// Extend expression
-    //===============================================
-jQuery.extend(jQuery.expr[':'], {
-  // Nom du sélecteur personnalisé
-  Autosize: function (a) {
-    nd = a.nodeName;
-    n1 = a.className;
-    // personal_block
-    if (n1.match(RegExp("autosize", "gi"))) {
-      //   autosize = "MargeBasse:30px; ResizePicture:false"
-      infconf = jQuery(a).attr("autosize");
-      n1 = typeof infconf;
-      conf = { MargeBasse: 0, NoPicture: false }
-      if (n1 == "undefined") {
-
-      } else {
-        tableau = infconf.split(";");
-        for (var i = 0; i < tableau.length; i++) {
-          tableau2 = tableau[i].split(":");
-          conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]);
-        }
-        imgs = jQuery(a).find("img");
-        rap = new Array();
-        width = new Array();
-        height = new Array();
-        if (imgs.length > 0)
-          jQuery(imgs).each(function (i) {
-            img = jQuery(this);
-            rap.push((img.width() / img.height()));
-            width.push(img.width());
-            height.push(img.height());
-          });
-        else {
-          imgs = jQuery(a).children();
-          jQuery(imgs).each(function (i) {
-            if (this.height > 0) {
-              rap.push(this.width / this.height);
-              width.push(this.width);
-              height.push(this.height);
-            }
-            name = this.name;
-
-
-          });
-        }
-
-        conf['rap'] = rap;
-        conf['width'] = width;
-        conf['height'] = height;
-
-        List_autosize.push({ obj: a, conf: conf });
-        jQuery(a).css({ opacity: 0 });
-      }
-    }
-    //  Css = jQuery(a).getStyles(a);
-    return false;
-
-  },
-  Set_Class: function (a) {
-    nd = a.nodeName;
-    if (nd == "DIV") {
-      XBrowserAddHandler(a, 'onpropertychange', onPropertyChange);
-      //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green");
-      img = jQuery(a).children("img");
-      if (img.length == 0) img = jQuery(a).find("a").children("img");
-      if (img.length > 0)
-        if (img.length == 1) {
-          if (img[0].src.match(RegExp(".png", "g")))
-            return;
-          // img[0].attachEvent('onpropertychange', onPropertyChange);
-          XBrowserAddHandler(img[0], 'onpropertychange', onPropertyChange);
-          jQuery(img).addClass("Image");
-          //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true");
-        }
-    }
-  }
-});
-function XBrowserAddHandler(target,eventName,handlerName){
-      if ( target.addEventListener )
-          target.addEventListener(eventName, handlerName, false);
-      else if ( target.attachEvent )
-          target.attachEvent("on" + eventName, handlerName);
-       else
-          target["on" + eventName] = handlerName;
- }
-/*
- var y = 3; 
- var txtTestBox = document.getElementById('testBox');
- XBrowserAddHandler(txtTestBox, 'keyup', function() {
-  myFunctionRef(y) 
-  });
- var myFunctionRef = function myFunction(x, e) {
- var keyCode; 
- if (!e && window.event)
- e = window.event; 
- if (e)
- keyCode = (window.Event) ? e.which : e.keyCode; 
- alert('You pressed: ' + keyCode + '. Event object is :' + e + '. x is: ' + x);
- }
-*/
-function onPropertyChange(e) {
-    var el = e.srcElement;
-    attributs = el.attributes;
-    if (attributs.id) id = attributs.id.value;
-    if (attributs.style) style = attributs.style.value;
-    /* Image */
-    if (attributs.src) {
-      src = attributs.src.value;
-      if (attributs.width) width = attributs.width.value;
-      if (attributs.height) height = attributs.height.value;
-    }
-         switch (e.propertyName) {
-           case "style.opacity":
-
-             break;
-           case "style.transform":
-             
-             break;
-           case "style.display":
-            
-             break;
-           case "style.color":
-
-             break;
-           case "style.width":
-            width= el.style.width;
-             break;
-           case "style.height":
-             height = el.style.height;
-             break;
-
-           case 'width':
- 
-             break;
-           case 'height':
-
-             el.style.height = el.attributes.height.nodeValue + 'px';
-             el.firstChild.style.height = el.clientHeight + 'px';
-             break;
-         }
-       }
-
-function List_autosize_resize(event, ui) {
-    if (typeof wait_resize == "undefined") wait_resize = false;
-    if (wait_resize == true) return;
-
-    wait_resize = true;
-    if (List_autosize.length == 0) return;
-    for (i = 0; i < List_autosize.length; i++) {
-        Autosize_resize(jQuery(List_autosize[i]));
-    }
-    wait_resize = false;
-    return true;
-
-}
-//==============================================================
-var infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); // Cadre general
-var infos_theMainImage = jQuery("#theMainImage").infos();         // Cadre general
-var infos_imageInfos = jQuery("#imageInfos").infos();             // Cadre general
-var infos_the_page = jQuery("#the_page").infos();
-var infos_content = jQuery("#content").infos();
-var infos_titrePage = jQuery("#titrePage").infos();
-var infos_imageInfoBar = jQuery("#imageInfoBar").infos();
-var infos_theHeader = jQuery("#theHeader").infos();
-var infos_imageToolBar = jQuery("#imageToolBar").infos();
-var infos_body = jQuery("body").infos();
-var infos_llgbo = jQuery("#llgbo").infos();
-var infos_llgboh2 = jQuery("#llgboh2").infos();
-//===============================================================
-
-jQuery(document).ready(
-     function (jQuery) {
-       // jQuery(':Autosize');
-
-
-       jQuery(window).unload(function () {
-         try {
-           if (typeof The_MainImage != "undefined") {
-             jQuery.cookie('img', The_MainImage.src); // créer un cookie avec une valeur
-
-             jQuery.cookie('img_h', jQuery(The_MainImage).height());
-             jQuery.cookie('img_w', jQuery(The_MainImage).width());
-
-             if (typeof Window_Affichage != "undefined") {
-               jQuery.cookie('window_height', Window_Affichage.height);
-               jQuery.cookie('window_width', Window_Affichage.width);
-             }
-           }
-         } catch (r) {
-
-         }
-
-       });
-
-       /********************************************
-       *  window LOAD
-       ********************************************/
-       jQuery(window).load(function () {
-
-         href = location.href;
-         var aff_ok = false;
-         /*
-         jQuery.post(href, function (data) {
-         nu_img--;
-         if (nu_img < 0) nu_img = 9;
-         jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
-         //alert("Data Loaded: " + data);
-         Wait_Affichage();
-         });
-         */
-         // jQuery(':Set_Class');
-         if (typeof img_width == "undefined") {
-           if (List_autosize.length == 0) return;
-           wait_resize = false;
-           if (List_autosize_resize()) Wait_Affichage();
-           return true;
-         }
-         //=========================================================
-         if (typeof (options) == "undefined") {
-           options = { imageAutosizeMargin: 0, imageAutosize: false }
-         }
-
-         old_img = jQuery.cookie('img');
-         old_img_h = jQuery.cookie('img_h');
-         old_img_w = jQuery.cookie('img_w');
-         old_window_height = jQuery.cookie('window_height');
-         old_window_width = jQuery.cookie('window_width');
-
-         //============================================================
-         img_init = { height: img_height, width: img_width };  // taille initiale
-         img_defaut = { height: scaled_height, width: scaled_width };
-         img_reelle = { height: img_height, width: img_width };
-         img_finale = { height: 0, width: 0 };
-
-         img_top = "0";
-         rapport = -1;
-         marges_llgbo = 0;
-
-         //=============================================================
-         Type_Img = "";
-         nopano = false;
-
-
-         Zone_Affichage = { height: 0, width: 0 };
-         //============================================================
-         jQuery("#the_page").css({ top: "0px" });
-
-         infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); // Cadre general
-         infos_theMainImage = jQuery("#theMainImage").infos();         // Cadre general
-         infos_imageInfos = jQuery("#imageInfos").infos();             // Cadre general
-        infos_the_page = jQuery("#the_page").infos();
-         infos_content = jQuery("#content").infos();
-         infos_titrePage = jQuery("#titrePage").infos();
-         infos_imageInfoBar = jQuery("#imageInfoBar").infos();
-         infos_theHeader = jQuery("#theHeader").infos();
-         infos_imageToolBar = jQuery("#imageToolBar").infos();
-         infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
-
-         Parent = "#theImage";
-         infos_theImage = jQuery(Parent).infos();
-         Zone_Affichage = jQuery(Parent).infos();
-         //
-         var old_window = { width: 0, height: 0 };
-
-         Bandeau_bas = infos_Description_f(Parent);
-         if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
-         else Bandeau = 0;
-
-
-         rapport = parseInt(img_init.width) / parseInt(img_init.height);
-
-
-
-
-         old_window = { width: 0, height: 0 };
-         jQuery().newResize(true);
-         Wait_Affichage();
-
-
-
-         //============== initialisation ===================
-
-         var pos;
-         var set_p = false;
-
-
-       }); // window.onload
-
-
-       /***********************************************************
-       *  RESIZE 
-       ***********************************************************/
-       old_window = { width: 0, height: 0 };
-       jQuery(window).resize(
-               function (event, ui) {
-                 List_autosize_resize(event, ui);
-                 if (jQuery().newResize())
-                   Wait_Affichage();
-               });
-
-       /************************************
-       * Extend 
-       ************************************/
-       jQuery.fn.extend({
-         //==========================================================
-         infos_description: function (e) {
-           return infos_Description_f(e);
-
-         },
-         //=============================================================
-         onPropertyChange: function (e) {
-
-           return;
-
-         },
-         /*
-         * recherche la plus grande image (hauteur ou largeur)
-         */
-         Get_Img_Maxi: function (myobj) {
-           return Get_Img_Maxi(myobj);
-         },
-         //============================================================
-         affiche_debug: function (aff_infos) {
-           affiche_debug(aff_infos);
-         },
-         //====================================================
-         newResize: function (force) {
-           if (force && force == true) old_window.width = 0;
-           id2 = jQuery("#theImage img").attr("usemap");
-           if (typeof id2 == "undefined") id2 = jQuery("#theImage").attr("usemap");
-           if (id2) {
-             if (id2.match(RegExp("#map", "gi"))) {
-               return true;
-             }
-           }
-           if (typeof options != "undefined")
-             if (options.imageAutosize) {
-               // Wait_Affichage();
-               return true; //stripped
-             }         
-           if (typeof Bandeau_bas == "undefined")
-             return true;
-           if (typeof cl_visible == "undefined") return true;
-           if (!cl_visible == true) { return true; }
-           var chk = eval(user_status + "_enabled");
-           if (chk == "") { return true; }
-           //================================================================= 
-           
-           nds = jQuery("#imageInfos").css("display");
-           Zone_image = Calcul_Image(nds == "none");
-
-           var winwidth = jQuery(window).width();
-           var winheight = jQuery(window).height();
-
-
-           n = winwidth - old_window.width;
-           if (Math.abs(n) < 1) {
-             n = winheight - old_window.height;
-             if (Math.abs(n) < 1) {
-               return false;
-             }
-           }
-
-           if (Math.abs(n) > 30) nu_img = 0;
-           nu_img++;
-           if (nu_img > 10) return true;
-
-           old_window = jQuery(window).infos();
-           //========= Récupération des informations =============       
-
-
-           var marge = 0;
-           var marge_right = 0;
-           var marge_left = 0;
-
-           var Licence = jQuery(".licencetag");
-           infos_Licence = jQuery(".licencetag").infos();
-
-           if (theme.match(RegExp("simple", "gi"))) {
-             if (infos_imageToolBar.width > 0)
-               marge = (Zone_Affichage.width - infos_imageToolBar.width) / 2;
-             else if (infos_the_page.width > 0)
-               marge = (Zone_Affichage.width - infos_the_page.width) / 2;
-
-             marge_right = marge;
-             marge_left = marge;
-
-             if (infos_content.width > 100) {
-
-               marge_left = (infos_imageInfoBar.margin.left) + 1;
-               marge_right = (marge_left + infos_imageInfoBar.margin.right) + 1;
-               winwidth = infos_content.width;
-               marge_right = infos_imageInfoBar.width + marge_right;
-
-             }
-           } else if (theme.match(RegExp("elegant", "gi"))) {
-
-             infos_theMainImage = jQuery("#theMainImage").infos(); // Image
-             infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
-             infos_window = jQuery(window).infos();
-
-             infos_theImage = jQuery("#theImage").infos(); // conteneur image
-             infos_imageInfos = jQuery("#imageInfos").infos(); // conteneur infos
-
-             if (jQuery("#imageInfos").is(":hidden")) {
-
-               marge_right = infos_imageInfos.margin.left + infos_imageInfos.margin.right;
-               marge_right += infos_imageInfos.borderwidth.left + infos_imageInfos.borderwidth.right;
-
-               marge_left = infos_imageInfos.left + 2;
-             } else {
-
-               marge_right = infos_imageInfos.margin.left + infos_imageInfos.margin.right;
-               marge_right += infos_imageInfos.width + infos_imageInfos.borderwidth.left + infos_imageInfos.borderwidth.right;
-
-               marge_left = infos_imageInfos.left + 2;
-             }
-
-           } else {
-             infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
-             if (theme.match(RegExp("stripped", "gi")) || theme.match(RegExp("elegant", "gi"))) {
-               marge = (infos_the_page.width - infos_content.width) / 2;
-               marge_right = marge + 2;
-               marge_left = marge + 2;
-             } else if (infos_imageToolBar.width > 0) {
-               marge = (infos_the_page.width - infos_imageToolBar.width) / 2;
-
-               marge_right = marge + infos_the_page.left;
-               marge_left = marge;
-
-             }
-             winwidth = infos_the_page.width;
-           }
-
-
-
-           marge_right += Zone_Affichage.borderwidth.right;
-           marge_left += Zone_Affichage.borderwidth.left;
-           if ((marge_right + marge_left) < winwidth) {
-             winwidth -= (marge_right + marge_left);
-           }
-   
-
-
-           if (Type_Img == "pamoorama") {
-
-             mypanorama = window.myPamoorama;
-             //============================================================
-             if (typeof (mypanorama) == "undefined") return false;
-             var myPamoorama = mypanorama;
-             if (typeof (myPamoorama.skipInit) == "undefined") return false;
-             //
-
-             if (myPamoorama.skipInit == false) {
-
-               return false;
-             }
-
-             var infos_pamoorama = jQuery("#pamoorama").infos();
-             var infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
-             var infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
-             var infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
-             var infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
-             The_MainImage = jQuery("#pamoorama");
-             obj = The_MainImage.get(0);
-
-           } else {
-
-
-
-
-           }
-           //=================================================================
-
-
-           switch (Type_Img) {
-             case "map":
-
-
-               ;
-
-               break
-
-
-             case "panorama":      
-               if (!The_MainImage) {
-                 The_MainImage = jQuery("#theMainImage");
-                 if (The_MainImage.length > 0)
-                   return;
-                 The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
-               
-                 if (The_MainImage.length > 0)
-                   The_MainImage = The_MainImage[0];
-                 else
-                   The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
-               }
-               infos_theImage = jQuery(The_MainImage).infos();
-               infos_the_page = jQuery("#the_page").infos();
-               jQuery("#theImage").height(infos_theImage.height);
-               img_finale.height = infos_theImage.height;
-
-               break
-             case "img":
-
-               if (!The_MainImage) return true;
-               if (theme.match(RegExp("luciano", "g"))) {
-                 The_MainImage = jQuery("#the_page #The_MainImage");
-               }
-
-               infos_the_page = jQuery("#the_page").infos();
-
-
-               break
-             case "img_autre":
-               if (!The_MainImage) {
-                 if (DEBUG_autosize == "true") alert("The_MainImage=null");
-                 return true;
-
-               }
-               infos_theImage = jQuery(The_MainImage).infos();
-               infos_the_page = jQuery("#the_page").infos();
-
-
-               break
-             case "embed":
-               //
-               if (infos_img.width == 0)
-                 infos_img = jQuery("#thePicturePage").infos();
-               if (infos_img.width == 0)
-                 infos_img = jQuery("#the_page").infos();
-               infos_theImage = infos_img;
-               infos_the_page = jQuery("#the_page").infos();
-               Bandeau_bas.height = Bandeau_bas.top;
-
-               iph1 = jQuery("#theImage div").infos();
-               if ((winheight - iph1.bottom) > 0)
-                 Bandeau_bas.height = (winheight - iph1.bottom) + 50;
-               else
-                 Bandeau_bas.height = 50;
-
-
-               if (rapport < 0) {
-                 img_height = infos_img.height;
-                 img_width = infos_img.width;
-                 img_reelle.height = img_height;
-                 img_reelle.width = img_width;
-               }
-
-               break
-             case "charlie":
-               infos_theImage = infos_img;
-               infos_the_page = jQuery("#the_page").infos();
-               if (rapport < 0) {
-                 img_height = parseInt(infos_img.height);
-                 img_width = parseInt(infos_img.width);
-                 img_reelle.height = parseInt(infos_img.height);
-                 img_reelle.width = parseInt(infos_img.width);
-               }
-               break
-
-
-             case "pamoorama":
-               img_reelle = { height: img_height, width: img_width };
-               //=========================================================
-               img_reelle.height = img_height;
-               img_reelle.width = Zone_Affichage.width;
-               The_MainImage = myPamoorama.image;
-               infos_theImage = jQuery("#pamoorama").infos();
-               infos_theImage.height = infos_theImage.height;
-               infos_the_page = jQuery("#the_page").infos();
-               break
-           }
- //================= Vérification taille image ==================
-           MinWidth = jQuery(The_MainImage).css("minWidth");
-           if (MinWidth == "0px")
-             MinWidth = mini_width;
-           MinHeight = jQuery(The_MainImage).css("minHeight");
-           if (MinHeight == "0px")
-             MinHeight = mini_height;
-
-           MaxWidth = jQuery(The_MainImage).css("maxWidth");
-           if (MaxWidth == "0px")
-             MaxWidth = winwidth;
-           MaxHeight = jQuery(The_MainImage).css("maxHeight");
-           if (MaxHeight == "0px")
-             MaxHeight = mwinheight;
-
-           //=============== Vérification taille minimale  autorizée ======================
-           var miniWidth = jQuery(The_MainImage).Get_Val_int(MinWidth, mini_width);
-           var miniHeight = jQuery(The_MainImage).Get_Val_int(MinHeight, mini_height);
-           if (winwidth < mini_width2) mini_width2 = winwidth;
-
-           var miniWidth2 = jQuery(The_MainImage).Get_Val_int(MinWidth, mini_width2);
-           var miniHeight2 = jQuery(The_MainImage).Get_Val_int(MinHeight, mini_height2);
-
-
-           var maxWidth = jQuery(The_MainImage).Get_Val_int(MaxWidth, winwidth, "0");
-           maxHeight = jQuery(The_MainImage).Get_Val_int(MaxHeight, winheight, "0");
-
-           mini_width = parseInt(miniWidth);
-           mini_height = parseInt(miniHeight);
-
-           img_reelle.width = parseInt(img_reelle.width);
-
-           if (img_reelle.width < mini_width) 
-             return true;
-         
-
-           img_reelle.height = parseInt(img_reelle.height);
-           if (img_reelle.height < parseInt(mini_height))
-             return true;
-//======================================================================
-           jQuery("#theMainImage").width(Zone_image.image.width);
-           jQuery("#theMainImage").height(Zone_image.image.height);
-           jQuery("#theImage").width(Zone_image.container.width);
-           jQuery("#theImage").height(Zone_image.container.height);
-         
-return true;
- //=============== Zone d'affichage ============================  
-           Zone_Affichage.width = winwidth;
-           borderH = Zone_Affichage.borderwidth.top;
-           borderH += Zone_Affichage.borderwidth.bottom;
-
-           Zone_Affichage.height = winheight - borderH;
-
-           var Licence = jQuery(".licencetag");
-           infos_Licence = jQuery(".licencetag").infos();
-
-           var MainImage = jQuery("#theMainImage");
-
-           if (MainImage.length == 0) jQuery(Parent + " #theImg IMG").css("marginTop", "0px");
-
-           //========== Correction en fonction du thème =============================
-           var correction = 0;
-           if (theme.match(RegExp("sobre", "g"))) {
-
-             //   correction = -infos_Licence.padding.top;
-             if (Type_Img == 'img') {
-               if (msie == true) correction = 0;
-               else correction = 0;
-               correction = 10;
-             }
-
-           } else if (theme.match(RegExp("Pure", "g"))) {
-             correction += 0; //??
-           } else if (theme.match(RegExp("luciano", "g"))) {
-             correction = 0; //??
-
-           } else if (theme.match(RegExp("simple", "g"))) {
-             correction += 0; //??
-           } else if (theme.match(RegExp("gally", "g"))) {
-             correction += 0; //??
-           } else if (theme.match(RegExp("os", "g"))) {
-             correction += 0; //??
-           } else if (theme.match(RegExp("elegant", "gi"))) {
-             correction += 0; //??
-           }
-           //====================================================
-           if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin;
-           else Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
-           //==========================================================================
-           h = 0;
-           Bandeau = 0;
-           infos_body = jQuery("body").infos();
-           h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
-           h -= infos_body.margin.bottom;
-           h -= infos_body.margin.top;
-           if (typeof Bandeau_t != "undefined") {
-             Bandeau = Bandeau_t.top | 0;
-
-           }
-           Zone_Affichage.height -= Bandeau + Marge_Basse - correction - h; // 784 -127
-
-
-           //=========================================================================
-           if (Zone_Affichage.height < mini_height2)
-             Zone_Affichage.height = mini_height2;
-           if (Zone_Affichage.width < mini_width2)
-             Zone_Affichage.width = mini_width2;
-           //=========================================================================
-           /*
-           if (typeof (Bandeau_bas) != "undefined") {
-           if (Bandeau_bas.height < Zone_Affichage.height)
-           Zone_Affichage.height += (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
-           } else {
-
-           }
-           */
-
-
-
-           img_finale.width = Zone_Affichage.width - (Zone_Affichage.borderwidth.left + Zone_Affichage.borderwidth.right);
-           img_finale.height = Zone_Affichage.height - (Zone_Affichage.borderwidth.left + Zone_Affichage.borderwidth.bottom);
-
-
-           var Image_height = img_finale.height;
-
-           //=============================================================
-           var height_user = eval(user_status + "_height");
-           var reg1 = new RegExp("%", "g");
-           if (height_user.match(reg1))
-             Image_height = Image_height * parseInt(height_user) / 100;
-           else
-             Image_height = parseInt(height_user);
-
-           echelle_max = parseFloat(echelle_max, '3');
-           var echelle = parseFloat(Image_height / img_reelle.height, 3);
-
-           if (echelle > echelle_max) { echelle = echelle_max; }
-           Image_height = parseInt(img_reelle.height * echelle);
-           //============================================================
-           var Image_width;
-           if (rapport > 0)
-             Image_width = parseInt(Image_height * rapport);
-           else if (Type_Img == "map") {
-             Image_width = Zone_Affichage.width - marge_left - marge_right;
-           } else {
-             Image_width = Zone_Affichage.width;
-           }
-
-           //===============================================================
-           jQuery(Cadre).width(Zone_Affichage.width);
-           jQuery(Cadre).height(Zone_Affichage.height);
-           jQuery(The_MainImage).removeAttr("width");
-           jQuery(The_MainImage).css({ height: Image_height }); //image
-
-
-
-           align_auto = "center";
-           if (jQuery("#theImg").css("textAlign"))
-             align_auto = jQuery("#theImg").css("textAlign");
-           var widthmin = winwidth;
-
-           if (check_auto_w == 'checked="checked"') {
-             // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) {
-             //==== largeur à atteindre ===
-             var width_user = eval(user_status + "_width");
-             // Largeur maximale en fonction du statut
-             if (width_user.match(reg1))
-             // pourcentage
-               widthmin = widthmin * parseInt(width_user) / 100;
-             else
-               widthmin = parseInt(width_user);
-
-             var marges = 0;
-
-             if (typeof (infos_img) != "undefined") {
-               widthmin -= infos_img.borderwidth.left || 0;
-               widthmin -= infos_img.borderwidth.right || 0;
-             }
-             widthmin -= marges;
-             if (typeof Bandeau_t != "undefined") {
-               widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
-               Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
-             } else {
-
-               jQuery().newResize();
-             }
-             if (Image_width > widthmin) {
-               //   Image_width largeur à atteindre
-               //  Calcul du rapport d'agrandissement
-               var echelle_w = parseFloat((widthmin) / img_reelle.width, 3);
-               if (echelle_w > echelle_max) { echelle_w = echelle_max; }
-               Image_width = parseInt(img_reelle.width * echelle_w);
-               if (rapport > 0)
-                 Image_height = parseInt(Image_width / rapport);
-             }
-
-
-
-           }
-
-
-           // }
-           //===================================================
-
-           img_finale.height = Image_height;
-           img_finale.width = Image_width;
-           if (theme.match(RegExp("stripped", "gi"))) {
-             img_finale.width -= (llgboframe.top * 2);
-             if (rapport > 0) img_finale.height = (img_finale.width / rapport);
-             else img_finale.height -= (llgboframe.top * 2);
-
-           }
-           zoom = echelle;
-           if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) {
-             //=============LLGBO2 ===========================
-             t1 = llgboframe;
-             if (!The_MainImage.src) {
-               The_MainImage = jQuery("#llgbo").find("img").get(0)
-               if (!The_MainImage.src) {
-                 The_MainImage = jQuery(Parent).find("div").get(0)
-               }
-             }
-             if (The_MainImage.src) {
-               wingbo = img_finale.width;
-               heightgbo = img_finale.height;
-               if (Type_Img == "panorama") {
-                 heightgbo = infos_theImage.height;
-                 img_finale.height = infos_theImage.height;
-               }
-
-               img_finale.width -= marges_llgbo;
-               if (jQuery("#slideshow").infos().width > 0) {
-                 img_finale.height -= (marges_llgbo * 1.5);
-               } else {
-                 img_finale.height -= marges_llgbo
-               }
-
-
-               if (wingbo > winwidth) {
-                 jQuery("#llgbo").width(winwidth);
-                 jQuery("#llgbo").height(winheight);
-                 jQuery("#llgbo").css("width", winwidth + "px");
-                 jQuery("#llgbo").css("height", winheight + "px");
-               }
-               else {
-                 jQuery("#llgbo").width(wingbo);
-                 jQuery("#llgbo").height(heightgbo);
-                 jQuery("#llgbo").css("width", wingbo + "px");
-                 jQuery("#llgbo").css("height", heightgbo + "px");
-               }
-
-               a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]");
-               a1 = jQuery("area[rel=prev]");
-               a2 = jQuery("area[rel=next]");
-               a3 = jQuery("area[rel=up]");
-               nb_zone = 3;
-               if (a1.length == 0) {
-                 nb_zone -= 1;
-               }
-               if (a2.length == 0) {
-                 nb_zone -= 1;
-               }
-
-
-               var Largeur_zone = (img_finale.width / nb_zone);
-               var Hauteur_zone = (img_finale.height);
-               var init_zone = 0;
-
-               if (a1.length > 0) {
-                 coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone };
-
-                 jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
-                 init_zone += Largeur_zone;
-               }
-
-               coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height };
-
-               if (a0.length > 0) {
-                 jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" });
-                 jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" });
-               } else {
-                 jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" });
-               }
-               init_zone += Largeur_zone;
-
-               if (a2.length > 0) {
-                 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height };
-                 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
-               }
-               //    jQuery("#theImage").height(heightgbo + marges_llgbo / 2);
-             }
-           }
-
-           //================ Zone affichage =========================
-
-           //  jQuery(Cadre).css("top", "0px");
-           jQuery("#standard").css("top", 0 + "px");
-           jQuery("#comments").css("top", 0 + "px");
-           //========== Image Remise à l'échelle =======================
-
-           img_finale.height = parseInt(img_finale.height);
-           img_finale.width = parseInt(img_finale.width);
-           //=========================================================================
-           //=== cadre = theImage
-           if (theme.match(RegExp("simple", "gi"))) {
-             jQuery(Cadre).width(Zone_Affichage.width); //centrer simple black
-             jQuery(Cadre).css({ width: Zone_Affichage.width + "px",
-               marginLeft: "auto"
-             });
-
-           } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
-             jQuery(Cadre).css({ width: "auto", marginLeft: "auto" });
-           } else if (theme.match(RegExp("saruka", "gi"))) {
-
-             jQuery(Cadre).css({ width: Zone_Affichage.width + "px" });
-           } else if (theme.match(RegExp("elegant", "gi"))) {
-
-             // jQuery(Cadre).css("width", "auto");
-             jQuery(Cadre).css({ height: Zone_Affichage.height + "px", width: "auto" }); //conteneur
-
-           } else {
-             jQuery(Cadre).css("width", "auto");
-
-           }
-           // ;
-
-           if (Type_Img == "panorama" || Type_Img == "pamoorama") {
-             img_finale.height = infos_theImage.height;
-             Zone_Affichage.height = img_finale.height;
-
-           }
-
-           if (typeof (gmaps) != "undefined") {
-             Gmap_ = gmaps.maps[0];
-             if (Gmap_.sizeMode == 'A') {
-               jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" });
-
-             }
-           }
-           //============= flv,mov,mpg  ok
-           /* wmv nok
-           * avi nok
-           //===========================================
-           */
-           if (Type_Img == "charlie") {
-             t1 = jQuery("#charlie").infos();
-
-             /**/
-
-             pdf = 0;
-             jQuery("#charlie div").each(function (i) {
-
-
-               p1 = jQuery(this).infos();
-               pdf += p1.padding.right + p1.padding.left;
-             });
-             img_finale.width -= pdf;
-
-             jQuery("#charlie").css({
-               width: img_finale.width + pdf + "px",
-               height: img_finale.height + "px",
-               marginLeft: "auto"
-             });
-
-
-             if (MainImage.length > 0) {
-               img_finale.height = parseInt(img_finale.width / rapport);
-               img_finale.height -= 30;
-               img_finale.width = rapport * img_finale.height;
-
-
-               MainImage.width(img_finale.width);
-               MainImage.height(img_finale.height);
-               jQuery("#embedplayer").width(300);
-               jQuery("#embedplayer").height(15);
-             } else {
-               jQuery("#player").css("width", img_finale.width + "px");
-               jQuery("#player").css("height", img_finale.height + "px");
-
-               jQuery("#embedplayer").css("width", img_finale.width + "px");
-               jQuery("#embedplayer").css("height", img_finale.height + "px");
-
-               jQuery("embed").css({ width: img_finale.width + "px",
-                 height: img_finale.height + "px"
-               });
-               jQuery("object").css({ width: img_finale.width + "px",
-                 height: img_finale.height + "px"
-               });
-               jQuery("video").css({ width: img_finale.width + "px",
-                 height: img_finale.height + "px"
-               });
-
-
-
-               jQuery("video").height(img_finale.height);
-               jQuery("video").width(img_finale.width);
-
-               jQuery("object").width(img_finale.width);
-               jQuery("object").height(img_finale.height);
-               //jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??             
-
-               jQuery(The_MainImage).height(img_finale.height);
-               jQuery(Cadre).css("height", "auto");
-             }
-
-
-           } else if (Type_Img == "embed") {
-
-             if (MainImage.length > 0) {
-               img_finale.height = parseInt(img_finale.width / rapport);
-               img_finale.height -= 30;
-               img_finale.width = rapport * img_finale.height;
-
-
-               MainImage.width(img_finale.width);
-               MainImage.height(img_finale.height);
-               jQuery("#embedplayer").width(300);
-               jQuery("#embedplayer").height(15);
-             } else {
-               jQuery(Cadre).css("height", "auto");
-               jQuery("embed").css("height", img_finale.height);
-               jQuery("object").css({ height: img_finale.height + "px" });
-
-               jQuery("object").width(img_finale.width);
-               jQuery("object").height(img_finale.height);
-             }
-
-           } else if (Type_Img == "panorama") {
-             if (typeof asp_options != "undefined")
-               n = asp_options;
-             n1 = jQuery("#Panorama div").width();
-             jQuery(".panorama-viewport").css("margin", "auto");
-             n = infos_imageToolBar;
-
-
-           } else if (Type_Img == "pamoorama") {
-
-
-
-             infos_theImage.height = Zone_Affichage.height;
-             img_height = myPamoorama.imageHeight
-             if (theme.match(RegExp("simple", "g"))) {
-               //  marge_right = 2;
-             }
-             new_width = Zone_Affichage.width - marge_right - marge_left;
-             new_width = Zone_Affichage.width - (infos_theImage.borderwidth.right + infos_theImage.borderwidth.left);
-             if (new_width > myPamoorama.imageWidth)
-               new_width = myPamoorama.imageWidth;
-
-
-
-             Zone_Affichage.height += infos_pamoorama_footer.height;
-             zoom = infos_theImage.height / img_height;
-             myPamoorama.options.width = new_width * zoom;
-             //  if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom });
-             //====================================================
-             jQuery("#pamoorama").css({
-               marginLeft: "auto",
-               marginRight: "auto",
-               //height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur;
-               width: new_width + "px"
-             });
-             jQuery("#pamoorama").width(new_width);
-
-             //====================================================
-             infos_pamoorama = jQuery("#pamoorama").infos();
-             img_finale.height = infos_pamoorama.height - infos_pamoorama_footer.height;
-             img_finale.width = new_width;
-
-             jQuery("#pamoorama_outter").width(new_width);
-
-             jQuery("#pamoorama_thumb").width(200 / zoom);
-             // commenter sinon outter augmente à chaque resize
-             //  jQuery("#pamoorama_outter").height(infos_pamoorama.height - infos_pamoorama_footer.height);
-             // pamoorama_frame
-
-
-             jQuery("#pamoorama_outter").css({ width: new_width + "px" });
-             jQuery("#pamoorama_footer").css({ width: new_width + "px" });
-             //
-             //====================================================
-             infos_pamoorama = jQuery("#pamoorama").infos();
-             infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
-             infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
-             infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
-             infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
-
-             infos_frame = jQuery(myPamoorama.frame).infos();
-
-
-
-           } else if (The_MainImage != null && The_MainImage.src) {
-             //--- background ?? ---
-             jQuery(The_MainImage).height(img_finale.height);
-             jQuery(The_MainImage).width(img_finale.width);
-             jQuery(The_MainImage).css({ height: img_finale.height + "px ",
-               width: img_finale.width + "px "
-             });
-
-
-           } else {
-             //===map ? luciano ===
-             //   jQuery(The_MainImage).css({ height: img_finale.height + "px ",  width: img_finale.width + "px });
-             //   jQuery(The_MainImage).height(img_finale.height );
-             //   jQuery(The_MainImage).width(img_finale.width );
-             //   jQuery(The_MainImage).attr({ width: img_finale.width  });
-             h = img_finale.height;
-             h = Zone_Affichage.height - Zone_Affichage.borderwidth.top - Zone_Affichage.borderwidth.bottom;
-             h -= (infos_theImage.borderwidth.bottom + infos_theImage.borderwidth.top);
-
-             jQuery(The_MainImage).attr({ height: h - 3 }); //image
-             if (theme.match(RegExp("elegant", "gi"))) {
-               return true;
-
-             }
-             if (theme.match(RegExp("luciano", "g"))) {
-               imgl = 180;
-               l = Zone_Affichage.left;
-
-               jQuery(".imageNumber").css({ left: l + "px"
-
-               });
-               jQuery(Parent + " #theImg IMG").css({ height: img_finale.height + "px ",
-                 width: (img_finale.width - imgl) + "px ", marginTop: "0px"
-               })
-             }
-
-           }
-
-           var theImg = document.getElementById("theMainImage");
-           if (theImg) {
-             theImg.removeAttribute("width");
-             theImg.removeAttribute("height");
-             jQuery(The_MainImage).css("width", img_finale.width + "px");
-           }
-
-           jQuery("#navThumbPrev").css({ overflow: "hidden" });
-           jQuery("#navThumbNext").css({ overflow: "hidden" });
-           n = typeof inittoolbar;
-           if (Type_Img == "map") {
-             jQuery("#navThumbNext").css({ display: 'none' });
-             jQuery("#navThumbPrev").css({ display: 'none' });
-             jQuery("#theImage").css({ marginTop: infos_imageToolBar.height + "px", marginLeft: "0px",
-               width: winwidth + "px",
-               height: winheight + "px"
-             });
-             //mapPicture 
-           }
-           try {
-             if (theme.match(RegExp("gally", "gi"))) {
-               if (typeof inittoolbar == "function") {
-                 if (typeof (currentTab) == "undefined") inittoolbar();
-                 else initializeImageMode("resize");
-               } else {
-                 tp = gallyPP.getImageProp();
-                 if (typeof (GallyPP) == "function")
-                   gallyPP = new GallyPP();
-
-                 iph = jQuery("#imageHeaderBar").infos();
-                 jQuery("#imageToolBar").css({ top: iph.bottom + "px", position: "absolute" });
-                 jQuery("#theImage").width(winwidth);
-               }
-               //===========================================================================
-               if (jQuery("#navThumbPrev").length > 0) {
-                 jQuery("#navThumbPrevContainer").css({ left: "0px"
-                 });
-               }
-               if (jQuery("#navThumbNext").length > 0) {
-                 jQuery("#navThumbNextContainer").css({ left: "0px"
-                 });
-               }
-               //=============================================================================
-               if (!theme.match(RegExp("lapis", "gi"))) {
-                 if (typeof initializeImageMode == "function") {
-                   initializeImageMode("resize");
-                 }
-
-               }
-
-             } else if (theme.match(RegExp("simple", "g"))) {
-
-               jQuery("#imageToolBar").css({ position: "static" });
-
-               infos_imageInfoBar = jQuery("#imageInfoBar").infos();
-               if (infos_imageInfoBar.bottom < infos_img.bottom) {
-                 //   jQuery("#imageInfoBar").height(infos_img.bottom);
-               }
-
-             } else {
-
-               //    jQuery("#imageToolBar").css("position", "static");
-             }
-           } catch (e) {
-
-           }
-           zoom = img_finale.height / img_height;
-           h0 = jQuery("#content").height();
-           if (h0 == null) {
-             h0 = winheight - Zone_Affichage.top;
-           }
-           h1 = (h0 - img_finale.height) / 2;
-           //  jQuery(Parent).css({ marginTop: h1 + "px" });
-
-           zoom = parseInt(zoom * 100);
-           jQuery('#zoom ').val(zoom);
-           set_cl();
-
-
-           //  --- réglage de la hauteur de page en fonction du copyright-----------
-           if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos();
-
-           if (theme.match(RegExp("stripped", "gi"))) {
-             var TitleBox = jQuery("#imageTitleContainer");
-             if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px");
-           } else {
-
-           }
-
-
-           /*
-           if (!theme.match(RegExp("luciano", "gi"))) {
-           jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" });
-           jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" });
-           jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
-           }
-           */
-           infos_frame = jQuery(Cadre).infos();
-           if (theme.match(RegExp("stripped", "gi"))) {
-             /*
-             infos_theImageBox = jQuery("#theImageAndTitle").infos();
-             p1 = jQuery(".randomButtons").infos();
-             p2 = jQuery("#imageHeaderBar").infos();
-             p3 = infos_content.top;
-             p1 = options.imageAutosizeTitle;
-
-             jQuery("#theImage").width("width", infos_theImageBox.width + "px");
-             //jQuery("#theImageAndTitle").css("position", "relative");
-             jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px",
-             paddingTop: "0px", textAalign: "center", marginLeft: "auto"
-             });
-
-             jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px",
-             paddingTop: "0px", marginLeft: "auto"
-             }); */
-             t1 = infos_theImageBox.top;
-             l1 = infos_theImageBox.left;
-             // infos_theImageBox = jQuery(Parent).infos();
-
-           } else {
-
-             t1 = infos_frame.top;
-             l1 = infos_frame.left;
-             infos_theImageBox = jQuery(Parent).infos(); //theImage
-           }
-           infos_theImageBox.margin.margin = infos_frame.margin.margin;
-           infos_theImageBox.top = t1;
-           infos_theImageBox.left = l1;
-           //  infos_theImageBox.position = "absolute";
-
-           Window_Affichage = infos_theImageBox;
-           if (DEBUG_autosize == "_true") {
-             //   jQuery(Cadre).css("border", "solid green");
-
-             jQuery("#Debug5").css({ background: "red",
-               position: "absolute",
-               border: "green solid 2px",
-               textAlign: align_auto,
-               margin: "auto",
-               top: Window_Affichage.top + "px",
-               left: Window_Affichage.left + "px",
-               width: Window_Affichage.width + "px",
-               height: Window_Affichage.height + "px"
-             }); //red
-             jQuery("#Debug4").css({ top: infos_frame.bottom - infos_description.height + "px" }); //green
-           }
-
-           //Wait_Affichage();
-
-           return true;
-           //_____________________________________________________
-         } // Resize();
-
-
-         //======================================================================
-
-
-       });            // fin extend
-
-
-
-     } // function
-);
-
-
-/*
-* recherche la plus grande image (hauteur ou largeur)
-*/
-function Get_Img_Maxi(myobj) {
-    var w00 = 0;
-    var myImg = null;
-  
-    img = jQuery("#theMainImage");
-    if (img != null) {
-      return;
-
-    }  
-     img = jQuery(myobj);
-
-    img = jQuery('img[alt]');
-
-    jQuery(myobj).each(function (i) {
+          };
+        }
+        jQuery("#window_height").val(Window_Affichage.height);
+        jQuery("#window_width").val(Window_Affichage.width);
+
+        jQuery("#ret_autosize").trigger('ON', {
+          width: img_w,
+          height: img_h,
+          theImage: theMainImage_obj,
+          src_img: src_img,
+          window_height: Window_Affichage.height,
+          window_width: Window_Affichage.width
+        });
+      }
+    } // Wait_affichage
+
+
+
+
+
+    /*****************************************************
+    * recherche la plus grande image (hauteur ou largeur)
+    *****************************************************/
+    Get_Img_Maxi = function (myobj) {
+      var w00 = 0;
+      var myImg = null;
+
+      img = jQuery(theMainImage_obj);
+      if (img != null) {
+        return;
+
+      }
+      img = jQuery(myobj);
+
+      img = jQuery('img[alt]');
+
+      jQuery(myobj).each(function (i) {
         w0 = img_reelle.width;
         h0 = img_reelle.height;
         if (h0 > w0) w0 = h0;
         if (w0 > w00) {
-            if (!this.src.match(RegExp(".png", "g")))
-                if (!this.src.match(RegExp(thumbnail, "g"))) {
-                    myImg = this;
-                    jQuery( myImg).addClass("Image");
-                    w00 = w0;
-                }
-
-        }
-    });
-    return myImg;
-}
-
-//============================================================
-/*
-*
-*/
-
-function infos_entete(Parent) {
-
-    infos_imageToolBar = jQuery("#imageToolBar").infos();
-    if (typeof (marge_top) != "undefined") return result;
-
-    if (infos_imageToolBar.position == "absolute") {
+          if (!this.src.match(RegExp(".png", "g")))
+            if (!this.src.match(RegExp(thumbnail, "g"))) {
+              myImg = this;
+              jQuery(myImg).addClass("Image");
+              w00 = w0;
+            }
+
+        }
+      });
+      return myImg;
+    } // Get_Img_Maxi
+
+
+    /*************************************************************
+    *
+    **************************************************************/
+    infos_entete = function () {
+      infos_imageToolBar = jQuery("#imageToolBar").infos();
+      if (typeof (marge_top) != "undefined") return result;
+
+      if (infos_imageToolBar.position == "absolute") {
         jQuery("#imageToolBar").css("position", "relative");
         jQuery("#imageToolBar").css("top", 0 + "px");
-    }
-    optiontop = 0;
-
-
-    infos_imageInfoBar = jQuery("#imageInfoBar").infos();
-
-    jQuery("#" + "theImgContainer").css("marginTop", "0px");
-    infos_thePicturePage = jQuery("#thePicturePage").infos();
-    infos_theImage = jQuery(Parent).infos();
-    if (theme.match(RegExp("stripped", "gi"))) {
+      }
+      optiontop = 0;
+      infos_imageInfoBar = jQuery("#imageInfoBar").infos();
+      jQuery("#" + "theImgContainer").css("marginTop", "0px");
+      infos_thePicturePage = jQuery("#thePicturePage").infos();
+      infos_theImage = jQuery("#theImage").infos();
+      if (theme.match(RegExp("stripped", "gi"))) {
         infos_theImageAndTitle = jQuery("#theImageAndTitle").infos();
         infos_theImageBox = jQuery("#theImageBox").infos();
         optiontop = (marges_llgbo / 2) + infos_theImageAndTitle.margin.top;
-    }
-
-    if (infos_theImage.position == "relative") {
+      }
+
+      if (infos_theImage.position == "relative") {
         //--- passage relative ==> static ===/
-        jQuery(Parent).css("position", "static");
-        infos_theImage = jQuery(Parent).infos();
-
-    } else {
-
-    }
-    if (infos_theImage.position == "absolute") {
+        jQuery("#theImage").css("position", "static");
+        infos_theImage = jQuery("#theImage").infos();
+
+      } else {
+
+      }
+      if (infos_theImage.position == "absolute") {
         //--- passage absolute ==> static ===/
-        jQuery(Parent).css("position", "static");
-        infos_theImage = jQuery(Parent).infos();
-
-    }
-
-    marge_top = Math.ceil(infos_the_page.top +
-                                     infos_the_page.borderwidth.top +
-                                     infos_theImage.borderwidth.top +
-                                     infos_thePicturePage.margin.top
-                                     );
-
-    img_top = Math.ceil(infos_theImage.top +
-                        infos_theImage.padding.top +
-                        infos_theImage.borderwidth.top +
-                        infos_thePicturePage.margin.top + optiontop);
-    result = infos_imageToolBar;
-   // result.width = "20%";
-   // result.left = "40%";
-    result.marge_top = marge_top;
-    result.img_top = img_top;
-    //=== Afficher le titre de l'image sur le cadre ===
-
-
-    if (infos_llgboh2.top > 0) {
-      result.img_top = infos_llgboh2.top;
-
-    }
-    else if (marges_llgbo > 0) {
-      result.img_top -= (8);
-    }
-  
-    return result;
-
-}
-
-/* Récupère les informations sur la description.
-*
-*/
-type_src = "div";
-old_window = { width: 0, height: 0 };
-List_autosize = new Array();
-nu_img = 0;
-tempo = 0;
-//====================================================
-function infos_Description_f(Parent) {
-   // jQuery(Parent).css({ display: "block" });
-    //====== détection du type d'images ======
-    if (jQuery("#charlie").length > 0) {
-      Type_Img = "charlie";
-    }else    if (jQuery("#Panorama").length) {
+        jQuery("#theImage").css("position", "static");
+        infos_theImage = jQuery("#theImage").infos();
+
+      }
+
+      marge_top = Math.ceil(infos_the_page.top +
+                                             infos_the_page.borderwidth.top +
+                                             infos_theImage.borderwidth.top +
+                                             infos_thePicturePage.margin.top
+                                             );
+
+      img_top = Math.ceil(infos_theImage.top +
+                                infos_theImage.padding.top +
+                                infos_theImage.borderwidth.top +
+                                infos_thePicturePage.margin.top + optiontop);
+      result = infos_imageToolBar;
+      // result.width = "20%";
+      // result.left = "40%";
+      result.marge_top = marge_top;
+      result.img_top = img_top;
+      //=== Afficher le titre de l'image sur le cadre ===
+
+
+      if (infos_llgboh2.top > 0) {
+        result.img_top = infos_llgboh2.top;
+
+      }
+      else if (marges_llgbo > 0) {
+        result.img_top -= (8);
+      }
+      return result;
+    } // infos_entete
+    /*************************************************
+    * Récupère les informations sur la description.
+    *
+    *************************************************/
+    infos_Description_f = function () {
+      // jQuery("#theImage").css({ display: "block" });
+      //====== détection du type d'images ======
+      if (jQuery("#charlie").length > 0) {
+        Type_Img = "charlie";
+      } else if (jQuery("#Panorama").length) {
         Type_Img = "panorama";
-    } else if (jQuery("#pamoorama").length) {
+      } else if (jQuery("#pamoorama").length) {
         Type_Img = "pamoorama";
-     } else if (jQuery("#map").length) {
+      } else if (jQuery("#map").length) {
         Type_Img = "map";
-     } else if (jQuery("#Panorama").length) {
+      } else if (jQuery("#Panorama").length) {
         Type_Img = "panorama";
-    } else  if ( (jQuery(Parent + " iframe").length + jQuery(Parent + " object").length + jQuery(Parent + " embed").length ) > 0)  {
- 
-    if (jQuery(Parent + " object").length > 0) {     
-
-        type_src = "object";
-
-    } else if (jQuery(Parent + " embed").length > 0) {
-
-        type_src = "embed";
-
-    } else {
-
-        type_src = "iframe";
-    }
-        nbf = jQuery(Parent + " " + type_src).length;
-        frm1 = jQuery(Parent + " " + type_src).get(0) ;
+      } else if ((jQuery("#theImage" + " iframe").length + jQuery("#theImage" + " object").length + jQuery("#theImage" + " embed").length) > 0) {
+
+        if (jQuery("#theImage" + " object").length > 0) {
+
+          type_src = "object";
+
+        } else if (jQuery("#theImage" + " embed").length > 0) {
+
+          type_src = "embed";
+
+        } else {
+
+          type_src = "iframe";
+        }
+        nbf = jQuery("#theImage" + " " + type_src).length;
+        frm1 = jQuery("#theImage" + " " + type_src).get(0);
         Type_Img = "charlie";
 
         //'fb - xfbml - like - button
 
-        objs = jQuery(Parent + " div").get(0);
+        objs = jQuery("#theImage" + " div").get(0);
         if (jQuery(objs).length > 0) {
-          id_0 = jQuery(objs).attr("id");     
-        if (id_0 == "") {
-          jQuery(objs).attr("id", "charlie");
+          id_0 = jQuery(objs).attr("id");
+          if (id_0 == "") {
+            jQuery(objs).attr("id", "charlie");
+          } else {
+            if (nbf > 1) {
+              jQuery(frm1).attr("id", "charlie");
+            } else {
+              Type_Img = "img";
+            }
+          }
         } else {
-          if (nbf > 1) {
-            jQuery(frm1).attr("id", "charlie");
-          } else {
-            Type_Img = "img";
-          }           
-        }
-        } else {
-         jQuery(frm1).attr("id", "charlie");
-        }
-        
-
-    } else if (jQuery(Parent).find("img").length > 0) {
+          jQuery(frm1).attr("id", "charlie");
+        }
+
+
+      } else if (jQuery("#theImage").find("img").length > 0) {
         Type_Img = "img";
-    } else if (jQuery(Parent + "Box").find("img").length > 0) {
+      } else if (jQuery("#theImage" + "Box").find("img").length > 0) {
         Type_Img = "img";
         Parent = Parent + "Box";
-    } else if (jQuery("img").length > 0) {
+      } else if (jQuery("img").length > 0) {
         Type_Img = "img_autre";
         return;
-    } else {
+      } else {
         return;
-    }
-      //=========================================================
+      }
+      //===============  CHARLIE ==============================
       if (jQuery("#charlie").length > 0) {
         jQuery("#charlie").css({
@@ -1823,43 +1494,38 @@
         });
 
-      } 
-    // jQuery(Parent + " p:not(:contains(' ')) ").remove();
-    // jQuery(Parent + " p:(:contains('')) ").remove();
-      
-      jQuery("#llgbo").trigger("ON");
-      llgboframe = infos_llgbo;
-
-    marges_llgbo = 0;
-
-    if (llgboframe.height > 0) {
-      marges_llgbo = llgboframe.borderwidth.left * 2;
-
-    }
-
-      Bandeau_t = infos_entete(Parent);
-
-    Bandeau = Bandeau_t.img_top;
-    infos_theImgContainer = jQuery("#" + "theImgContainer").infos();
-    infos_description = jQuery("#" + "description").infos();
-    //=============================================================================
-    //   jQuery(Parent + " p").css({ padding: "0px", margin: "0px "    });
-    if (theme.match(RegExp("simple", "gi"))) {
-        jQuery(Parent).css({ padding: "0px",
-            marginLeft: "0px",
-            marginRight: "auto",
-            marginTop: "0px",
-            marginBottom: "0px"
+      }
+      //================ LLGBO ======================
+      marges_llgbo = 0;
+      if (jQuery("#llgbo").length > 0) {
+        jQuery("#llgbo").trigger("ON");
+        if (infos_llgbo.height > 0) {
+          marges_llgbo = infos_llgbo.borderwidth.left * 2;
+        }
+      }
+
+      Bandeau_t = infos_entete();
+      Bandeau = Bandeau_t.img_top;
+      infos_theImgContainer = jQuery("#" + "theImgContainer").infos();
+      infos_description = jQuery("#" + "description").infos();
+      //=============================================================================
+      //   jQuery("#theImage" + " p").css({ padding: "0px", margin: "0px "    });
+      if (theme.match(RegExp("simple", "gi"))) {
+        jQuery("#theImage").css({ padding: "0px",
+          marginLeft: "0px",
+          marginRight: "auto",
+          marginTop: "0px",
+          marginBottom: "0px"
 
         });
-    }
-
-
-    if (theme.match(RegExp("luciano", "g"))) {
+      }
+
+
+      if (theme.match(RegExp("luciano", "g"))) {
         jQuery("#imageContainer").css({ height: "auto" });
-        The_MainImage = jQuery(Parent + " #theImg img");
-        infos_img = jQuery(The_MainImage).infos();
-
-
-    } else if (Type_Img == "map") {
+        theMainImage_obj = "#theImage" + " #theImg img";
+        infos_img = jQuery(theMainImage_obj).infos();
+
+
+      } else if (Type_Img == "map") {
 
         infos_map = jQuery("#mapPicture").infos();
@@ -1867,13 +1533,13 @@
 
         jQuery("#map").css({ left: marge_left + "px", padding: "0px",
-            marginLeft: "0px",
-            marginRight: "4px",
-            marginTop: "0px",
-            marginBottom: "0px",
-            position: "relative"
+          marginLeft: "0px",
+          marginRight: "4px",
+          marginTop: "0px",
+          marginBottom: "0px",
+          position: "relative"
         });
 
-        The_MainImage = jQuery("#map");
-        infos_img = jQuery(The_MainImage).infos();
+        theMainImage_obj = "#map";
+        infos_img = jQuery(theMainImage_obj).infos();
 
 
@@ -1887,5 +1553,5 @@
         }
 
-        if (tp!=undefined) {
+        if (tp != undefined) {
           if (obj_charlie.length > 0)
             tp = jQuery("object").attr("type") || jQuery("object").prop("type");
@@ -1894,5 +1560,5 @@
         }
 
-     if (tp == 'application/x-shockwave-flash') {
+        if (tp == 'application/x-shockwave-flash') {
           jQuery("#charlie").css({
             paddingTop: "0px",
@@ -1902,86 +1568,82 @@
           });
         } else {
-        
-        }
-
-        var MainImage = jQuery("#theMainImage");
+
+        }
+
+        var MainImage = jQuery(theMainImage_obj);
 
         if (MainImage.length == 0) {
-          The_MainImage = jQuery("#charlie");
-          infos_img = jQuery(The_MainImage).infos();
+          theMainImage_obj = "#charlie";
+          infos_img = jQuery(theMainImage_obj).infos();
         } else {
-          The_MainImage = jQuery("#theMainImage");
-          infos_img = jQuery(The_MainImage).infos();
-          
-        }
- 
- 
-    } else if (jQuery(Parent + " embed").length > 0) {
-    if (jQuery("#theMainImage").lenght == 0) {
-      The_MainImage = jQuery(Parent + " embed");
-      infos_img = jQuery(The_MainImage).infos();
-      jQuery(Parent + " embed").width({ width: infos_img.width + "px", height: infos_img.height + "px" });
-    } else {
-      The_MainImage = jQuery("#theMainImage");
-      infos_img = jQuery(The_MainImage).infos();
-      Type_Img == "charlie"
-      if (infos_img.width == 0) {
-        The_MainImage = jQuery("#theMainImage");
-        infos_img = jQuery(The_MainImage).infos();
-
-      }
-    }
-
-    } else if (Type_Img == "pamoorama") {
+
+          infos_img = jQuery(theMainImage_obj).infos();
+
+        }
+
+
+      } else if (jQuery("#theImage" + " embed").length > 0) {
+        if (jQuery(theMainImage_obj).lenght == 0) {
+          theMainImage_obj = "#theImage" + " embed";
+          infos_img = jQuery(theMainImage_obj).infos();
+          jQuery("#theImage" + " embed").width({ width: infos_img.width + "px", height: infos_img.height + "px" });
+        } else {
+
+          infos_img = jQuery(theMainImage_obj).infos();
+          Type_Img == "charlie"
+          if (infos_img.width == 0) {
+
+            infos_img = jQuery(theMainImage_obj).infos();
+
+          }
+        }
+
+      } else if (Type_Img == "pamoorama") {
         if (!nopano) {
-            Wait_pamoorama();
-            return infos_description;
-        }
-        The_MainImage = jQuery("#pamoorama");
-        infos_img = jQuery(The_MainImage).infos();
+          Wait_pamoorama();
+        }
+        infos_img = jQuery(theMainImage_obj).infos();
         infos_footer = jQuery("#pamoorama_footer").infos();
-        infos_img.height = parseInt(img_reelle.height) + parseInt(infos_footer.height);
+
+        infos_img.height += parseInt(infos_img.height) + parseInt(infos_footer.height);
 
       } else {
-        var MainImage = jQuery("#theMainImage");
+        var MainImage = jQuery(theMainImage_obj);
 
         if (MainImage.length == 0) {
-          The_MainImage = jQuery(Parent + " img[alt]");
+          theMainImage_obj = "#theImage" + " img[alt]";
         } else {
-          The_MainImage = MainImage;   
-        }
-
-      
-        if (!The_MainImage)
-            The_MainImage = jQuery(Parent);   // sans img ??
-        if (The_MainImage.length > 1) {
-        The_MainImage = The_MainImage[0];
-          }
-
-        infos_img = jQuery(The_MainImage).infos();
-    }
-    //=====================================================================================
-
-    switch (infos_img.position) {
+
+        }
+
+
+        if (!theMainImage_obj)
+          theMainImage_obj = "#theImage";   // sans img ??
+
+        infos_img = jQuery(theMainImage_obj).infos();
+      }
+      //=====================================================================================
+
+      switch (infos_img.position) {
         case "relative":
-            break;
+          break;
         case "static":
-            break;
+          break;
         case "absolute":
-            break;
+          break;
         case "":
-            break;
+          break;
         default:
-            break;
-    }
-
-    infos_description.marge = {
+          break;
+      }
+
+      infos_description.marge = {
         bottom: infos_img.padding.bottom + infos_img.margin.bottom + infos_img.borderwidth.bottom,
         top: infos_img.padding.top + infos_img.borderwidth.top + infos_img.margin.top
-    }
-
-    if (llgboframe.height > 0) infos_img = llgboframe; // format de l'image+largeur du cadre
-
-    if (theme.match(RegExp("luciano", "g"))) {
+      }
+
+      if (infos_llgbo.height > 0) infos_img = infos_llgbo; // format de l'image+largeur du cadre
+
+      if (theme.match(RegExp("luciano", "g"))) {
 
         infos_theImgContainer = jQuery("#imageContainer").infos();
@@ -1991,35 +1653,35 @@
 
         if (infos_slidshowToolBar.height > 0) {
-            correction = (infos_slidshowToolBar.height);
-            infos_description.top = infos_img.bottom;
-            infos_description.bottom = jQuery("#copyright").infos().top;
+          correction = (infos_slidshowToolBar.height);
+          infos_description.top = infos_img.bottom;
+          infos_description.bottom = jQuery("#copyright").infos().top;
         }
 
         //=========================================================
-    } else if (theme.match(RegExp("stripped", "gi"))) {
+      } else if (theme.match(RegExp("stripped", "gi"))) {
         //options.imageAutosize
-          //options.imageMargin
-          jQuery("#content").css({paddingTop:"5px"});
-    infos_content = jQuery("#content").infos();
+        //options.imageMargin
+        jQuery("#content").css({ paddingTop: "5px" });
+        infos_content = jQuery("#content").infos();
         if (options.imageAutosizeTitle == false) {
-            infos_description.top =   infos_theImageBox.bottom ;
-
-            infos_description.bottom =infos_HeaderBar.margin.top+ infos_description.top +
-                                    infos_description.borderwidth.top +
-                                    infos_description.borderwidth.bottom +
-                                      options.imageAutosizeMargin*2 +
-                                    (marges_llgbo / 2)+4;
+          infos_description.top = infos_theImageBox.bottom;
+
+          infos_description.bottom = infos_HeaderBar.margin.top + infos_description.top +
+                                            infos_description.borderwidth.top +
+                                            infos_description.borderwidth.bottom +
+                                              options.imageAutosizeMargin * 2 +
+                                            (marges_llgbo / 2) + 4;
 
         } else {
 
 
-            infos_description.top = infos_theImageBox.bottom -
-                        infos_content.top +
-                        options.imageAutosizeMargin * 2  +
-                        (marges_llgbo / 2)
-                                ;
-            infos_description.bottom = jQuery("#tabZone").infos().top +
-                        infos_theImageAndTitle.margin.top;
-           if (msie == true) infos_description.bottom -= 4;
+          infos_description.top = infos_theImageBox.bottom -
+                                infos_content.top +
+                                options.imageAutosizeMargin * 2 +
+                                (marges_llgbo / 2)
+                                        ;
+          infos_description.bottom = jQuery("#tabZone").infos().top +
+                                infos_theImageAndTitle.margin.top;
+          if (msie == true) infos_description.bottom -= 4;
         };
         check_desc_v = true;
@@ -2030,58 +1692,86 @@
         }
         infos_description.bottom = infos_theImage.bottom; //482
-        infos_description.top = infos_img.height + infos_theImage.top ; //410+62
+        infos_description.top = infos_img.height + infos_theImage.top; //410+62
         // infos_description.bottom -= infos_img.top;
+      }
+      //
+
+      infos_description.height = infos_description.bottom - infos_description.top;
+
+      if (check_desc_v == false) {
+        infos_description.height = 0;
+      }
+
+      Debug_pos();
+
+      //cl_visible=false ;
+      return infos_description;
+    } //infos_Description_f
+
+    //=======================================================================================
+    Debug_info = function (index, infos, nom) {
+      if (infos.height > 0) {
+        message = browser.browser + " -- > Info : " + nom + " " + infos.id + "\n" +
+                         "Info nodeName: " + infos.nodeName + "\n" +
+                         "Info width: " + infos.width + "\n" +
+                         "Info height: " + infos.height + "\n" +
+                         "Info top: " + infos.top + "\n" +
+                         "Info left: " + infos.left + "\n" +
+                         "Info position: " + infos.position + "\n";
+        myDebug = { id: "Debug" + index, texte: message,
+          css: {
+            color: "black",
+            opacity: "0.5",
+            position: "absolute",
+            height: infos.height || 100 + "px",
+            width: infos.width || 300 + "px",
+            left: infos.left || 0 + "px",
+            border: "solid 1px green",
+            top: infos.top + "px"
+          }
+        }
+        return myDebug;
+      } else {
+        if (typeof old_messages == "undefined") {
+          old_messages = new Array();
+
+        }
+        if (infos != "" && infos != "undefined") {
+          nc0 = old_messages[index];
+
+          if (typeof nc0 != "undefined") {
+            nc0 = old_messages[index].toString().split("<br />");
+            if (nc0.length > 3) nc0.shift();
+
+            old_messages[index] = nc0.join("<br />");
+          }
+          old_messages[index] += " : " + nom + " -- > " + infos + "<br />";
+
+          message = browser.browser + old_messages[index];
+
+          myDebug = { id: "Debug" + index, texte: message,
+            css: {
+              color: "black",
+              opacity: "1.0",
+              position: "absolute",
+              align: "left",
+              height: 100 + "px",
+              width: 800 + "px",
+              left: 300 + "px",
+              border: "solid 1px green",
+              top: 0 + "px"
+            }
+          }
+        }
+
+        return myDebug;
+      }
+
+
     }
-    //
-
-    infos_description.height =   infos_description.bottom - infos_description.top;
-
-    if (check_desc_v == false) {
-        infos_description.height = 0;
-    }
-
-    Debug_pos();
-
-    //cl_visible=false ;
-    return infos_description;
-}
-
-//====================================================
-function Debug_info(index, infos, nom) {
-
-    if (infos.height > 0) {
-
-        message = browser.browser + " -- > Info : " + nom + " " + infos.id + "\n" +
-                 "Info nodeName: " + infos.nodeName + "\n" +
-                 "Info width: " + infos.width + "\n" +
-                 "Info height: " + infos.height + "\n" +
-                 "Info top: " + infos.top + "\n" +
-                 "Info left: " + infos.left + "\n" +
-                 "Info position: " + infos.position + "\n";
-
-        myDebug = { id: "Debug" + index, texte: message,
-            css: {
-                color: "black",
-                opacity: "0.5",
-                position: "absolute",
-                height: infos.height || 100 + "px",
-                width: infos.width || 300 + "px",
-                left: infos.left || 0 + "px",
-                border: "solid 1px green",
-                top: infos.top + "px"
-
-            }
-        }
-        return myDebug;
-    } else {
-        return null;
-    }
-
-
-}
-//====================================================
-function Debug_pos() {
-  return;
-    if (DEBUG_autosize == "true") {
+    //====================================================
+    function Debug_pos() {
+      return;
+      if (DEBUG_autosize == "true") {
 
         jQuery("[id ^='Debug']").show();
@@ -2095,326 +1785,783 @@
 
         affiche_debug({
-            Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"),
-            Debug4: Debug_info(4, infos_description, "infos_description"),
-            Debug5: Debug_info(5, infos_img, "infos_img")
+          Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"),
+          Debug4: Debug_info(4, infos_description, "infos_description"),
+          Debug5: Debug_info(5, infos_img, "infos_img")
         });
+      }
     }
-}
-
-function affiche_debug(aff_infos) {
-    jQuery(jQuery("[id ^='Debug']")).each(function (i) {
+    //==========================================================
+    affiche_debug = function (aff_infos) {
+      jQuery(jQuery("[id ^='Debug']")).each(function (i) {
         if (aff_infos[this.id]) {
-            if (aff_infos[this.id].css) {
-                jQuery("#" + this.id).css(aff_infos[this.id].css);
-                jQuery("#" + this.id).text(aff_infos[this.id].texte);
-            }
-        }
-    });
-    return;
-
-}
-
-
-
-
-jQuery(function () {
-  jQuery('#pamoorama').live('ON', function (e) {
-    jQuery(jQuery('.debug').get(1)).trigger('ON');
-    if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) {
-      Bandeau_bas = infos_Description_f(Parent);
-      Bandeau = Bandeau_bas.top;
-      old_window = { width: 0, height: 0 };
-      jQuery(window).resize();
-
+          if (aff_infos[this.id].css) {
+            jQuery("#" + this.id).css(aff_infos[this.id].css);
+            jQuery("#" + this.id).html(aff_infos[this.id].texte);
+          }
+        }
+      });
+      return;
     }
-
-  });
-  //=============================================================
-
-
-  jQuery("#infoSwitcher").click(function () {
-    jQuery("#llgbo").trigger("ON");
-    jQuery("#theImage").css({ textAlign: "center" });
-    nds = jQuery("#imageInfos").css("display");
-
-    Zone_image = Calcul_Image(nds != "none");
-    jQuery("#theMainImage").width(Zone_image.image.width);
-    jQuery("#theMainImage").height(Zone_image.image.height);
-
-    jQuery("#theImage").width(Zone_image.container.width);
-    jQuery("#theImage").height(Zone_image.container.height);
-    Set_Map(nds);
-
-  });
-
-  jQuery('#ret_autosize').live('ON', function (e) {
-    if (nu_img == "") nu_img = 8;
-    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
-
-  });
-
-
-  jQuery("#reset").click(function () {
-    location.reload();
-  });
-
-  //=====================================================================
-  // jQuery("#llgbo").trigger("ON");
-  jQuery("#llgbo").live('ON', function (e) {
-    infos_llgbo = jQuery("#llgbo").infos();
-    //llgboframe 
-    marges_llgbo = 0;
-
-    if (infos_llgbo.height > 0) {
-      ll2 = jQuery("#llgbo div:last").infos();
-      ll1 = jQuery("#llgbo div:first").infos();
-      ll2 = "";
-      jQuery("#llgbo div").each(function (i) {
-        if (this.id == "") return;
-        var llgbo_frame = document.getElementById(this.id);
-        this.removeAttribute("width");
-        this.removeAttribute("height");
-        ll2 = this;
+    //===========================================
+    //
+    //===========================================
+    Set_Map = function (nds) {
+      p0 = jQuery("#map").position();
+      if (!p0) return;
+
+      infos_map = jQuery("#map").infos();
+      // if (infos_map.width == (Zone_image.container.width - p0.left))   return ;
+      nds = jQuery("#imageInfos").css("display");
+      if (nds != "none") {
+        p2 = jQuery("#infoSwitcher").infos();
+        p0.left += 35;
+      }
+      jQuery("#map").width(Zone_image.container.width - p0.left);
+      jQuery("#map").css({ position: "absolute", height: Zone_image.container.height + "px" });
+    }
+    //=====================================
+    //
+    //=====================================
+    theImage_init = function (Obj) {
+      if (jQuery("#derivativeSwitchBox").length > 0) {
+        id3 = jQuery("#derivativeCheckedAutosize");
+
+
+        var pi = jQuery("#derivativeSwitchBox > span ");
+        var px = jQuery(".derivativeSizeDetails ");
+
+        i = 0;
+        n = 0;
+        var pt = new Array();
+        jQuery("#derivativeSwitchBox a").each(function (i) {
+          href_path = jQuery(this).attr("href");
+          if (href_path.match(RegExp("auto", "gi"))) return true;
+          pt[i] = href_path.split("'");
+        });
+
+        th = jQuery(window).height();
+        tw = jQuery(window).width();
+
+        nds = jQuery("#imageInfos").css("display"); //inline-block 
+        Zone_image = Calcul_Image(false);
+        n0 = 0;
+        n1 = 0;
+        t0 = 0;
+        th = th - Zone_image.top;
+        tw = Zone_image.container.width;
+        th = Zone_image.container.height;
+        n = 0;
+
+        jQuery(".derivativeSizeDetails").each(function (i) {
+          vn = jQuery(this).text().replace("(", "").replace(")", "").split("x");
+          h0 = parseInt(vn[1]);
+          w0 = parseInt(vn[0])
+          if (h0 > th) {
+            n = i;
+            return false;
+          }
+          if (w0 > tw) {
+            n = i;
+            return false;
+          }
+          n++;
+        });
+
+
+        if (n > pt.length - 1) n = pt.length - 1; // format le plus grand
+        if (n < 0) n = 0; // format le plus grand
+
+
+
+        id_en_cours = pt[n][1];
+        last_map = pt[n][5];
+        var theImg = document.getElementById("theMainImage");
+
+        if (id3.length > 0) {
+          if (theImg.useMap.match(RegExp("map", "gi"))) return true;
+              changeImgSrc(id_en_cours, last_map, "Autosize");
+        } else {
+
+          new_html = '<br /><span class="switchCheck" id="derivativeCheckedAutosize" style="visibility:hidden" >&#x2714; </span>';
+          new_html += '<a href="javascript:changeImgSrc(\'' + id_en_cours + '\', \'' + last_map + '\', \'Autosize\') ">';
+          new_html += 'Autosize<span class="derivativeSizeDetails"> - Autosize</span>  </a>';
+          jQuery("#derivativeSwitchBox br:last").before(new_html);
+
+          theImg.useMap = typeMap;
+          if (theImg.useMap.match(RegExp("map", "gi"))) {
+            return true
+          };
+          jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
+          jQuery('#derivativeCheckedAutosize').css('visibility', 'visible');
+
+          if (theImg) {
+            theImg.removeAttribute("width");
+            theImg.removeAttribute("height");
+            theImg.src = id_en_cours;
+            theImg.useMap = "Autosize";
+            return true;
+          }
+        }
+
+
+        if (nu_img == "") nu_img = 7;
+      }
+      return true;
+
+      p2 = jQuery("#infoSwitcher").css("display");
+      Set_Map(p2);
+      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+      Autosize_resize(true);
+    };
+
+    //===============================================================
+    //  Fonctions générales
+    //===============================================================
+
+
+    /*************************************************
+    * correction pamoorama
+    *************************************************/
+    Set_Pamoorama = function () {
+      if (Type_Img == "pamoorama") {
+        if (typeof myPamoorama == "undefined") {
+          return;
+        }
+
+
+        infos_pamoorama = jQuery("#pamoorama").infos();
+        infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
+        infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
+        infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
+        infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
+        infos_frame = jQuery(myPamoorama.frame).infos();
+
+
+        //====================================================
+        jQuery("#pamoorama").css({
+          marginLeft: "auto",
+          marginRight: "auto"
+          //  height: Zone_Affichage.height + "px" , sinon déclenchement panorama sur la hauteur;
+        });
+
+        infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
+        infos_pamoorama = jQuery("#pamoorama").infos();
+
+
+
+
+        marges_w = infos_pamoorama.borderwidth.left +
+                          infos_pamoorama.margin.left +
+                          infos_pamoorama.borderwidth.right +
+                          infos_pamoorama.margin.right;
+
+        marges_h = 10 +
+                          infos_pamoorama.borderwidth.top +
+                          infos_pamoorama.margin.top +
+                          infos_pamoorama.borderwidth.bottom +
+                          infos_pamoorama.margin.bottom;
+        marges_h += infos_pamoorama_footer.borderwidth.top +
+                          infos_pamoorama_footer.margin.top +
+                          infos_pamoorama_footer.borderwidth.bottom +
+                          infos_pamoorama_footer.margin.bottom;
+
+        jQuery("#pamoorama").css({
+          width: ""
+        });
+
+        outter_height = Zone_image.container.height - infos_pamoorama_footer.height - marges_h;
+        Zoom_pano = outter_height / Zone_image.height_init;
+
+        new_image = { height: Math.ceil(Zone_image.height_init * Zoom_pano),
+          width: Math.ceil(Zone_image.width_init * Zoom_pano)
+        }
+
+        jQuery("#pamoorama_inner1").css({
+          "transform": "scale(" + Zoom_pano + ")",
+          "-ms-transform": "scale(" + Zoom_pano + ")", /* IE 9 */
+          "-webkit-transform": "scale(" + Zoom_pano + ")", /* Safari and Chrome */
+          "-o-transform": "scale(" + Zoom_pano + ")", /* Opera */
+          "-moz-transform": "scale(" + Zoom_pano + ")", /* Firefox */
+          "transform-origin": "0 0",
+          "-ms-transform-origin": "0 0", /* IE 9 */
+          "-webkit-transform-origin": "0 0", /* Safari and Chrome */
+          "-moz-transform-origin": "0 0", /* Firefox */
+          "-o-transform-origin": "0 0", /* Opera */
+          "background-size": "100%"
+        });
+        jQuery("#pamoorama_inner").css({ width: new_image.width, height: new_image.height, "background-size": "100%"
+        });
+
+        //  jQuery("#pamoorama_inner").width(Zone_image.width_init * Zoom_pano);
+        //  jQuery("#pamoorama_inner").height(Zone_image.height_init * Zoom_pano);
+
+
+        //---------- test largeur image 
+        new_width = Zone_image.container.width;
+        if (new_width > new_image.width) {
+          new_width = new_image.width;
+          jQuery("#pamoorama_outter").css({
+            position: 'absolute',
+            align: "center",
+            margin: "auto"
+          });
+        }
+        outter_width = new_width;
+
+
+        //  jQuery("#pamoorama_thumb").width(200 /  Zone_image.zoom);
+        jQuery("#pamoorama_thumb").css({ "width": "" });
+        jQuery("#pamoorama_outter").css({
+
+          align: 'center',
+          margin: 'auto',
+          width: outter_width + "px",
+          height: outter_height + "px"
+        });
+        //============= Mise à l'echelle ==================
+        jQuery("#pamoorama_footer").css({
+          width: Zone_image.container.width + "px"
+        });
+
+
+        jQuery("#pamoorama_thumb").width(200);
+        window.myPamoorama.options.width = Math.ceil(Zone_image.container.width);
+        //==================================================================
+        new_max_left = new_image.width - outter_width;
+        //   jQuery(window.myPamoorama.inner).width(Zone_image.width_init* Zoom_pano);
+        //    jQuery(window.myPamoorama.inner).height(Zone_image.height_init * Zoom_pano);
+
+
+
+        window.myPamoorama.outter.scrollTo(new_max_left, 0);
+
+        window.myPamoorama.autoScrollFx.to = new Array(new_max_left, 0);
+        window.myPamoorama.ratio = Math.ceil(new_image.width / 200);
+        window.myPamoorama.imageWidth = new_image.width;
+        window.myPamoorama.imageHeight = new_image.height;
+
+        //  200 = new_image.width
+        thumb_z = (Zone_image.container.width / window.myPamoorama.ratio);
+        thumb_h = (new_image.height / window.myPamoorama.ratio) * Zoom_pano;
+
+        jQuery("#pamoorama_frame").css({
+          width: thumb_z + "px"
+
+        });
+
+        window.myPamoorama.frame.setStyle('width', thumb_z);
+      } // test img
+    } // Set_Pamoorama
+    /*********************************************************/
+
+    Toggle_bp = function () {
+      cl_visible = !cl_visible;
+      Autosize_resize();
+      Wait_Affichage();
+      set_cl();
+    }
+    //====================================
+    // 
+    //====================================
+    set_cl = function () {
+      if (typeof cl_visible == "undefined") return;
+      if (typeof src1 == "undefined") return;
+
+      if (cl_visible) src = src1;
+      else src = src2;
+
+      if (cl_visible) {
+        src_info = src3;
+        src_infos_1 = src3;
+      }
+      else {
+        src_info = src4;
+        src_infos_1 = src5;
+      }
+      Zone_image.zoom = (Zone_image.image.height / Zone_image.height_init);
+      zoom_cl = parseInt(100 * Zone_image.zoom);
+      jQuery('#zoom ').val(zoom_cl);
+      zoom_cl = jQuery('#zoom ').val();
+      jQuery('#bp_cla').attr('alt', src_info);
+      jQuery('#bp_cla').attr('title', src_info);
+      jQuery('#bp_cla').attr('Stitle', src_info);
+      jQuery('#bp_cla').attr('Stip', zoom_cl + "%");
+
+      //jQuery('#bp_cla span').text(src_infos_1 +"    "+ zoom + "%");
+      jQuery('#bp_cla span').text(zoom_cl + "%");
+      bp_scr = jQuery('#bp_img_cla');
+
+      if (bp_scr.length > 0) {
+        src_enc = bp_scr.attr("src");
+        if (!src_enc.match(src)) {
+          bp_scr.get(0).src = src;
+          jQuery('#bp_img_cla').attr('alt', src_info);
+          jQuery('#bp_img_cla').attr('title', src_info);
+        }
+      }
+    }
+    //====================================
+    // 
+    //====================================
+    Calcul_Image = function (all_width) {
+      // theImageAndInfos(jaune) -> theImage(vert) -> [llgbo] -> theMainImage
+      // + infos_imageInfos(red)
+      infos_body = jQuery("body").infos(); // thePicturePage
+      infos_the_page = jQuery("#the_page").infos();
+      // theHeader
+      // 
+      infos_content = jQuery("#content").infos();
+      // imageHeaderBar
+      // imageToolBar imageInfoBar
+      infos_imageInfoBar = jQuery("#imageInfoBar").infos();
+      infos_imageToolBar = jQuery("#imageToolBar").infos();
+      //theImageAndTitle
+      infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
+      if (infos_theImageAndInfos.width == 0)
+        infos_theImageAndInfos = jQuery("#theImageAndTitle").infos();
+      infos_theImage = jQuery("#theImage").infos();
+      infos_imageInfos = jQuery("#imageInfos").infos();
+      infos_theMainImage = jQuery(theMainImage_obj).infos();         // Image
+      infos_theMainImage.src = jQuery(theMainImage_obj).attr("src");
+      //  infos_llgbo = jQuery("#llgbo").infos();
+      // commentContent
+      // copyright
+      pos_bottom = infos_content.bottom - infos_content.margin.bottom;
+      pos_left = infos_theImage.left;
+      x = infos_body.left;
+      imageInfos_width = jQuery("#imageInfos").css("width");
+
+      if (theme.match(RegExp("stripped", "gi"))) {
+        infos_the_page.margin.left = 20;  //taille fleche
+        infos_the_page.margin.right = 20;
+      }
+
+      retrait_w = Math.ceil(infos_theImage.margin.left
+                                + infos_theImage.margin.right
+                                + infos_theImage.borderwidth.left
+                                + infos_theImage.borderwidth.right
+                                + infos_theImage.padding.left
+                                + infos_theImage.padding.right);
+
+      retrait_w += Math.ceil(infos_the_page.margin.left
+                                + infos_the_page.margin.right
+                                + infos_the_page.borderwidth.left
+                                + infos_the_page.borderwidth.right
+                                + infos_the_page.padding.left
+                                + infos_the_page.padding.right);
+
+      retrait_w += Math.ceil(infos_body.margin.left +
+                                infos_body.margin.right);
+
+
+
+      pos_top = Math.ceil(infos_theImageAndInfos.top
+                     + infos_theImageAndInfos.margin.top
+                     + infos_content.borderwidth.top
+                     + infos_content.borderwidth.bottom
+                     + infos_content.margin.top
+                     + infos_content.margin.bottom);
+
+      retrait_h = Math.ceil(pos_top
+                         + infos_theImage.margin.top
+                                + infos_theImage.margin.bottom
+                                + infos_theImage.borderwidth.top
+                                + infos_theImage.borderwidth.bottom
+                                + infos_theImage.padding.top
+                                + infos_theImage.padding.bottom);
+
+
+
+      jQuery(theMainImage_obj).css({ margin: "auto"
       });
 
-      ll2 = jQuery(ll2).infos();
-      ll1 = ll1.width;
-      ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right;
-      marges_llgbo = (ll1 - ll2);
-      infos_llgbo.borderwidth.left = parseInt(marges_llgbo / 2);
-      infos_llgbo.borderwidth.right = parseInt(marges_llgbo / 2);
-      infos_llgbo.borderwidth.top = parseInt(marges_llgbo / 2);
-      infos_llgbo.borderwidth.bottom = parseInt(marges_llgbo / 2);
-
-      infos_llgboh2 = jQuery("#llgboh2").infos();
-
-
-    }
-
-
-  });
-  //=====================================================================
-  // jQuery("#theImageAndInfos").trigger("ON");
-  jQuery("#theImageAndInfos").live('ON', function (e) {
-    infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
-
-
-  });
-  //=====================================================================
-  // jQuery("#map").trigger("ON");
-  jQuery("#mapPicture").live('ON', function (e) {
-    p2 = jQuery("#infoSwitcher").infos();
-  });
-  function Set_Map(nds) {
-    p0 = jQuery("#map").position();
-    if (!p0) return;
-
-    infos_map = jQuery("#map").infos();
-    // if (infos_map.width == (Zone_image.container.width - p0.left))   return ;
-    nds = jQuery("#imageInfos").css("display");
-    if (nds !="none") {
-      p2 = jQuery("#infoSwitcher").infos();
-      p0.left += 35;
-    }
-    jQuery("#map").width(Zone_image.container.width - p0.left);
-    jQuery("#map").css({ height: '100%' });
-  }
-
-  jQuery("#map").live('ON', function (e) {
-
-  });
-  //=====================================================================
-  // jQuery("#theImage").trigger("ON");
-  jQuery("#theImage").live('ON', function (e) {
-
-    infos_theImage = jQuery("#theImage").infos();
-
-    idi = jQuery("#theImage img").attr("src"); ;
-    id2 = jQuery("#theImage img").attr("usemap");
-    if (id2) {
-      id3 = jQuery("#derivativeCheckedAutosize");
-      id4 = id2.replace('#map', ''); // en cours
-      id0 = idi.split('-');
-      id5 = id0[id0.length - 1].split(".")[1];
-      id6 = id0[id0.length - 1];
-
-      id4 = idi.replace("-" + id0[id0.length - 1], "-xx") + "." + id5;
-      idi = id4;
-      id4 = 'xxlarge';
-      path = document.URL;
-      if (id3.length == 0) {
-
-        //derivativeCheckedxxlarge
-        jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
-        // jQuery('#derivativeChecked' + typeSave).css('visibility', 'visible');
-
-        new_html = '<br /><span class="switchCheck" id="derivativeCheckedAutosize" style="visibility:visible" >&#x2714; </span>';
-        new_html += '<a href="javascript:changeImgSrc1(\'' + idi + '\', \'' + id4 + '\', \'Autosize\') ">';
-        new_html += 'Autosize<span class="derivativeSizeDetails"> - Autosize</span>  </a>';
-
-
-        htm = jQuery("#derivativeSwitchBox")[0].innerHTML;
-        jQuery("#derivativeSwitchBox br:last").before(new_html);
-        // cl_visible = false;
-        htm1 = jQuery("#derivativeSwitchBox")[0].innerHTML;
-
-        var theImg = document.getElementById("theMainImage");
-        if (theImg) {
-
-          theImg.removeAttribute("width");
-          theImg.removeAttribute("height");
-          theImg.src = idi;
-          //  theImg.useMap =  ;
-          theImg.useMap = "Autosize";
-        }
-      }
-    }
-    if (nu_img == "") nu_img = 7;
-
-
-    jQuery().newResize(false);
-    p2 = jQuery("#infoSwitcher").css("display");
-    Set_Map(p2);
-    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
-
-  });
-  //=================================================================
-  jQuery(document).live('gallyInterfaceReady', function (e) {
-    i = jQuery(this).text();
-    jQuery(this).trigger('ON');
-  }
-
-  );
-  jQuery(Parent).live('OK', function (e) {
-    if (nu_img == "") nu_img = 7;
-    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
-    jQuery().newResize(false);
-    jQuery().newResize(false);
-
-    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
-  });
-  // Custom Event, ON to turn on a debug.
-  jQuery('.debug').live('ON', function (e) {
-
-    nu_img = jQuery(this).text();
-    jQuery('.debug').trigger('OFF');
-    jQuery(this).addClass('debugOn');
-
-  });
-
-  // On Click = debugs On
-  jQuery('.debug').live('click', function (e) {
-    i = jQuery(this).text();
-    jQuery(this).trigger('ON');
-  });
-
-  // Custom Event, Turn off a debug
-  jQuery('.debug').live('OFF', function (e) {
-    jQuery(this).removeClass('debugOn');
-  });
-
-  // on Double Click, remove the debug from the DOM
-  jQuery('.debug').live('dblclick', function () {
-    jQuery(this).fadeOut(function () { jQuery(this).remove() });
-  });
-
-  // Add another debug to the DOM
-  jQuery('#adddebugs').click(function () {
-    i = jQuery('.debug').length;
-    jQuery('<div>' + i + '</div>')
-            .addClass('debug')
-            .appendTo('#debugsContainer');
-  });
-
-  // Add 10 testing debugs to start with
-  jQuery(window).load(function () {
-    DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false";
-    if (DEBUG_autosize == "true") {
-      for (var i = 0; i < 10; i++) {
-        jQuery('#adddebugs').click();
-      }
-      jQuery(jQuery('.debug').get(i - 1)).click();
-    }
-
-
-
-    //piwigo 2.4
-    // Add another debug to the DOM 
-    jQuery('#derivativeCheckedAutosize').click(function () {
-
-
-    });
-
-    jQuery("#derivativeSwitchBox a").click(function () {
+      retrait_img = Math.ceil(infos_theMainImage.borderwidth.left
+                    + infos_theMainImage.borderwidth.right
+                    + infos_theMainImage.padding.left
+                    + infos_theMainImage.padding.right);
+      retrait_img += Math.ceil(infos_llgbo.borderwidth.right + infos_llgbo.borderwidth.right);
+
+      if (theme.match(RegExp("elegant", "gi"))) {
+        if (all_width != true) {
+          new_width = Math.ceil(8 +
+                                infos_imageInfos.width +
+                                infos_imageInfos.borderwidth.left +
+                                infos_imageInfos.borderwidth.right +
+                                infos_imageInfos.margin.left +
+                                infos_imageInfos.borderwidth.right +
+                                infos_imageInfos.padding.left +
+                                infos_imageInfos.padding.right);
+        } else {
+          new_width = 0;
+        }
+        width_theImage = (jQuery(window).width() - new_width)
+
+      } else if (theme.match(RegExp("stripped", "gi"))) {
+        width_theImage = (jQuery(window).width());
+      } else if (theme.match(RegExp("simple", "gi"))) {
+        width_theImage = infos_imageInfoBar.left + infos_theImage.left - infos_imageInfoBar.margin.left - 5;
+
+
+      } else {
+        width_theImage = (jQuery(window).width());
+      }
+
+
+      b = 0;
+
+
+      if (infos_llgbo.top > 0) {
+        if ((infos_llgbo.top - retrait_h) > 0) {
+          b = infos_llgbo.top - retrait_h;
+        } else {
+          b = infos_llgbo.top;
+        }
+      }
+      retrait_h += (b * 2)
+      height_theImage = jQuery(window).height() - retrait_h;
+      width_theImage -= retrait_w;
+      //===============================================================
+      width_theMainImage = width_theImage - retrait_img;
+      height_theMainImage = parseInt(width_theImage / rapport) - (retrait_img);
+
+      //===============================================================
+      // test débordement
+      if ((height_theMainImage) > height_theImage - (retrait_img + (b * 2))) {
+        height_theMainImage = height_theImage - (retrait_img);
+        width_theMainImage = parseInt(height_theMainImage * rapport);
+      } else {
+        width_theMainImage = width_theImage - (retrait_img);
+        height_theMainImage = parseInt(width_theMainImage / rapport);
+      }
+      //==================================================================
       var theImg = document.getElementById("theMainImage");
       if (theImg) {
-        try {
-          n = eval(this.pathname);
-        } catch (e) {
-          n = false;
-        }
-        infos_theMainImage = jQuery("#theMainImage").infos();
-        infos_theImage = jQuery("#theImage").infos();
-        theImg.removeAttribute("width");
-        theImg.removeAttribute("height");
-        rapport = parseInt(img_init.width) / parseInt(img_init.height);
-        if (n == true) {
-          old_window.width = 0; // force autosize
-          jQuery(window).resize();
+
+
+        if (theImg.useMap.match(RegExp("map", "gi"))) {
+          height_theMainImage = jQuery(theImg).height() - (retrait_img);
+          width_theMainImage = jQuery(theImg).width() - retrait_img;
+        }
+      }
+      width_theMainImage = parseInt(height_theMainImage * rapport);
+      height_theMainImage = parseInt(width_theMainImage / rapport);
+
+      height_theImage += (b * 2);
+      if (height_theImage > height_theMainImage + retrait_h) {
+        height_theImage = height_theMainImage + retrait_h;
+      }
+
+      Zone_image = {
+        image: { width: width_theMainImage,
+          height: height_theMainImage
+        },
+        container: {
+          width: width_theImage,
+          height: height_theImage
+        }
+      };
+      Zone_image.top = retrait_h;
+      Zone_image.marge = { width: retrait_w, height: retrait_h };
+
+      Zone_image.src = jQuery(theMainImage_obj).attr("src");
+
+
+      Zone_image.width_init = img_init.width;
+      Zone_image.height_init = img_init.height;
+
+      if (!Zone_image.height_init) {
+        Zone_image.height_init = parseInt(img_init.height);
+        Zone_image.rapport_init = parseInt(img_init.width) / Zone_image.height_init;
+      }
+
+      Zone_image.rapport_init = Zone_image.width_init / Zone_image.height_init;
+      Zone_image.zoom = Zone_image.image.height / Zone_image.height_init;
+
+      return Zone_image;
+    }
+
+
+    /**************************************************
+    *  onProperty
+    **************************************************/
+    onPropertyChange = function (e, obj) {
+      var el = obj;
+      attributs = el.attributes;
+      type_action = e.type;
+      style = "";
+      alt = "";
+      src = "";
+
+      if (attributs.id) id = attributs.id.value;
+      if (attributs.style) style = attributs.style.value;
+      if (attributs.alt) alt = attributs.alt.value;
+      /* Image */
+      if (attributs.src) {
+        src = attributs.src.value;
+        if (attributs.width) width = attributs.width.value;
+        if (attributs.height) height = attributs.height.value;
+      }
+      affiche_debug({
+        Debug1: Debug_info(1, type_action + " : " + src, id + " action ")
+
+      });
+
+
+      if (style)
+        switch (style) {
+        case "style.opacity":
+
+          break;
+        case "style.transform":
+
+          break;
+        case "style.display":
+
+          break;
+        case "style.color":
+
+          break;
+        case "style.width":
+          width = el.style.width;
+          break;
+        case "style.height":
+          height = el.style.height;
+          break;
+
+        case 'width':
+
+          break;
+        case 'height':
+
+          el.style.height = el.attributes.height.nodeValue + 'px';
+          el.firstChild.style.height = el.clientHeight + 'px';
+          break;
+      }
+    }
+
+
+    Autosize_resize(true);
+
+
+  });  // ready
+})(jQuery);
+
+
+  //=====================================================================
+  //
+  //  Fonctions supplémentaires
+  //
+  //=====================================================================
+  function Autosize_resize(Obj) {
+    conf = jQuery(Obj).get(0).conf;
+    Obj = jQuery(Obj).get(0).obj;
+    myWindow = jQuery("#" + conf.parent).infos();
+    if (myWindow.width == 0) myWindow = jQuery(window).infos();
+    marge_basse = 0;
+    if (conf.MargeBasse)
+      marge_basse = jQuery().Get_Val_int(conf.MargeBasse);
+    marge_top = 0;
+    if (conf.MargeHaute)
+      marge_top = jQuery().Get_Val_int(conf.MargeHaute);
+    infos_Obj = jQuery(Obj).infos();
+    h1_left = jQuery(Obj).absoluteLeft();
+    h1_top = jQuery(Obj).absoluteTop();
+
+    if (h1_top < infos_Obj.height)
+      h1 = (myWindow.height - h1_top - marge_basse - marge_top);
+    else
+      h1 = (myWindow.height - marge_basse);
+    rap = infos_Obj.height / infos_Obj.width;
+    w2 = parseInt(h1 / rap);
+    if (w2 < infos_Obj.width)
+      marginLeft = infos_Obj.left + parseInt((infos_Obj.width - w2) / 2) + "px";
+    else
+      marginLeft = "auto";
+    jQuery(Obj).css({ width: "auto", marginTop: marge_top,
+      marginLeft: "auto", marginBottom: 0 + "px",
+      verticalAlign: "middle", textAlign: "center"
+    });
+    jQuery(Obj).height(h1);
+    //=============================================================
+    if (conf.ResizePicture == "true")
+      imgs = jQuery(Obj).find("img");
+    else
+      imgs = jQuery(Obj).find("img");
+    Parent = Obj;
+
+    Obj_w = jQuery(Obj).width();
+    Obj_h = jQuery(Obj).height();
+    if (imgs.length > 0) {
+      jQuery(imgs).each(function (i) {
+        img = jQuery(this);
+        h1_top = jQuery(img).absoluteTop() - h1_top;
+        h1_bottom = Obj_h - h1_top;
+        infos_img = { width: conf.width[i], height: conf.height[i] }; //origine 
+        img_rap = conf.rap[i];
+        if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
+        h1 -= h1_top;
+        if (h1 > Obj_h - h1_top) {
+          h1 = Obj_h - h1_top;
+        }
+        w2 = parseInt(h1 * img_rap);
+        if (w2 > 0 && h1 > 0 && img.length > 0) {
+          img.height(h1);
+          img.width(w2);
+        }
+      });
+    } else {
+      imgs = jQuery(Obj).children();
+      jQuery(imgs).each(function (i) {
+        if (this.height > 0) {
+          h1_top = jQuery(this).absoluteTop() - h1_top;
+          h1_bottom = Obj_h - h1_top;
+          infos_img = { width: conf.width[i], height: conf.height[i] }; //origine 
+          img_rap = conf.rap[i];
+          if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
+          h1 -= h1_top;
+          if (h1 > Obj_h - h1_top) {
+            h1 = Obj_h - h1_top;
+          }
+          w2 = parseInt(h1 * img_rap);
+          if (w2 > Obj_w) {
+            w2 = Obj_w;
+          }
+
+          if (w2 > 0 && h1 > 0) {
+            this.height = (h1);
+            this.width = (w2);
+          }
+
+        }
+        name = this.name;
+      });
+
+
+
+    }
+
+  }
+  //===============================================
+  // Extend expression jQuery(":Autozise") ;
+  //===============================================
+  jQuery.extend(jQuery.expr[':'], {
+    // Nom du sélecteur personnalisé
+    Autosize: function (a) {
+      nd = a.nodeName;
+      n1 = a.className;
+      // personal_block
+      if (n1.match(RegExp("autosize", "gi"))) {
+        //   autosize = "MargeBasse:30px; ResizePicture:false"
+        infconf = jQuery(a).attr("autosize");
+        n1 = typeof infconf;
+        conf = { MargeBasse: 0, NoPicture: false }
+        if (n1 == "undefined") {
+
         } else {
-          nw = "100% x 100%".split("x");
-          if (jQuery(this).text().match(RegExp("x", "gi"))) {
-            nw = jQuery(this).text().split("(")[1].split(")")[0];
-            nw = nw.split("x");
-            jQuery("#theImage").css({ marginRight: "auto", marginLeft: "auto", textAlign: "center" });
-
-            wx = parseInt(nw[0]);
-            jQuery(theImg).width(wx);
-            jQuery(theImg).height(wx / rapport);
-            /*  n = jQuery("#imageInfos").css("display");
-            Zone_image = Calcul_Image(n == "none");
-            jQuery("#theImage").width(wx+(Zone_image.marge.width * 1.5));
-            jQuery("#theImage").height((wx / rapport) + Zone_image.marge.height);
-            */
-
-
-
-
-
-          }
-        }
-
-
-
-      }
-
-    });
-
-    function changeImgSrc1(url, typeSave, typeMap) {
-      var theImg = document.getElementById("theMainImage");
-      if (theImg) {
-        theImg.removeAttribute("width");
-        theImg.removeAttribute("height");
-        theImg.src = url;
-        //  theImg.useMap = "#map" + typeMap;
-        if (typeMap == "Autosize") {
-          theImg.useMap = "#" + typeMap;
-        } else {
-          theImg.useMap = "#map" + typeSave;
-        }
-        jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
-        jQuery('#derivativeChecked' + typeMap).css('visibility', 'visible');
-        document.cookie = 'picture_deriv=' + typeSave + ';path="' + cookie_path + '" ';
-      }
+          tableau = infconf.split(";");
+          for (var i = 0; i < tableau.length; i++) {
+            tableau2 = tableau[i].split(":");
+            conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]);
+          }
+          imgs = jQuery(a).find("img");
+          rap = new Array();
+          width = new Array();
+          height = new Array();
+          if (imgs.length > 0)
+            jQuery(imgs).each(function (i) {
+              img = jQuery(this);
+              rap.push((img.width() / img.height()));
+              width.push(img.width());
+              height.push(img.height());
+            });
+          else {
+            imgs = jQuery(a).children();
+            jQuery(imgs).each(function (i) {
+              if (this.height > 0) {
+                rap.push(this.width / this.height);
+                width.push(this.width);
+                height.push(this.height);
+              }
+              name = this.name;
+
+
+            });
+          }
+          conf['rap'] = rap;
+          conf['width'] = width;
+          conf['height'] = height;
+          List_autosize.push({ obj: a, conf: conf });
+          jQuery(a).css({ opacity: 0 });
+        }
+      }
+      //  Css = jQuery(a).getStyles(a);
+      return false;
+    }, // jQuery.Autosize
+    Set_Class: function (a) {
+      nd = a.nodeName;
+      if (nd == "DIV") {
+        XBrowserAddHandler(a, 'onpropertychange', onPropertyChange);
+        //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green");
+        img = jQuery(a).children("img");
+        if (img.length == 0) img = jQuery(a).find("a").children("img");
+        if (img.length > 0)
+          if (img.length == 1) {
+            if (img[0].src.match(RegExp(".png", "g")))
+              return;
+            // img[0].attachEvent('onpropertychange', onPropertyChange);
+            XBrowserAddHandler(img[0], 'onpropertychange', onPropertyChange);
+            jQuery(img).addClass("Image");
+            //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true");
+          }
+      }
+    }  //jQuery().Set_Class
+
+
+  }); // Extend expression
+
+  /**************************************************
+  * TEST
+  **************************************************/
+  /*
+  var y = 3; 
+  var txtTestBox = document.getElementById('testBox');
+  XBrowserAddHandler(txtTestBox, 'keyup', function() {
+  myFunctionRef(y) 
+  });
+  var myFunctionRef = function myFunction(x, e) {
+  var keyCode; 
+  if (!e && window.event)
+  e = window.event; 
+  if (e)
+  keyCode = (window.Event) ? e.which : e.keyCode; 
+  alert('You pressed: ' + keyCode + '. Event object is :' + e + '. x is: ' + x);
+  }
+
+  */
+  /**************************************************
+  * XBrowserAddHandler
+  **************************************************/
+  function XBrowserAddHandler(target, eventName, handlerName) {
+    if (target.addEventListener)
+      target.addEventListener(eventName, handlerName, false);
+    else if (target.attachEvent)
+      target.attachEvent("on" + eventName, handlerName);
+    else
+      target["on" + eventName] = handlerName;
+  }
+
+  /********************************************************
+  * List_autosize_resize
+  ********************************************************/
+  function List_autosize_resize(event, ui) {
+    if (typeof wait_resize == "undefined") wait_resize = false;
+    if (wait_resize == true) return;
+    wait_resize = true;
+    if (List_autosize.length == 0) return;
+    for (i = 0; i < List_autosize.length; i++) {
+      Autosize_resize(jQuery(List_autosize[i]));
     }
-
-
-  }); //on load
-});
-
-function changeImgSrc1(url, typeSave, typeMap) {
-  old_window.width = 0; // force autosize
-  jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
-  jQuery('#derivativeChecked' + typeMap).css('visibility', 'visible');
-  jQuery(window).resize();
-};
+    wait_resize = false;
+    return true;
+  }
+
Index: /extensions/Autosize/js/autosize.cookie.js
===================================================================
--- /extensions/Autosize/js/autosize.cookie.js	(revision 16578)
+++ /extensions/Autosize/js/autosize.cookie.js	(revision 16579)
@@ -54,5 +54,5 @@
  * @author Klaus Hartl/klaus.hartl@stilbuero.de
  */
-jQuery.cookie = function(name, value, options) {
+jQuery.cl_cookie = function(name, value, options) {
     if (typeof value != 'undefined') { // name and value given, set cookie
         options = options || {};
@@ -94,3 +94,5 @@
         return cookieValue;
     }
-};
+    };
+
+ 
Index: /extensions/Autosize/js/autosize.dimensions.js
===================================================================
--- /extensions/Autosize/js/autosize.dimensions.js	(revision 16578)
+++ /extensions/Autosize/js/autosize.dimensions.js	(revision 16579)
@@ -206,5 +206,5 @@
         Top = Cl_Position.top;
 
-        results = {
+        results = {src: elem.src || "none",
           position: myposition,
           top: Top,
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 16578)
+++ /extensions/Autosize/main.inc.php	(revision 16579)
Index: /extensions/Autosize/template/header_2_1.tpl
===================================================================
--- /extensions/Autosize/template/header_2_1.tpl	(revision 16578)
+++ /extensions/Autosize/template/header_2_1.tpl	(revision 16579)
@@ -4,4 +4,4 @@
 {known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js" }
 {known_script id="autosize.dimensions" src = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" }
-{known_script id="autosize.cookie" src = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" }
+{*known_script id="autosize.cookie" src = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" *}
 {/html_head}
Index: /extensions/Autosize/template/header_2_2.tpl
===================================================================
--- /extensions/Autosize/template/header_2_2.tpl	(revision 16578)
+++ /extensions/Autosize/template/header_2_2.tpl	(revision 16579)
@@ -12,5 +12,5 @@
 {combine_script id="jquery.cluetip" path = "themes/default/js/plugins/jquery.cluetip.js" require="jquery" }
 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
-{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery"}
+{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery" }
 
 
Index: /extensions/Autosize/template/picture_2_2.tpl
===================================================================
--- /extensions/Autosize/template/picture_2_2.tpl	(revision 16578)
+++ /extensions/Autosize/template/picture_2_2.tpl	(revision 16579)
@@ -1,1 +1,1 @@
-{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.cookie,conflit_script'  }
+{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,conflit_script'  }
