Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl	(revision 7393)
+++ /extensions/Autosize/admin/template/admin.tpl	(revision 7394)
@@ -84,8 +84,12 @@
         <td style="visibility:visible">{'cl_autosize_width'|@translate}
          <input type="checkbox" name="check_auto_w" value="on"  {$check_auto_w}  /></td>
+         <td style="visibility:visible">{'cl_autosize_enabled'|@translate}
+        </td>
+
         <tr>
         <td>{'user_status_webmaster'|@translate}</td>
         <td><input name="webmaster_height" id="Text7" type="text"  value ="{$webmaster_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="webmaster_width" id="Text8" type="text"  value ="{$webmaster_width}" /></td>
+        <td style="visibility:{$visible_w}"><input name="webmaster_width" id="webmaster_width" type="text"  value ="{$webmaster_width}" /></td>
+         <td ><input name="webmaster_enabled" id="webmaster_enabled" type="checkbox"  value ="on" {$webmaster_enabled}  /></td>
         </tr>
         <tr>
@@ -93,19 +97,23 @@
         <td><input name="admin_height" id="admin_height" type="text"  value ="{$admin_height}" /></td>
         <td style="visibility:{$visible_w}"><input name="admin_width" id="admin_width" type="text"  value ="{$admin_width}" /></td>
+          <td ><input name="admin_enabled" id="admin_enabled" type="checkbox"  value ="on" {$admin_enabled} /></td>
         </tr>
         <tr>
         <td>{'user_status_generic'|@translate}</td>
         <td><input name="generic_height" id="Text1" type="text"  value ="{$generic_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="generic_width" id="Text2" type="text"  value ="{$generic_width}" /></td>
+        <td style="visibility:{$visible_w}"><input name="generic_width" id="generic_width" type="text"  value ="{$generic_width}" /></td>
+        <td ><input name="generic_enabled" id="generic_enabled" type="checkbox"  value ="on" {$generic_enabled} /></td>
         </tr>
         <tr>
         <td>{'user_status_guest'|@translate}</td>
         <td><input name="guest_height" id="Text3" type="text"  value ="{$guest_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="guest_width" id="Text4" type="text"  value ="{$guest_width}" /></td>
+        <td style="visibility:{$visible_w}"><input name="guest_width" id="guest_width" type="text"  value ="{$guest_width}" /></td>
+         <td ><input name="guest_enabled" id="guest_enabled" type="checkbox"  value ="on" {$guest_enabled} /></td>
         </tr>
         <tr>
         <td>{'user_status_normal'|@translate}</td>
         <td><input name="normal_height" id="Text5" type="text"  value ="{$normal_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="normal_width" id="Text6" type="text"  value ="{$normal_width}" /></td>
