Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 7368)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 7369)
@@ -1,28 +1,31 @@
+var cl_visible = true;
+function Toggle_bp() {
+    cl_visible = !cl_visible;
+    if (cl_visible) src = src1;
+    else src = src2;
+    if (cl_visible) src_info = src3;
+    else src_info = src4;
+
+    jQuery('#bp_cla').attr('alt', src_info);
+    jQuery('#bp_cla').attr('title', src_info);
+
+    jQuery('#bp_img_cla').get(0).src = src;
+    jQuery('#bp_img_cla').attr('alt', src_info);
+    jQuery('#bp_img_cla').attr('title', src_info);
+    jQuery('#bp_cla').attr('Stitle', src_info);
+    jQuery('#bp_cla').attr('Stip', " ");
+    old_w = 0;
+    jQuery(window).resize();
+}
+
 jQuery(document).ready(
       function (jQuery) {
           var img_top = "0";
-          var cl_visible = true;
+
           var old_h = 0;
           var rapport = -1;
           var old_w = 0;
 
-          function Toggle_bp() {
-              cl_visible = !cl_visible;
-              if (cl_visible) src = src1;
-              else src = src2;
-              if (cl_visible) src_info = src3;
-              else src_info = src4;
-
-              jQuery('#bp_cla').attr('alt', src_info);
-              jQuery('#bp_cla').attr('title', src_info);
-
-              jQuery('#bp_img_cla').get(0).src = src;
-              jQuery('#bp_img_cla').attr('alt', src_info);
-              jQuery('#bp_img_cla').attr('title', src_info);
-              jQuery('#bp_cla').attr('Stitle', src_info);
-              jQuery('#bp_cla').attr('Stip', " ");
-              old_w = 0;
-              jQuery(window).resize();
-          }
+
           //=========================================================
 
@@ -209,5 +212,5 @@
               if (llgboframe.length > 0) {
 
-                  marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth();
+                  marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
               }
               if (theme.match(RegExp("gally", "g"))) {
@@ -220,5 +223,5 @@
               //      info_description.top 465 
               info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top;
-             
+
               if (check_desc_v != 'checked="checked"') {
                   info_description.height = 0;
@@ -436,8 +439,9 @@
               jQuery("#imageToolBar").css("top", 0 + "px");
               jQuery("#imageHeaderBar").css("top", "0px");
-
-
-              var marge_right = 0;
-              var marge_left = 0;
+              w0 = Zone_Affichage.width;
+              marge = (Zone_Affichage.width - info_ToolBar.width) / 2;
+
+              var marge_right = marge;
+              var marge_left = marge;
               if (info_content.width > 100) {
                   marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right);
@@ -446,6 +450,7 @@
               }
               else
-                  winwidth = info_ToolBar.width - 2;
-
+                  winwidth = Zone_Affichage.width;
+
+              winwidth -= (marge_right + marge_left);
               //  var marge_top = info_ToolBar.top + info_ToolBar.height;
 
@@ -678,5 +683,5 @@
               else
                   Image_height = parseInt(height_user);
-             
+
               echelle_max = parseFloat(echelle_max, '3');
               var echelle = parseFloat(Image_height / img_reelle.height, 3);
@@ -691,5 +696,5 @@
               else if (Type_Img == "map") {
                   Image_width = zone_affichage.width - marge_left - marge_right;
-                 } else {
+              } else {
                   Image_width = zone_affichage.width;
               }
@@ -699,5 +704,5 @@
               if (jQuery("#theImg").css("textAlign"))
                   align_auto = jQuery("#theImg").css("textAlign");
-              var widthmin = Image_width;
+              var widthmin = winwidth;
 
               if (check_auto_w == 'checked="checked"') {
@@ -714,4 +719,9 @@
                   widthmin -= Get_Val_int(info_img.borderwidth.left);
                   widthmin -= Get_Val_int(info_img.borderwidth.right);
+                  if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) {
+                      llgboframe = jQuery("#gbo div:first");
+                      marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth();
+                  }
+                  widthmin -=2*marges;
                   if (Image_width > widthmin) {
                       //   Image_width largeur à atteindre 
@@ -731,10 +741,6 @@
               // }
 
-              //   zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height;
 
               zoom = echelle;
-
-              //  zone_affichage.height *= zoom;
-              //  zone_affichage.width *= zoom;
               //=============LLGBO2 ===========================
               marges = 0;
@@ -742,5 +748,5 @@
               if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) {
                   llgboframe = jQuery("#gbo div:first");
-                  marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth();
+                  marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
 
                   m1 = jQuery(llgboframe).outerHeight();
@@ -755,15 +761,13 @@
                           _width = maxWidth;
                       } else {
-                          _width = Image_width;
+                          _width = Image_width - (marges/2);
                       }
 
-
-                      jQuery("#gbo").outerWidth(_width);
-                      jQuery("#gbo").outerHeight(Image_height);
-                      jQuery("#gbo").css("width", (_width) + "px");
-                      jQuery("#gbo").css("height", (Image_height) + "px");
-
-                      Image_height -= marges;
-                      Image_width -= marges;
+                        jQuery("#gbo").outerWidth(_width);
+                        jQuery("#gbo").css("width", (_width) + "px");
+                        jQuery("#gbo").css("height", (Image_height) + "px");
+                        jQuery("#gbo").outerHeight(Image_height);
+                        Image_width = jQuery("#gbo div:last").innerWidth();
+                        Image_height = parseInt(Image_width / rapport);
 
                   } else {
@@ -814,6 +818,5 @@
               }
 
-              // jQuery(Cadre).height(zone_affichage.height);
-              //  jQuery(Cadre).height(mb-zone_affichage.top);
+  
               jQuery(Cadre).width(zone_affichage.width);
               //==============================================================
@@ -866,4 +869,5 @@
               } else if (Type_Img == "pamoorama") {
                   return;
+
                   marge_left += 0;
                   new_width = zone_affichage.width - marge_right - marge_left;
@@ -943,5 +947,5 @@
 
       } // function
-);                                                                                                                                                                                                                                                                                                            // ready
+);                                                                                                                                                                                                                                                                                                                 // ready
     /*
 *