+        <td style="visibility:{$visible_w}"><input name="normal_width" id="normal_width" type="text"  value ="{$normal_width}" /></td>
+         <td ><input name="normal_enabled" id="normal_enabled" type="checkbox"  value ="on" {$normal_enabled} /></td>
         </tr>
 
Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 7393)
+++ /extensions/Autosize/autosize.inc.php	(revision 7394)
@@ -195,9 +195,8 @@
  function cl_autosize_Get_Options()
   {
-  global $conf,$autosize_parametres; 
-  
-       $autosize_parametres =  unserialize($conf['cl_autosize']);
-      $autosize_parametres =  cl_autosize_Set_Options();
-      return $autosize_parametres;
+		global $conf,$autosize_parametres; 
+  		$autosize_parametres =  unserialize($conf['cl_autosize']);
+		$autosize_parametres =  cl_autosize_Set_Options();
+		return $autosize_parametres;
   }
 	/*
@@ -206,4 +205,5 @@
 function cl_autosize_Set_Options()
   {
+
   global $autosize_parametres;
 //=============================================================================
@@ -235,10 +235,25 @@
 		$autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ;
  		$autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ;
+
+		$autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ;
+		$autosize_parametres->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ;
+		$autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ;
+		$autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ;
+		$autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ;
+
 	 }else{
 		$autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : ( ( isset($autosize_parametres->check_desc_v) ) ? $autosize_parametres->check_desc_v :   'off') ;  
 		$autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($autosize_parametres->check_icon_v) ) ? $autosize_parametres->check_icon_v :   'off') ;  
 		$autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : ( ( isset($autosize_parametres->check_auto_w) ) ? $autosize_parametres->check_auto_w :   'off') ;  
+
+
+$autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($autosize_parametres->webmaster_enabled) ) ? $autosize_parametres->webmaster_enabled :   'on') ;  
+$autosize_parametres->admin_enabled  = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($autosize_parametres->admin_enabled ) ) ? $autosize_parametres->admin_enabled :   'on') ;  
+$autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($autosize_parametres->generic_enabled) ) ? $autosize_parametres->generic_enabled :   'on') ;  
+$autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($autosize_parametres->guest_enabled) ) ? $autosize_parametres->guest_enabled :   'on') ;
+$autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($autosize_parametres->normal_enabled) ) ? $autosize_parametres->normal_enabled :   'on') ;  
+
+
    }
- 
 
 return $autosize_parametres;
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php	(revision 7393)
+++ /extensions/Autosize/include/affiche.php	(revision 7394)
@@ -23,17 +23,29 @@
                     'MARGE_BASSE' => $autosize_parametres->marge_basse,
                     'ECHELLE_MAX' => $autosize_parametres->echelle_max,
+
                     'check_auto_w' => ($autosize_parametres->check_auto_w == 'on') ? 'checked="checked"'  : '' ,
                     'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"'  : '' ,
                     'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"'  : '' ,
+
 					'webmaster_width' => $autosize_parametres->webmaster_width,
                     'webmaster_height' => $autosize_parametres->webmaster_height,
+					'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"'  : '' ,
+
                     'admin_width' => $autosize_parametres->admin_width,
                     'admin_height' => $autosize_parametres->admin_height,
+					'admin_enabled' => ($autosize_parametres->admin_enabled == 'on') ? 'checked="checked"'  : '' ,
+
                     'generic_width' => $autosize_parametres->generic_width,
                     'generic_height' => $autosize_parametres->generic_height,
+					'generic_enabled' => ($autosize_parametres->generic_enabled == 'on') ? 'checked="checked"'  : '' ,
+
                     'guest_width' => $autosize_parametres->guest_width,
                     'guest_height' => $autosize_parametres->guest_height,
+					'guest_enabled' => ($autosize_parametres->guest_enabled == 'on') ? 'checked="checked"'  : '' ,
+				 
                     'normal_width' => $autosize_parametres->normal_width,
                     'normal_height' => $autosize_parametres->normal_height,
+					'normal_enabled' => ($autosize_parametres->normal_enabled == 'on') ? 'checked="checked"'  : '' ,
+
 					'user_status'   => get_user_status($user_status)  
 					
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 7393)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 7394)
@@ -33,5 +33,5 @@
               marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
           }
-       
+
 
           //=========================================================
@@ -89,67 +89,30 @@
           */
           function Info_entete(Parent) {
-
-              var Info_the_page = jQuery("#the_page").info();
-              var info_theHeader = jQuery("#theHeader").info();
               var info_imageToolBar = jQuery("#imageToolBar").info();
+              if (info_imageToolBar.position == "absolute") {
+                  jQuery("#imageToolBar").css("position", "relative");
+                  jQuery("#imageToolBar").css("top", 0 + "px");
+              }
               var info_theImage = jQuery("#theImage").info();
-              var info_image = jQuery("#theImage img").info();
-              /* Squelette 
-              //montblanc info_theImage.top  121
-              //          imageToolBar.margin top:10 padding bottom:10
-              //<body> thePicturePage
-              //  <div> the_page
-              //    <div> theHeader
-              //    <div> imageHeaderBar
-              //    <div> imageToolBar
-              //    <div> theImage
-              //     <img> ??
-              //     <p>
-              //       <br>
-              //       <p>
-              //     <span class="licencetag" style="text-align: left;">
-              //
-              // image top gallycuise :154
-              // 
-              //<body> thePicturePage
-              //  <div> the_page
-              //    <div> theHeader
-              //    <div> theHeaderAlt
-              //     <div> content
-              //             theImageHigh
-              //       <div> imageHeaderBar
-              //       <div> imageToolBar
-              //       <div> theImage
-              //                   theImgContainer
-              //                     <img> ??
-              //        <p>
-              //        <br>
-              //         <p>
-              //         <span class="licencetag" style="text-align: left;">
-              //        theTabsContainer
-              //      copyright
-              */
-
+
+              if (info_theImage.position == "relative") {
+                  //--- passage absolute ==> static ===/
+                  jQuery("#theImage").css("position", "static");
+                  info_theImage = jQuery("#theImage").info();
+
+              }
               if (info_theImage.position == "absolute") {
-                  var Bandeau = info_theImage.top -
-                              (Info_the_page.top +
-                              Get_Val_int(Info_the_page.borderwidth.top) +
-                              Get_Val_int(info_theImage.borderwidth.top));
-
-                  Bandeau = info_theImage.top;
-              } else {
-                  var Bandeau = info_theImage.top +
-                                Get_Val_int(info_imageToolBar.margin.bottom) +
-                                 Get_Val_int(info_imageToolBar.margin.top) +
-                              Info_the_page.top +
-                              Get_Val_int(Info_the_page.borderwidth.top) +
-                              Get_Val_int(info_theImage.borderwidth.top);
-              }
-
-              var Bandeau_t = Info_the_page.top +
-                                      Get_Val_int(Info_the_page.borderwidth.top) +
-                                      Get_Val_int(info_theImage.borderwidth.top);
-
-              return { marge_top: Bandeau_t, img_top: Bandeau };
+                  //--- passage absolute ==> static ===/
+                  jQuery("#theImage").css("position", "static");
+                  info_theImage = jQuery("#theImage").info();
+
+              }
+
+              marge_top = Info_the_page.top +
+                                     Info_the_page.borderwidth.top +
+                                     info_theImage.borderwidth.top;
+
+              img_top = info_theImage.top + info_theImage.borderwidth.top ;
+              return { marge_top: marge_top, img_top: img_top };
 
           }
@@ -159,44 +122,32 @@
           */
           function Info_description(Parent) {
-
-              //jQuery("#theImage br").remove();
-              // jQuery("#theImage br").css("lineHeight", "2px");
-              var inter_ligne = Get_Val_int(jQuery("#" + Parent + " p").css("lineHeight"));
-              var info_description = jQuery("#" + Parent + " ").info();
-              jQuery("#" + Parent).css({ marginLeft: "auto", marginRight: "auto" });
-              var Description = jQuery("#" + Parent + " >*");
-
-              jQuery(Description).each(
-
-             function (i) {
-                 t = jQuery(this).text();
-                 t = jQuery.trim(t);
-                 pr = jQuery(this).parent().get(0).id;
-                 n = this.nodeName;
-                 infos = jQuery(this).info();
-
-                 if (t == "") {
-                     if (this.nodeName == "IMG") {
-                         info_description.top = infos.bottom - Get_Val_int(infos.margin.top) + inter_ligne;
-                         info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom);
-                     }
-                     else if (this.nodeName == "P" || this.nodeName == "BR") {
-                         jQuery(this).remove();
-                     } else {
-                         //   jQuery(this).css("border", "solid 3px GREEN");
-                         info_description.top = infos.bottom - Get_Val_int(infos.margin.top);
-                         info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom);
-                     }
-                 } else {
-
-                     jQuery(this).css("border", "solid 1px transparent");
-                     info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom);
-                 }
-
-
-
-
-             });
+              jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "
+              });
+            //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
+              var inter_ligne = jQuery("#" + Parent + " p").css("lineHeight");
+
+              jQuery("#" + Parent).css({ padding: "0px",
+               marginLeft: "auto",
+                  marginRight: "auto",
+                  marginTop: "0px",
+                  marginBottom: "0px"
+                });
+
+              var info_description = { top: 0, bottom: 0, height: 0 };
+              //=============================================================================
+              info_img = jQuery("#" + Parent + " img").info();
+              info_description.top = info_img.bottom;
+              //=============================================================================
+              info_gbo = jQuery("#gbo").info();
+              if (info_description.top < info_gbo.bottom)
+                  info_description.top = info_gbo.bottom;
+              //=============================================================================
+
+              info_desc = jQuery("#" + Parent + " p:last").info();
+              info_description.bottom = info_desc.bottom;
+
               info_licencetag = jQuery(".licencetag").info();
+
+
               if (info_licencetag.bottom > info_description.bottom) {
                   jQuery(".licencetag").css("border", "solid 2px transparent");
@@ -204,4 +155,5 @@
 
               }
+              //=============================================================================
 
               if (info_description.top < 1)
@@ -209,19 +161,8 @@
 
 
-              var Info_the_page = jQuery("#the_page").info();
-              var Bandeau_t = Info_entete(Parent);
-
               if (info_description.bottom < info_description.top)
                   info_description.bottom = info_description.top = 1;
 
-              if (theme.match(RegExp("gally", "g"))) {
-                     marges_llgbo = 0;
-              }
-
-              info_description.top += Bandeau_t.marge_top - marges_llgbo;
-              // info_description.bottom 739 ;
-              //  info_description.height 277 ;
-              //      info_description.top 465 
-              info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top;
+              info_description.height = info_description.bottom - info_description.top ;
 
               if (check_desc_v != 'checked="checked"') {
@@ -231,65 +172,4 @@
               return info_description;
 
-          }
-          /*
-          * Get_val_int
-          * params: element,valeur maxi
-          * return: valeur entiere
-          */
-          function Get_Val_int(myObj, Maxi_val, Mini_val) {
-              var val = 0;
-              var reg1 = new RegExp("%", "g")
-              Maxi_val = parseInt(Maxi_val || "0");
-
-              /*
-              - numérique suivie de px ou % ou pt ou em, 
-              - thin, bordure mince, 
-              - medium, bordure moyenne (valeur par défaut), 
-              - thick, bordure épaisse, 
-              - inherit, hérite de son parent (css2).
-              */
-
-              if (!myObj) {
-                  return Maxi_val;
-              }
-              if (typeof (myObj) == "string") {
-                  if (myObj == "none") return Maxi_val;
-                  if (myObj == "auto") return Maxi_val;
-                  if (Mini_val)
-                      if (myObj < Mini_val) return Maxi_val;
-                  switch (myObj) {
-                      case 'thin':
-                          return 1;
-                          break;
-                      case 'medium':
-                          return 2;
-                          break;
-                      case 'thick':
-                          return 4;
-                          break;
-                      case 'inherit':
-
-
-                          break;
-
-                      default:
-
-
-                          break;
-                  }
-
-
-
-
-
-                  if (myObj.match(reg1)) val = myObj * Maxi_val / 100;
-                  val = parseInt(myObj);
-
-              } else
-                  val = parseInt(myObj);
-
-
-              if (typeof (val) == "NaN") return Maxi_val;
-              return val;
           }
 
@@ -323,5 +203,5 @@
           var img_reelle = { height: img_height, width: img_width };
           var img_finale = { height: 0, width: 0 };
-          var zone_affichage = { height: 0, width: 0 };
+          var Zone_Affichage = { height: 0, width: 0 };
 
           //============================================================
@@ -330,7 +210,12 @@
           var Zone_Affichage = jQuery("#theImage").info();
 
-          var Bandeau = Info_entete("theImage").img_top;
-
-          var Bandeau_bas = Info_description("theImage");
+          var Bandeau = 0;
+          var Bandeau_t = Info_entete("theImage")
+          Bandeau = Bandeau_t.img_top;
+
+
+          var Bandeau_bas = 0;
+          Bandeau_bas = Info_description("theImage");
+
 
           //===================================================================	
@@ -345,4 +230,31 @@
               if (typeof (event) == 'undefined') return;
               if (!cl_visible) return;
+               if (eval(user_status + "_enabled") == "") return;
+              var chk = eval(user_status + "_enabled");
+              /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);
+               
+              jQuery("#Debug").hide();
+              jQuery("#Debug1").hide();
+              jQuery("#Debug2").hide();
+             
+              jQuery("#Debug").css({ position: "absolute", width: "200px", border: "solid 1px green", top: Bandeau + "px" });
+              jQuery("#Debug").text(Bandeau);
+
+              jQuery("#Debug1").css({ position: "absolute",
+              border: "solid 1px green",
+              top: Bandeau_bas.top + "px",
+              width: (Bandeau_bas.width / 5) + "px",
+              height: Bandeau_bas.height + "px"
+              });
+              jQuery("#Debug1").text(Bandeau_bas.top + " height:" + Bandeau_bas.height);
+
+              jQuery("#Debug2").css({ position: "absolute",
+              left: '200px',
+              border: "solid 1px green", top: Bandeau_bas.bottom + "px"
+              });
+              jQuery("#Debug2").text(Bandeau_bas.bottom);
+              
+ */
+             
 
               //==========================================================================
@@ -352,27 +264,4 @@
 
 
-              /*
-              * recherche la plus grande image (hauteur ou largeur)
-              */
-
-
-              function Get_Img_Maxi(myobj) {
-                  var w00 = 0;
-                  var TheImg = null;
-                  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"))) {
-                                  TheImg = this;
-                                  w00 = w0;
-                              }
-
-                      }
-                  });
-                  return TheImg;
-              }
 
               if (old_w != winwidth)
@@ -383,20 +272,5 @@
 
 
-              Cadre = jQuery("#theImage").get(0);
-
-              //===============  Information cadre ======
-              var info_the_page = jQuery("#the_page").info();
-
-              //=============================================================================
-              var info_HeaderBar = jQuery("#imageHeaderBar").info();
-              var info_imageInfoBar = jQuery("#imageInfoBar").info();
-              var info_content = jQuery("#content").info();
-              var info_ToolBar = jQuery("#imageToolBar").info();
-
-              var info_titrePage = jQuery("#titrePage").info();
-
-              var info_the_page = jQuery("#the_page").info();
-              var zone_affichage = jQuery("#theImage").info();
-
+              var Cadre = jQuery("#theImage").get(0);
 
               var Type_Img = "";
@@ -424,27 +298,28 @@
 
               var info_Cadre = jQuery(Cadre).info();
-
-
-              if (info_Cadre.position != "static") {
-                  /* Si LLGBO met le cadre en relative  */
-                  if (theme.match(RegExp("gally", "g"))) {
-                      //--- passage absolute ==> static ===/
-                      jQuery(Cadre).css("position", "static");
-                      info_Cadre = jQuery(Cadre).info();
-
-                  }
-              }
-
-              jQuery("#imageToolBar").css("position", "relative");
-              jQuery("#imageHeaderBar").css("position", "relative");
-              jQuery("#imageToolBar").css("top", 0 + "px");
-              jQuery("#imageHeaderBar").css("top", "0px");
-              w0 = Zone_Affichage.width;
-              marge = (Zone_Affichage.width - info_ToolBar.width) / 2;
+              //===============  Information cadre ======
+              var info_the_page = jQuery("#the_page").info();
+
+              //=============================================================================
+              var info_HeaderBar = jQuery("#imageHeaderBar").info();
+
+              var info_content = jQuery("#content").info();
+
+
+              var info_titrePage = jQuery("#titrePage").info();
+
+               
+              var Zone_Affichage = jQuery("#theImage").info();
+
+              var info_ToolBar = jQuery("#imageToolBar").info();
+              var info_imageInfoBar = jQuery("#imageInfoBar").info();
+              var info_theHeader = jQuery("#theHeader").info();
+
+              var marge = 0;
 
               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);
+                  marge_right = info_imageInfoBar.margin.left + info_imageInfoBar.margin.right;
                   winwidth = info_content.width;
                   marge_right = info_imageInfoBar.width + marge_right;
@@ -454,10 +329,8 @@
 
               winwidth -= (marge_right + marge_left);
-              //  var marge_top = info_ToolBar.top + info_ToolBar.height;
 
               //======================================================================
-              info_theHeader = jQuery("#theHeader").info();
-              //  var marge_top =info_theHeader.bottom + info_HeaderBar.height+ info_ToolBar.height; //145
-              var marge_top = info_HeaderBar.bottom + info_ToolBar.height; //145
+
+
               if (Type_Img == "pamoorama") {
                   var info_pamoorama = jQuery("#pamoorama").info();
@@ -505,8 +378,10 @@
 
                       var TheImg = jQuery("#map").get(0);
-                      info_image = jQuery("#map").info();
-
-
-                      pos_page = jQuery("#the_page").info();
+                       img_reelle.height = info_image.height;
+                       img_reelle.width = winwidth - marge_right - marge_right;
+                      Bandeau_bas.height = 10;
+                      marge_right = 10;
+                      
+                      info_the_page = jQuery("#the_page").info();
                       ;
 
@@ -526,6 +401,6 @@
                       });
 
-                      pos_image = jQuery(TheImg).info();
-                      pos_page = jQuery("#the_page").info();
+                      info_theImage = jQuery(TheImg).info();
+                      info_the_page = jQuery("#the_page").info();
 
                       break
@@ -533,6 +408,6 @@
 
                       if (!TheImg) return;
-                      pos_image = jQuery(TheImg).info();
-                      pos_page = jQuery("#the_page").info();
+                      info_theImage = jQuery(TheImg).info();
+                      info_the_page = jQuery("#the_page").info();
 
 
@@ -540,6 +415,6 @@
                   case "img_autre":
                       if (!TheImg) return;
-                      pos_image = jQuery(TheImg).position();
-                      pos_page = jQuery("#the_page").position();
+                      info_theImage = jQuery(TheImg).info();
+                      info_the_page = jQuery("#the_page").info();
 
 
@@ -550,6 +425,6 @@
                       TheImg = jQuery(Cadre).find("embed");
 
-                      pos_image = jQuery(Cadre).position();
-                      pos_page = jQuery("#the_page").position();
+                      info_theImage = jQuery(Cadre).info();
+                      info_the_page = jQuery("#the_page").info();
                       if (rapport < 0) {
                           img_height = parseInt(jQuery(TheImg).outerHeight());
@@ -565,6 +440,6 @@
 
                       TheImg = jQuery('#charlie object').get(0);
-                      pos_image = jQuery(Cadre).position();
-                      pos_page = jQuery("#the_page").position();
+                      info_theImage = jQuery(Cadre).info();
+                      info_the_page = jQuery("#the_page").info();
                       if (rapport < 0) {
                           img_height = parseInt(TheImg.height);
@@ -581,6 +456,6 @@
                       var Image = jQuery("#pamoorama").find("img");
 
-                      pos_image = jQuery("#pamoorama").info();
-                      pos_page = jQuery("#the_page").info();
+                      info_theImage = jQuery("#pamoorama").info();
+                      info_the_page = jQuery("#the_page").info();
                       break
 
@@ -589,10 +464,10 @@
 
               //=============== Vérification taille minimale  autorizée ======================
-              var miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width);
-              miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);
-
-
-              var maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0");
-              maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0");
+              var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width);
+              miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);
+
+
+              var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0");
+              maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0");
 
               mini_width = parseInt(miniWidth);
@@ -624,10 +499,9 @@
               //=============== Zone d'affichage ============================
 
-              borderW = Get_Val_int(zone_affichage.borderwidth.left, 2);
-              borderW += Get_Val_int(zone_affichage.borderwidth.right, 2);
-
-
-              zone_affichage.width = winwidth - borderW;
-              zone_affichage.height = winheight - marge_top;
+              borderW = Zone_Affichage.borderwidth.left;
+              borderW += Zone_Affichage.borderwidth.right;
+
+
+              Zone_Affichage.width = winwidth - borderW;
 
               //==================================================================================
@@ -661,20 +535,20 @@
               //============ Padding image ? ===============
 
-              img_padding_top = Get_Val_int(info_img.padding.top);
-              img_padding_top += Get_Val_int(info_img.padding.bottom);
-              img_padding_top += Get_Val_int(info_img.borderwidth.top);
-              img_padding_top += Get_Val_int(info_img.borderwidth.bottom);
-
-              margin_top = Get_Val_int(info_Cadre.margin.top);
-              padding_top = Get_Val_int(info_Cadre.padding.top);
-              padding_top += Get_Val_int(info_Cadre.padding.bottom);
+              img_padding_top = (info_img.padding.top);
+              img_padding_top += (info_img.padding.bottom);
+              img_padding_top += (info_img.borderwidth.top);
+              img_padding_top += (info_img.borderwidth.bottom);
+
+              margin_top = (info_Cadre.margin.top);
+              padding_top = (info_Cadre.padding.top);
+              padding_top += (info_Cadre.padding.bottom);
 
               Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
               //==========================================================================
               h = 0;
-              zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top;
-              var Image_height = zone_affichage.height - Bandeau_bas.height - img_padding_top;
-              var Delta = zone_affichage.height - Image_height;
-
+              Zone_Affichage.height = winheight - Bandeau - Marge_Basse;
+              var Image_height = Zone_Affichage.height - Bandeau_bas.height;
+
+              // jQuery("#Debug1").css("top", Image_height + "px");
               //=============================================================
               var height_user = eval(user_status + "_height");
@@ -696,7 +570,7 @@
                   Image_width = parseInt(Image_height * rapport);
               else if (Type_Img == "map") {
-                  Image_width = zone_affichage.width - marge_left - marge_right;
+                  Image_width = Zone_Affichage.width - marge_left - marge_right;
               } else {
-                  Image_width = zone_affichage.width;
+                  Image_width = Zone_Affichage.width;
               }
 
@@ -717,12 +591,9 @@
                   else
                       widthmin = parseInt(width_user);
-                 var marges = 0;
-                  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").innerWidth();
-                  }
-                  widthmin -= 2 * marges;
+                  var marges = marges_llgbo;
+                  widthmin -= info_img.borderwidth.left;
+                  widthmin -= info_img.borderwidth.right;
+
+                  widthmin -= marges;
                   if (Image_width > widthmin) {
                       //   Image_width largeur à atteindre 
@@ -745,36 +616,35 @@
               zoom = echelle;
               //=============LLGBO2 ===========================
-              marges = 0;
+
               t1 = { top: 0 };
-              if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) {
-                  llgboframe = jQuery("#gbo div:first");
-                  marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
-
-                  m1 = jQuery(llgboframe).outerHeight();
-                  t1 = jQuery(llgboframe).position();
+              if (marges_llgbo > 0) {
+
+                  t1 = jQuery(llgboframe).info();
 
 
                   if (TheImg.src) {
-                      marge_top = t1.top - img_top;
-                      Image_height -= marge_top;
-                      Image_width = Image_height * rapport;
+
+
                       if ((winwidth) < Image_width) {
                           _width = maxWidth;
                       } else {
-                          _width = Image_width - (marges / 2);
+                          _width = Image_width;
                       }
-
+                      _width -= marges_llgbo; // réduction frame
                       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);
+                      jQuery("#gbo").outerHeight(Image_height + marges_llgbo + 10);
+                      jQuery("#gbo").css("height", (Image_height + marges_llgbo + 10) + "px");
 
                   } else {
 
-                      jQuery("#gbo").width(zone_affichage.width - marges);
+                      jQuery("#gbo").width(Zone_Affichage.width - marges);
                       jQuery("#gbo").height(Image_height + marges)
-                      jQuery("#gbo").css("width", zone_affichage.width - marges + "px");
+                      jQuery("#gbo").css("width", Zone_Affichage.width - marges + "px");
                       jQuery("#gbo").css("height", Image_height - marges + "px")
 
@@ -816,9 +686,9 @@
               //  Image_height, Image_width = valeur a atteindre.
               if (theme.match(RegExp("luciano", "g"))) {
-                  zone_affichage.height -= Bandeau_bas;
-              }
-
-
-              jQuery(Cadre).width(zone_affichage.width);
+                  Zone_Affichage.height -= Bandeau_bas;
+              }
+
+
+              jQuery(Cadre).width(Zone_Affichage.width);
               //==============================================================
 
@@ -829,5 +699,5 @@
               if (typeof (gmaps) != "undefined") {
                   Gmap_ = gmaps.maps[0];
-                  if (Gmap_.sizeMode == 'A');
+                  if (Gmap_.sizeMode == 'A')
                   {
                       jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" });
@@ -837,5 +707,5 @@
               //==============================================================
               if (Type_Img == "charlie") {
-                  t1 = jQuery("#charlie").position();
+                  t1 = jQuery("#charlie").info();
                   /**/
                   pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight"));
@@ -872,5 +742,5 @@
 
                   marge_left += 0;
-                  new_width = zone_affichage.width - marge_right - marge_left;
+                  new_width = Zone_Affichage.width - marge_right - marge_left;
                   jQuery("#pamoorama").css({ margin: 0 + "px",
                       left: marge_left + "px",
@@ -890,6 +760,6 @@
 
 
-                  jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left));
-                  jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px");
+                  jQuery("#pamoorama_footer").width((Zone_Affichage.width - marge_right - marge_left));
+                  jQuery("#pamoorama_footer").css('width', (Zone_Affichage.width - marge_right - marge_left) + "px");
                   zoom = Image_height / img_height;
                   info_pamoorama_outter = jQuery("#pamoorama_outter").info();
@@ -933,7 +803,7 @@
               }
               //  
-              if (!pos) pos = jQuery("#copyright").position();
-              if (pos != jQuery("#copyright").position())
-                  pos = jQuery("#copyright").position();
+              if (!pos) pos = jQuery("#copyright").info();
+              if (pos != jQuery("#copyright").info())
+                  pos = jQuery("#copyright").info();
               if (pos.top > 100) jQuery("#the_page").height(pos.top);
 
@@ -945,8 +815,31 @@
           //===================================================================	  
           jQuery(window).resize();
+          /*
+          * recherche la plus grande image (hauteur ou largeur)
+          */
+
+
+          function Get_Img_Maxi(myobj) {
+              var w00 = 0;
+              var TheImg = null;
+              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"))) {
+                              TheImg = this;
+                              w00 = w0;
+                          }
+
+                  }
+              });
+              return TheImg;
+          }
 
 
       } // function
-);                                                                                                                                                                                                                                                                                                                  // ready
+);                                                                                                                                                                                                                                                                                                                                        // ready
     /*
 *
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js	(revision 7393)
+++ /extensions/Autosize/js/conflit.js	(revision 7394)
@@ -2,5 +2,21 @@
 var d1 = 0;
 var init_tb = 0;
-
+function addEvent2(obj, type, fn) {
+    if (obj.addEventListener) {
+        obj.addEventListener(type, fn, false);
+        EC.add(obj, type, fn);
+    }
+    else if (obj.attachEvent) {
+        obj["e" + type + fn] = fn;
+        obj[type + fn] = function () {
+            obj["e" + type + fn](window.event);
+        }
+        obj.attachEvent("on" + type, obj[type + fn]);
+        EC.add(obj, type, fn);
+    }
+    else {
+        obj["on" + type] = obj["e" + type + fn];
+    }
+}
 function $(element, nc) {
     //============== détection framework ==================
Index: /extensions/Autosize/js/jquery.dimensions.js
===================================================================
--- /extensions/Autosize/js/jquery.dimensions.js	(revision 7393)
+++ /extensions/Autosize/js/jquery.dimensions.js	(revision 7394)
@@ -105,10 +105,10 @@
 
 
-                borderwidth.left = jQuery(elem).css("borderLeftWidth");
-                borderwidth.right = jQuery(elem).css("borderRightWidth");
-                borderwidth.top = jQuery(elem).css("borderTopWidth");
-                borderwidth.bottom = jQuery(elem).css("borderBottomWidth");
+                borderwidth.left = jQuery(elem).Get_Val_int(jQuery(elem).css("borderLeftWidth"));
+                borderwidth.right = jQuery(elem).Get_Val_int(jQuery(elem).css("borderRightWidth"));
+                borderwidth.top = jQuery(elem).Get_Val_int(jQuery(elem).css("borderTopWidth"));
+                borderwidth.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("borderBottomWidth"));
                 try {
-                    borderwidth.width = jQuery(elem).css("borderWidth");
+                    borderwidth.width = jQuery(elem).Get_Val_int(jQuery(elem).css("borderWidth"));
                 } catch (e) {
                     borderwidth.width = '"' + borderwidth.left + ' ' + borderwidth.top + ' ' + borderwidth.right + ' ' + borderwidth.bottom + '"';
@@ -116,19 +116,19 @@
 
 
-                margin.left = jQuery(elem).css("marginLeft");
-                margin.right = jQuery(elem).css("marginRight");
-                margin.top = jQuery(elem).css("marginTop");
-                margin.bottom = jQuery(elem).css("marginBottom");
+                margin.left = jQuery(elem).Get_Val_int(jQuery(elem).css("marginLeft"));
+                margin.right = jQuery(elem).Get_Val_int(jQuery(elem).css("marginRight"));
+                margin.top = jQuery(elem).Get_Val_int(jQuery(elem).css("marginTop"));
+                margin.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("marginBottom"));
                 try {
-                    margin.margin = jQuery(elem).css("margin");
+                    margin.margin = jQuery(elem).Get_Val_int(jQuery(elem).css("margin"));
                 } catch (e) {
                     margin.margin = '"' + margin.left + ' ' + margin.top + ' ' + margin.right + ' ' + margin.bottom + '"';
                 }
 
-                padding.left = jQuery(elem).css("paddingLeft");
-                padding.right = jQuery(elem).css("paddingRight");
-                padding.top = jQuery(elem).css("paddingTop");
-                padding.bottom = jQuery(elem).css("paddingBottom");
-                try { padding.padding = jQuery(elem).css("padding"); } catch (e) {
+                padding.left = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingLeft"));
+                padding.right = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingRight"));
+                padding.top = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingTop"));
+                padding.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingBottom"));
+                try { padding.padding = jQuery(elem).Get_Val_int(jQuery(elem).css("padding")); } catch (e) {
                     padding.padding = '"' + padding.left + ' ' + padding.top + ' ' + padding.right + ' ' + padding.bottom + '"';
                 }
@@ -190,5 +190,67 @@
                 offsetParent = offsetParent.offsetParent;
             return jQuery(offsetParent);
+        },
+    /*
+    * Get_val_int
+    * params: element,valeur maxi
+    * return: valeur entiere
+    */
+  
+     Get_Val_int: function(myObj, Maxi_val, Mini_val) {
+        var val = 0;
+        var reg1 = new RegExp("%", "g")
+        Maxi_val = parseInt(Maxi_val || "0");
+
+        /*
+        - numérique suivie de px ou % ou pt ou em, 
+        - thin, bordure mince, 
+        - medium, bordure moyenne (valeur par défaut), 
+        - thick, bordure épaisse, 
+        - inherit, hérite de son parent (css2).
+        */
+
+        if (!myObj) {
+            return Maxi_val;
         }
+        if (typeof (myObj) == "string") {
+            if (myObj == "none") return Maxi_val;
+            if (myObj == "auto") return Maxi_val;
+            if (Mini_val)
+                if (myObj < Mini_val) return Maxi_val;
+            switch (myObj) {
+                case 'thin':
+                    return 1;
+                    break;
+                case 'medium':
+                    return 2;
+                    break;
+                case 'thick':
+                    return 4;
+                    break;
+                case 'inherit':
+
+
+                    break;
+
+                default:
+
+
+                    break;
+            }
+
+
+
+
+
+            if (myObj.match(reg1)) val = myObj * Maxi_val / 100;
+            val = parseInt(myObj);
+
+        } else
+            val = parseInt(myObj);
+
+
+        if (typeof (val) == "NaN") return Maxi_val;
+        return val;
+    }
     });
     /*
@@ -198,3 +260,6 @@
         return parseInt(jQuery.curCSS(el.jquery ? el[0] : el, prop, true)) || 0;
     };
+
+
+
 })(jQuery);
Index: /extensions/Autosize/language/en_UK/lang.php
===================================================================
--- /extensions/Autosize/language/en_UK/lang.php	(revision 7393)
+++ /extensions/Autosize/language/en_UK/lang.php	(revision 7394)
@@ -1,4 +1,5 @@
 <?php
 global $lang;
+$lang['cl_autosize_enabled'] = "Enabled";
 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul";
 $lang['cl_autosize_icon_view'] = "Show an icon in the toolbar";
Index: /extensions/Autosize/language/fr_FR/lang.php
===================================================================
--- /extensions/Autosize/language/fr_FR/lang.php	(revision 7393)
+++ /extensions/Autosize/language/fr_FR/lang.php	(revision 7394)
@@ -1,4 +1,5 @@
 <?php
 global $lang;
+$lang['cl_autosize_enabled'] = "Actif";
 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul";
 $lang['cl_autosize_icon_view'] = "Affiche une icône dans la barre d'outils";
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 7393)
+++ /extensions/Autosize/main.inc.php	(revision 7394)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.2.6
+Version: 1.2.7
 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
@@ -15,7 +15,10 @@
 $autosize_controler = new autosize_controler();
 
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 );
+add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 45 );
+//---- avant pamooramics ---
+//add_event_handler('render_element_content', array(&$autosize_controler, 'cl_autosize_aff_infos_plus'),40,2);
+
 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
-add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),50 );
+add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 );
 
 ?>
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 7393)
+++ /extensions/Autosize/template/autosize.tpl	(revision 7394)
@@ -23,13 +23,23 @@
 
     var webmaster_width='{$webmaster_width   }';
-    var webmaster_height='{ $webmaster_height   }';
+    var webmaster_height = '{ $webmaster_height   }';
+    var webmaster_enabled = '{ $webmaster_enabled   }';
+
     var admin_width='{ $admin_width   }';
-    var admin_height='{ $admin_height   }';
+    var admin_height = '{ $admin_height   }';
+    var admin_enabled = '{ $admin_enabled   }';
+
     var generic_width='{ $generic_width   }';
-    var generic_height='{ $generic_height   }';
+    var generic_height = '{ $generic_height   }';
+    var generic_enabled = '{ $generic_enabled   }';
+
     var guest_width='{ $guest_width   }';
-    var guest_height='{$guest_height}';
+    var guest_height = '{$guest_height}';
+    var guest_enabled = '{ $guest_enabled   }';
+
     var normal_width='{$normal_width}';
-    var normal_height='{$normal_height}';
+    var normal_height = '{$normal_height}';
+    var normal_enabled = '{ $normal_enabled   }';
+
     var user_status='{$user_status}';
    
@@ -47,2 +57,5 @@
  {html_head}  
   {/html_head}  
+  <div id="Debug"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
+   <div id="Debug1"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
+  <div id="Debug2"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
