Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 7353)
+++ /extensions/Autosize/autosize.inc.php	(revision 7354)
@@ -230,5 +230,5 @@
 
 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') )  {  
-		$autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_icon_v'] : "off" ;
+		$autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : "off" ;
 		$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" ;
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 7353)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 7354)
@@ -1,127 +1,162 @@
 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();
-    }
-    //=========================================================
-
-     function wait_Timer() {
-         old_w = 0
-         jQuery(window).resize();
-           info_pamoorama_outter = jQuery("#pamoorama_outter").info();
-           if (info_pamoorama_outter.width == 0)
-                setTimeout("wait_Timer()", 100);
-
-       }
-
-      
-
- function cl_Timer() {
- //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
-     if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
-         alert(jQuery.browser.version);
-     panoramaContainer = jQuery(".panorama-container");
-     n = document.scripts[6];//12--14affiche_script ;
-     t = n.src;
-
-     currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
-     if ( currentPosition == NaN) return;
-     
-
-     if (currentPosition > 1000) 
-     jQuery(panoramaContainer).css('margin-left',"0px")
-     setTimeout("cl_Timer()", 500);
- }
- function onPropertyChange(e) {
-     var el = e.srcElement;
-     var new_class=el.className ;
-     ID = el.id;
-     Prop = e.propertyName.split(".");
-     Property = Prop[1];
-     if (Property == "display") {
-         Valeur = parseInt(el.currentStyle[Property]);
-         if (Valeur=="block"){
-
- 
-         }
-     }
-     return;
- }     
-
-/* ready
-*
-*
-*/
-     //============================================================
-        /*
-        *
-        */
- function Info_entete(Parent) {
-
-     var Info_the_page = jQuery("#the_page").info();
-     var Zone_Affichage = jQuery("#theImage").info();
-     var info_theHeader = jQuery("#theHeader").info();
-     // image top gallycuise :165
-     var info_imageToolBar = jQuery("#imageToolBar").info();
-
-     if (Zone_Affichage.position =="absolute") {
-         var Bandeau = Zone_Affichage.top -
+          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();
+          }
+          //=========================================================
+
+          function wait_Timer() {
+              old_w = 0
+              jQuery(window).resize();
+              info_pamoorama_outter = jQuery("#pamoorama_outter").info();
+              if (info_pamoorama_outter.width == 0)
+                  setTimeout("wait_Timer()", 100);
+
+          }
+
+
+
+          function cl_Timer() {
+              //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
+              if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
+                  alert(jQuery.browser.version);
+              panoramaContainer = jQuery(".panorama-container");
+              n = document.scripts[6]; //12--14affiche_script ;
+              t = n.src;
+
+              currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
+              if (currentPosition == NaN) return;
+
+
+              if (currentPosition > 1000)
+                  jQuery(panoramaContainer).css('margin-left', "0px")
+              setTimeout("cl_Timer()", 500);
+          }
+          function onPropertyChange(e) {
+              var el = e.srcElement;
+              var new_class = el.className;
+              ID = el.id;
+              Prop = e.propertyName.split(".");
+              Property = Prop[1];
+              if (Property == "display") {
+                  Valeur = parseInt(el.currentStyle[Property]);
+                  if (Valeur == "block") {
+
+
+                  }
+              }
+              return;
+          }
+
+          /* ready
+          *
+          *
+          */
+          //============================================================
+          /*
+          *
+          */
+          function Info_entete(Parent) {
+
+              var Info_the_page = jQuery("#the_page").info();
+              var info_theHeader = jQuery("#theHeader").info();
+              var info_imageToolBar = jQuery("#imageToolBar").info();
+              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 == "absolute") {
+                  var Bandeau = info_theImage.top -
                               (Info_the_page.top +
                               Get_Val_int(Info_the_page.borderwidth.top) +
-                              Get_Val_int(Zone_Affichage.borderwidth.top));
-
-         Bandeau = Zone_Affichage.top;
-     } else {
-         var Bandeau = Zone_Affichage.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(Zone_Affichage.borderwidth.top);
-     }
-
-             var Bandeau_t = Info_the_page.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(Zone_Affichage.borderwidth.top);
-
-             return { marge_top: Bandeau_t, img_top: Bandeau };
-
-                }
-
-        /* Récupère les informations sur la description.
-        *
-        */
-        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(
+                                      Get_Val_int(info_theImage.borderwidth.top);
+
+              return { marge_top: Bandeau_t, img_top: Bandeau };
+
+          }
+
+          /* Récupère les informations sur la description.
+          *
+          */
+          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) {
@@ -140,5 +175,5 @@
                          jQuery(this).remove();
                      } else {
-                      //   jQuery(this).css("border", "solid 3px GREEN");
+                         //   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);
@@ -146,5 +181,5 @@
                  } else {
 
-                    jQuery(this).css("border", "solid 1px transparent");
+                     jQuery(this).css("border", "solid 1px transparent");
                      info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom);
                  }
@@ -154,783 +189,789 @@
 
              });
-             info_licencetag = jQuery(".licencetag").info();
-             if (info_licencetag.bottom > info_description.bottom) {
-                 jQuery(".licencetag").css("border", "solid 2px transparent");
-                 info_description.bottom = info_licencetag.bottom  ;
-
-             }
-
-            if (info_description.top < 1)
-                info_description.top = info_description.bottom;
-
-
-            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;
-
-            info_description.top += Bandeau_t.marge_top;
-            // info_description.bottom 739 ;
-            //  info_description.height 277 ;
-            //      info_description.top 465 
-            info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top;
-            if (check_desc_v != 'checked="checked"') {
-                info_description.height = 0;
-            }
-
-            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;
-        }
-
-        /*
-        *
-        */
-        jQuery("#pamoorama_iner").bind('resize', function () {
-            wait_Timer();
-        })
-        //============================================================//==
-        jQuery("#pamoorama_outter").bind('resize', function () {
-            wait_Timer();
-        })
-
-
-
-        //============================================================
-        jQuery("#iGMapsIcon").bind('resize', function () {
-            jQuery().recentrage_widget();
-        })
-
-
-
-     
-
-
-   
-           /* jQuery */
-           var img_init = { height: img_height, width: img_width };  // taille initiale
-           var img_defaut = { height: scaled_height, width: scaled_width };
-           var img_reelle = { height: img_height, width: img_width };
-           var img_finale = { height: 0, width: 0 };
-           var zone_affichage = { height: 0, width: 0 };
-
-           //============================================================
-
-           var Info_the_page = jQuery("#the_page").info();
-           var Zone_Affichage = jQuery("#theImage").info();
-
-           var Bandeau = Info_entete("theImage").img_top;
-
-           var Bandeau_bas = Info_description("theImage");
-
-           var init_taille_thumblink = { height: 0, width: 0 };
-           if (init_taille_thumblink.height == 0)
-               init_taille_thumblink = {
-                   height: jQuery(".thumbLink").height(),
-                   width: jQuery(".thumbLink").width()
-               };
-           //===================================================================	
-
-
-
-
-           /*
-           * window .resize
-           */
-           jQuery(window).resize(function (event, ui) {
-               if (typeof (event) == 'undefined') return;
-               if (!cl_visible) return;
-
-               //==========================================================================
-               var winwidth = jQuery(window).width();
-               var winheight = jQuery(window).height();
-               if (old_w == winwidth && old_h == winheight) return;
-
-
-               /*
-               * 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)
-               { old_w = winwidth; }
-               else
-               { if (old_h != winheight) old_h = winheight; }
-               //===========================================================================
-
-
-               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 Type_Img = "";
-               //====== détection du type d'images ======
-               if (jQuery("#charlie").length > 0) {
-                   Type_Img = "charlie";
-               } else if (jQuery("#pamoorama").length) {
-                   Type_Img = "pamoorama";
-               } else if (jQuery("#theImage embed").length > 0) {
-                   Type_Img = "embed";
-               } else if (jQuery("#map").length) {
-                   Type_Img = "map";
-               } else if (jQuery("#Panorama").length) {
-                   Type_Img = "panorama";
-               } else if (jQuery(Cadre).find("img").length > 0) {
-                   Type_Img = "img";
-               } else if (jQuery("img").length > 0) {
-                   Type_Img = "img_autre";
-                   return;
-               } else {
-                   return;
-               }
-
-
-
-               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");
-
-
-               var marge_right = 0;
-               var marge_left = 0;
-               if (info_content.width > 100) {
-                   marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right);
-                   winwidth = info_content.width;
-                   marge_right = info_imageInfoBar.width + marge_right;
-               }
-               else
-                   winwidth = info_ToolBar.width - 2;
-
-               //  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();
-                   var info_pamoorama_outter = jQuery("#pamoorama_outter").info();
-                   var info_pamoorama_inner = jQuery("#pamoorama_inner").info();
-                   var info_pamoorama_footer = jQuery("#pamoorama_footer").info();
-                   TheImg = jQuery("#pamoorama");
-
-                   /*
-                   pamoorama_outter
-                   pamoorama_inner
-                   pamoorama_footer
-                   pamoorama_caption
-                   pamoorama_thumb
-                   pamoorama_frame
-                   */
-               } else {
-                   //==== récupère Img la plus grande  =====
-                   if (jQuery("#theImg")) IMG = "#theImg";
-                   else IMG = Cadre;
-
-                   TheImg2 = Get_Img_Maxi(IMG + " img");
-                   //=================================================================
-                   if (TheImg2 == null) {
-                       if (jQuery(Cadre).find("img").length > 0) {
-                           IMG = Cadre;
-                           TheImg = Get_Img_Maxi("#theImage img");
-                       }
-                   } else {
-                       TheImg = TheImg2  //luciano ?
-
-                   }
-               }
-               //=================================================================
-
-
-               switch (Type_Img) {
-                   case "map":
-                       var info_image = jQuery("#map").info();
-
-                       var info_map = jQuery("#mapPicture").info();
-
-                       marge_left = info_map.width;
-                       jQuery("#map").css("left", marge_left);
-
-                       var TheImg = jQuery("#map").get(0);
-                       info_image = jQuery("#map").info();
-
-
-                       pos_page = jQuery("#the_page").info();
-                       ;
-
-                       break
-
-
-                   case "panorama":
-
-                       var w00 = 0;
-                       jQuery("#Panorama img").each(function (i) {
-                           w0 = this.width;
-                           if (w0 > w00) {
-                               TheImg = this;
-                               n = TheImg.nameProp;
-                               w00 = w0;
-                           }
-                       });
-
-                       pos_image = jQuery(TheImg).info();
-                       pos_page = jQuery("#the_page").info();
-
-                       break
-                   case "img":
-
-                       if (!TheImg) return;
-                       pos_image = jQuery(TheImg).info();
-                       pos_page = jQuery("#the_page").info();
-
-
-                       break
-                   case "img_autre":
-                       if (!TheImg) return;
-                       pos_image = jQuery(TheImg).position();
-                       pos_page = jQuery("#the_page").position();
-
-
-                       break
-                   case "embed":
-                       //
-
-                       TheImg = jQuery(Cadre).find("embed");
-
-                       pos_image = jQuery(Cadre).position();
-                       pos_page = jQuery("#the_page").position();
-                       if (rapport < 0) {
-                           img_height = parseInt(jQuery(TheImg).outerHeight());
-                           img_width = parseInt(jQuery(TheImg).outerWidth());
-
-                           img_reelle.height = img_height;
-                           img_reelle.width = img_width;
-
-                       }
-
-                       break
-                   case "charlie":
-
-                       TheImg = jQuery('#charlie object').get(0);
-                       pos_image = jQuery(Cadre).position();
-                       pos_page = jQuery("#the_page").position();
-                       if (rapport < 0) {
-                           img_height = parseInt(TheImg.height);
-                           img_width = parseInt(TheImg.width);
-
-                           img_reelle.height = parseInt(TheImg.height);
-                           img_reelle.width = parseInt(TheImg.width);
-                       }
-
-                       break
-                   case "pamoorama":
-                       //=========================================================
-                       var Images = jQuery("#pamoorama img");
-                       var Image = jQuery("#pamoorama").find("img");
-
-                       pos_image = jQuery("#pamoorama").info();
-                       pos_page = jQuery("#the_page").info();
-                       break
-
-
-               }
-
-               //=============== Vérification taille minimale  autorizée ======================
-               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");
-
-               mini_width = parseInt(miniWidth);
-               mini_height = parseInt(miniHeight);
-
-               img_reelle.width = parseInt(img_reelle.width);
-
-
-               if (img_reelle.width < mini_width) return;
-
-               img_reelle.height = parseInt(img_reelle.height);
-               if (img_reelle.height < parseInt(mini_height)) return;
-               //==================================================================================   
-               if (rapport < 0) {
-
-                   img_init.height = parseInt(img_height);
-                   img_init.width = parseInt(img_width);
-
-                   rapport = img_width / img_height;
-
-                   if (Type_Img != "map")
-                       rapport = (img_init.width / img_init.height);
-                   else
-                       rapport = 0;
-
-               }
-
-
-               //=============== 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;
-
-
-
-               //===========================================================================  
-               var sel0 = { top: 0 };
-
-
-
-
-
-               //==================================================================================
-               jQuery("#theImage #theImg IMG").css("marginTop", "0px")
-
-               var h = 15;
-               if (theme.match(RegExp("sobre", "g"))) {
-                   h += 0; //??
-               } else if (theme.match(RegExp("Pure", "g"))) {
-                   h += 0; //??
-               } else if (theme.match(RegExp("luciano", "g"))) {
-                   h += 0; //??
-               } else if (theme.match(RegExp("simple", "g"))) {
-                   h += 0; //??
-               } else if (theme.match(RegExp("gally", "g"))) {
-                   h += 0; //??
-
-               }
-               //================ Licence  ========================
-               var Licence = jQuery(".licencetag");
-               if (Licence.length > 0) {
-                   jQuery(".licencetag").css("padding", "0px");
-
-               }
-               //====================================================
-               info_img = jQuery(TheImg).info();
-
-
-               //=========================================================================
-               img_top = Bandeau;
-               //============ 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);
-
-               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;
-
-               //=============================================================
-               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;
-
-                   if (theme.match(RegExp("gally", "g"))) {
-                       //  Image_height -= "30";
-                   }
-
-               } else {
-                   Image_width = zone_affichage.width;
-               }
-
-               //===============================================================
-               align_auto = "center";
-               if (jQuery("#theImg").css("textAlign"))
-                   align_auto = jQuery("#theImg").css("textAlign");
-
-               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 = maxWidth * parseInt(width_user) / 100;
-                   else
-                       widthmin = parseInt(width_user);
-
-                   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);
-                   }
-
-
-
-               }
-
-
-               // }
-
-               //   zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height;
-
-               zoom = echelle;
-
-               //  zone_affichage.height *= zoom;
-               //  zone_affichage.width *= zoom;
-               //=============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").outerWidth();
-
-                   m1 = jQuery(llgboframe).outerHeight();
-                   t1 = jQuery(llgboframe).position();
-
-
-                   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;
-                       }
-
-
-                       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;
-
-                   } else {
-
-                       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("height", Image_height - marges + "px")
-
-                   }
-
-
-
-                   if (jQuery("area").length > 0) {
-                       jQuery("area").each(function (i) {
-
-                           obj1 = this.rel;
-                           obj2 = this.coords;
-                           if (obj1 == "up")
-                               this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height;
-                           else if (obj1 == "prev")
-                               this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height;
-                           else if (obj1 == "next")
-                               this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height;
-
-                       });
-
-
-
-
-
-
-                   }
-
-
-               }
-
-               //=========================================================
-               //     jQuery(Cadre).css("position", "relative");
-
-               jQuery(Cadre).css("top", "0px");
-               jQuery("#standard").css("top", 0 + "px");
-               jQuery("#comments").css("top", 0 + "px");
-
-
-               //jQuery("#copyright").css("top", 0 + "px");
-
-
-               jQuery("#linkNext").height(Image_height);
-               jQuery("#linkPrev").height(Image_height);
-               //================ Zone affichage =========================
-               //  Image_height, Image_width = valeur a atteindre.
-               if (theme.match(RegExp("luciano", "g"))) {
-                   zone_affichage.height -= Bandeau_bas;
-               }
-
-               // jQuery(Cadre).height(zone_affichage.height);
-               //  jQuery(Cadre).height(mb-zone_affichage.top);
-               jQuery(Cadre).width(zone_affichage.width);
-               //==============================================================
-
-               img_finale.height = Image_height;
-               img_finale.width = Image_width;
-               //==============================================================
-
-               if (typeof (gmaps) != "undefined") {
-                   Gmap_ = gmaps.maps[0];
-                   if (Gmap_.sizeMode == 'A');
-                   {
-                       jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" });
-
-                   }
-               }
-               //==============================================================
-               if (Type_Img == "charlie") {
-                   t1 = jQuery("#charlie").position();
-                   /**/
-                   pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight"));
-                   jQuery("#charlie").css({
-                       width: Image_width + pdf,
-                       height: Image_height,
-                       margin: "auto"
-                   });
-
-
-                   jQuery("#player").css("width", Image_width + 100 + "px");
-                   jQuery("#player").css("height", Image_height);
-
-                   jQuery("#embedplayer").css("width", Image_width);
-                   jQuery("#embedplayer").css("height", Image_height);
-
-
-                   jQuery("object").width(Image_width);
-                   jQuery("object").height(Image_height);
-               } else if (Type_Img == "panorama") {
-
-                   //      jQuery(TheImg).panorama2(img_finale.height, img_finale.width);
-                   jQuery(TheImg).height(img_finale.height);
-                   jQuery(TheImg).width(img_finale.width);
-                   jQuery("#Panorama div").height(Image_height);
-                   //  class=simple_panorama
-
-                   jQuery(".panorama-viewport").css("left", "2px");
-                   jQuery(".panorama-viewport").css("width", "auto");
-                   //   setTimeout("cl_Timer()", 500);
-
-               } else if (Type_Img == "pamoorama") {
-                   return;
-                   marge_left += 0;
-                   new_width = zone_affichage.width - marge_right - marge_left;
-                   jQuery("#pamoorama").css({ margin: 0 + "px",
-                       left: marge_left + "px",
-                       height: Image_height + info_pamoorama_footer.height + "px",
-                       width: new_width + "px"
-                   });
-
-                   jQuery("#pamoorama").width(new_width);
-
-
-                   jQuery("#pamoorama_outter").css({
-                       left: marge_left + "px",
-                       height: Image_height + "px",
-                       width: (new_width) + "px"
-                   });
-                   jQuery("#pamoorama_outter").width(new_width);
-
-
-                   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();
-
-                   h_frame = jQuery("#pamoorama").width();
-                   if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) {
-
-                       /*   if (info_pamoorama_outter.width == 0)
-                       setTimeout("wait_Timer()", 100);
-                       */
-                       //     jQuery(TheImg).css("zoom", zoom);
-                   }
-
-
-               } else if (TheImg.src) {
-                   //--- background ?? ---
-                   jQuery(TheImg).height(img_finale.height);
-                   jQuery(TheImg).width(img_finale.width);
-                   jQuery(TheImg).css("height", img_finale.height + "px");
-                   jQuery(TheImg).css("width", img_finale.width + "px");
-
-               } else {
-                   //===map ? ===
-                   jQuery(TheImg).height(img_finale.height);
-                   jQuery(TheImg).width(img_finale.width);
-                   jQuery(TheImg).css("height", img_finale.height + "px");
-                   jQuery(TheImg).css("width", img_finale.width + "px");
-               }
-
-
-               try {
-                   if (theme.match(RegExp("gally", "g"))) {
-                    
-                       jQuery("#navThumbNext").height(init_taille_thumblink.height*2);
-                          jQuery("#navThumbPrev").height(init_taille_thumblink.height*2);
-
-                       jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px");
-                       jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px");
-
-                       jQuery(Cadre).height(zone_affichage.height);
-
-                   } else {
-
-                       jQuery("#imageToolBar").css("position", "static");
-                   }
-               } catch (e) {
-
-               }
-               //  
-               if (!pos) pos = jQuery("#copyright").position();
-               if (pos != jQuery("#copyright").position())
-                   pos = jQuery("#copyright").position();
-               if (pos.top > 100) jQuery("#the_page").height(pos.top);
-
-               if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return;
-               jQuery(window).resize();
-               return;
-           });
-           var pos;
-           //===================================================================	  
-           jQuery(window).resize();
-
-
-       } // function
-);                                                                                                                                                                                                                                                                                                       // ready
+              info_licencetag = jQuery(".licencetag").info();
+              if (info_licencetag.bottom > info_description.bottom) {
+                  jQuery(".licencetag").css("border", "solid 2px transparent");
+                  info_description.bottom = info_licencetag.bottom;
+
+              }
+
+              if (info_description.top < 1)
+                  info_description.top = info_description.bottom;
+
+
+              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;
+
+              info_description.top += Bandeau_t.marge_top;
+              // info_description.bottom 739 ;
+              //  info_description.height 277 ;
+              //      info_description.top 465 
+              info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top;
+              if (check_desc_v != 'checked="checked"') {
+                  info_description.height = 0;
+              }
+
+              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;
+          }
+
+          /*
+          *
+          */
+          jQuery("#pamoorama_iner").bind('resize', function () {
+              wait_Timer();
+          })
+          //============================================================//==
+          jQuery("#pamoorama_outter").bind('resize', function () {
+              wait_Timer();
+          })
+
+
+
+          //============================================================
+          jQuery("#iGMapsIcon").bind('resize', function () {
+              jQuery().recentrage_widget();
+          })
+
+
+
+
+
+
+
+          /* jQuery */
+          var img_init = { height: img_height, width: img_width };  // taille initiale
+          var img_defaut = { height: scaled_height, width: scaled_width };
+          var img_reelle = { height: img_height, width: img_width };
+          var img_finale = { height: 0, width: 0 };
+          var zone_affichage = { height: 0, width: 0 };
+
+          //============================================================
+
+          var Info_the_page = jQuery("#the_page").info();
+          var Zone_Affichage = jQuery("#theImage").info();
+
+          var Bandeau = Info_entete("theImage").img_top;
+
+          var Bandeau_bas = Info_description("theImage");
+
+          var init_taille_thumblink = { height: 0, width: 0 };
+          if (init_taille_thumblink.height == 0)
+              init_taille_thumblink = {
+                  height: jQuery(".thumbLink").height(),
+                  width: jQuery(".thumbLink").width()
+              };
+          //===================================================================	
+
+
+
+
+          /*
+          * window .resize
+          */
+          jQuery(window).resize(function (event, ui) {
+              if (typeof (event) == 'undefined') return;
+              if (!cl_visible) return;
+
+              //==========================================================================
+              var winwidth = jQuery(window).width();
+              var winheight = jQuery(window).height();
+              if (old_w == winwidth && old_h == winheight) return;
+
+
+              /*
+              * 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)
+              { old_w = winwidth; }
+              else
+              { if (old_h != winheight) old_h = winheight; }
+              //===========================================================================
+
+
+              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 Type_Img = "";
+              //====== détection du type d'images ======
+              if (jQuery("#charlie").length > 0) {
+                  Type_Img = "charlie";
+              } else if (jQuery("#pamoorama").length) {
+                  Type_Img = "pamoorama";
+              } else if (jQuery("#theImage embed").length > 0) {
+                  Type_Img = "embed";
+              } else if (jQuery("#map").length) {
+                  Type_Img = "map";
+              } else if (jQuery("#Panorama").length) {
+                  Type_Img = "panorama";
+              } else if (jQuery(Cadre).find("img").length > 0) {
+                  Type_Img = "img";
+              } else if (jQuery("img").length > 0) {
+                  Type_Img = "img_autre";
+                  return;
+              } else {
+                  return;
+              }
+
+
+
+              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");
+
+
+              var marge_right = 0;
+              var marge_left = 0;
+              if (info_content.width > 100) {
+                  marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right);
+                  winwidth = info_content.width;
+                  marge_right = info_imageInfoBar.width + marge_right;
+              }
+              else
+                  winwidth = info_ToolBar.width - 2;
+
+              //  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();
+                  var info_pamoorama_outter = jQuery("#pamoorama_outter").info();
+                  var info_pamoorama_inner = jQuery("#pamoorama_inner").info();
+                  var info_pamoorama_footer = jQuery("#pamoorama_footer").info();
+                  TheImg = jQuery("#pamoorama");
+
+                  /*
+                  pamoorama_outter
+                  pamoorama_inner
+                  pamoorama_footer
+                  pamoorama_caption
+                  pamoorama_thumb
+                  pamoorama_frame
+                  */
+              } else {
+                  //==== récupère Img la plus grande  =====
+                  if (jQuery("#theImg")) IMG = "#theImg";
+                  else IMG = Cadre;
+
+                  TheImg2 = Get_Img_Maxi(IMG + " img");
+                  //=================================================================
+                  if (TheImg2 == null) {
+                      if (jQuery(Cadre).find("img").length > 0) {
+                          IMG = Cadre;
+                          TheImg = Get_Img_Maxi("#theImage img");
+                      }
+                  } else {
+                      TheImg = TheImg2  //luciano ?
+
+                  }
+              }
+              //=================================================================
+
+
+              switch (Type_Img) {
+                  case "map":
+                      var info_image = jQuery("#map").info();
+
+                      var info_map = jQuery("#mapPicture").info();
+
+                      marge_left = info_map.width;
+                      jQuery("#map").css("left", marge_left);
+
+                      var TheImg = jQuery("#map").get(0);
+                      info_image = jQuery("#map").info();
+
+
+                      pos_page = jQuery("#the_page").info();
+                      ;
+
+                      break
+
+
+                  case "panorama":
+
+                      var w00 = 0;
+                      jQuery("#Panorama img").each(function (i) {
+                          w0 = this.width;
+                          if (w0 > w00) {
+                              TheImg = this;
+                              n = TheImg.nameProp;
+                              w00 = w0;
+                          }
+                      });
+
+                      pos_image = jQuery(TheImg).info();
+                      pos_page = jQuery("#the_page").info();
+
+                      break
+                  case "img":
+
+                      if (!TheImg) return;
+                      pos_image = jQuery(TheImg).info();
+                      pos_page = jQuery("#the_page").info();
+
+
+                      break
+                  case "img_autre":
+                      if (!TheImg) return;
+                      pos_image = jQuery(TheImg).position();
+                      pos_page = jQuery("#the_page").position();
+
+
+                      break
+                  case "embed":
+                      //
+
+                      TheImg = jQuery(Cadre).find("embed");
+
+                      pos_image = jQuery(Cadre).position();
+                      pos_page = jQuery("#the_page").position();
+                      if (rapport < 0) {
+                          img_height = parseInt(jQuery(TheImg).outerHeight());
+                          img_width = parseInt(jQuery(TheImg).outerWidth());
+
+                          img_reelle.height = img_height;
+                          img_reelle.width = img_width;
+
+                      }
+
+                      break
+                  case "charlie":
+
+                      TheImg = jQuery('#charlie object').get(0);
+                      pos_image = jQuery(Cadre).position();
+                      pos_page = jQuery("#the_page").position();
+                      if (rapport < 0) {
+                          img_height = parseInt(TheImg.height);
+                          img_width = parseInt(TheImg.width);
+
+                          img_reelle.height = parseInt(TheImg.height);
+                          img_reelle.width = parseInt(TheImg.width);
+                      }
+
+                      break
+                  case "pamoorama":
+                      //=========================================================
+                      var Images = jQuery("#pamoorama img");
+                      var Image = jQuery("#pamoorama").find("img");
+
+                      pos_image = jQuery("#pamoorama").info();
+                      pos_page = jQuery("#the_page").info();
+                      break
+
+
+              }
+
+              //=============== Vérification taille minimale  autorizée ======================
+              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");
+
+              mini_width = parseInt(miniWidth);
+              mini_height = parseInt(miniHeight);
+
+              img_reelle.width = parseInt(img_reelle.width);
+
+
+              if (img_reelle.width < mini_width) return;
+
+              img_reelle.height = parseInt(img_reelle.height);
+              if (img_reelle.height < parseInt(mini_height)) return;
+              //==================================================================================   
+              if (rapport < 0) {
+
+                  img_init.height = parseInt(img_height);
+                  img_init.width = parseInt(img_width);
+
+                  rapport = img_width / img_height;
+
+                  if (Type_Img != "map")
+                      rapport = (img_init.width / img_init.height);
+                  else
+                      rapport = 0;
+
+              }
+
+
+              //=============== 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;
+
+
+
+              //===========================================================================  
+              var sel0 = { top: 0 };
+
+
+
+
+
+              //==================================================================================
+              jQuery("#theImage #theImg IMG").css("marginTop", "0px")
+
+              var h = 15;
+              if (theme.match(RegExp("sobre", "g"))) {
+                  h += 0; //??
+              } else if (theme.match(RegExp("Pure", "g"))) {
+                  h += 0; //??
+              } else if (theme.match(RegExp("luciano", "g"))) {
+                  h += 0; //??
+              } else if (theme.match(RegExp("simple", "g"))) {
+                  h += 0; //??
+              } else if (theme.match(RegExp("gally", "g"))) {
+                  h += 0; //??
+
+              }
+              //================ Licence  ========================
+              var Licence = jQuery(".licencetag");
+              if (Licence.length > 0) {
+                  jQuery(".licencetag").css("padding", "0px");
+
+              }
+              //====================================================
+              info_img = jQuery(TheImg).info();
+
+
+              //=========================================================================
+              img_top = Bandeau;
+              //============ 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);
+
+              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;
+
+              //=============================================================
+              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;
+
+                  if (theme.match(RegExp("gally", "g"))) {
+                      //  Image_height -= "30";
+                  }
+
+              } else {
+                  Image_width = zone_affichage.width;
+              }
+
+              //===============================================================
+              align_auto = "center";
+              if (jQuery("#theImg").css("textAlign"))
+                  align_auto = jQuery("#theImg").css("textAlign");
+              var widthmin = Image_width;
+
+              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 = maxWidth * parseInt(width_user) / 100;
+                  else
+                      widthmin = parseInt(width_user);
+
+                  widthmin -= Get_Val_int(info_img.borderwidth.left);
+                  widthmin -= Get_Val_int(info_img.borderwidth.right);
+
+
+
+                  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);
+                  }
+
+
+
+              }
+
+
+              // }
+
+              //   zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height;
+
+              zoom = echelle;
+
+              //  zone_affichage.height *= zoom;
+              //  zone_affichage.width *= zoom;
+              //=============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").outerWidth();
+
+                  m1 = jQuery(llgboframe).outerHeight();
+                  t1 = jQuery(llgboframe).position();
+
+
+                  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;
+                      }
+
+
+                      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;
+
+                  } else {
+
+                      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("height", Image_height - marges + "px")
+
+                  }
+
+
+
+                  if (jQuery("area").length > 0) {
+                      jQuery("area").each(function (i) {
+
+                          obj1 = this.rel;
+                          obj2 = this.coords;
+                          if (obj1 == "up")
+                              this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height;
+                          else if (obj1 == "prev")
+                              this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height;
+                          else if (obj1 == "next")
+                              this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height;
+
+                      });
+
+
+
+
+
+
+                  }
+
+
+              }
+
+              //=========================================================
+              //     jQuery(Cadre).css("position", "relative");
+
+              jQuery(Cadre).css("top", "0px");
+              jQuery("#standard").css("top", 0 + "px");
+              jQuery("#comments").css("top", 0 + "px");
+
+
+              //jQuery("#copyright").css("top", 0 + "px");
+
+
+              jQuery("#linkNext").height(Image_height);
+              jQuery("#linkPrev").height(Image_height);
+              //================ Zone affichage =========================
+              //  Image_height, Image_width = valeur a atteindre.
+              if (theme.match(RegExp("luciano", "g"))) {
+                  zone_affichage.height -= Bandeau_bas;
+              }
+
+              // jQuery(Cadre).height(zone_affichage.height);
+              //  jQuery(Cadre).height(mb-zone_affichage.top);
+              jQuery(Cadre).width(zone_affichage.width);
+              //==============================================================
+
+              img_finale.height = Image_height;
+              img_finale.width = Image_width;
+              //==============================================================
+
+              if (typeof (gmaps) != "undefined") {
+                  Gmap_ = gmaps.maps[0];
+                  if (Gmap_.sizeMode == 'A');
+                  {
+                      jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" });
+
+                  }
+              }
+              //==============================================================
+              if (Type_Img == "charlie") {
+                  t1 = jQuery("#charlie").position();
+                  /**/
+                  pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight"));
+                  jQuery("#charlie").css({
+                      width: Image_width + pdf,
+                      height: Image_height,
+                      margin: "auto"
+                  });
+
+
+                  jQuery("#player").css("width", Image_width + 100 + "px");
+                  jQuery("#player").css("height", Image_height);
+
+                  jQuery("#embedplayer").css("width", Image_width);
+                  jQuery("#embedplayer").css("height", Image_height);
+
+
+                  jQuery("object").width(Image_width);
+                  jQuery("object").height(Image_height);
+              } else if (Type_Img == "panorama") {
+
+                  //      jQuery(TheImg).panorama2(img_finale.height, img_finale.width);
+                  jQuery(TheImg).height(img_finale.height);
+                  jQuery(TheImg).width(img_finale.width);
+                  jQuery("#Panorama div").height(Image_height);
+                  //  class=simple_panorama
+
+                  jQuery(".panorama-viewport").css("left", "2px");
+                  jQuery(".panorama-viewport").css("width", "auto");
+                  //   setTimeout("cl_Timer()", 500);
+
+              } else if (Type_Img == "pamoorama") {
+                  return;
+                  marge_left += 0;
+                  new_width = zone_affichage.width - marge_right - marge_left;
+                  jQuery("#pamoorama").css({ margin: 0 + "px",
+                      left: marge_left + "px",
+                      height: Image_height + info_pamoorama_footer.height + "px",
+                      width: new_width + "px"
+                  });
+
+                  jQuery("#pamoorama").width(new_width);
+
+
+                  jQuery("#pamoorama_outter").css({
+                      left: marge_left + "px",
+                      height: Image_height + "px",
+                      width: (new_width) + "px"
+                  });
+                  jQuery("#pamoorama_outter").width(new_width);
+
+
+                  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();
+
+                  h_frame = jQuery("#pamoorama").width();
+                  if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) {
+
+                      /*   if (info_pamoorama_outter.width == 0)
+                      setTimeout("wait_Timer()", 100);
+                      */
+                      //     jQuery(TheImg).css("zoom", zoom);
+                  }
+
+
+              } else if (TheImg.src) {
+                  //--- background ?? ---
+                  jQuery(TheImg).height(img_finale.height);
+                  jQuery(TheImg).width(img_finale.width);
+                  jQuery(TheImg).css("height", img_finale.height + "px");
+                  jQuery(TheImg).css("width", img_finale.width + "px");
+
+              } else {
+                  //===map ? ===
+                  jQuery(TheImg).height(img_finale.height);
+                  jQuery(TheImg).width(img_finale.width);
+                  jQuery(TheImg).css("height", img_finale.height + "px");
+                  jQuery(TheImg).css("width", img_finale.width + "px");
+              }
+
+
+              try {
+                  if (theme.match(RegExp("gally", "g"))) {
+
+                      jQuery("#navThumbNext").height(init_taille_thumblink.height * 2);
+                      jQuery("#navThumbPrev").height(init_taille_thumblink.height * 2);
+
+                      jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px");
+                      jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px");
+
+                      jQuery(Cadre).height(zone_affichage.height);
+
+                  } else {
+
+                      jQuery("#imageToolBar").css("position", "static");
+                  }
+              } catch (e) {
+
+              }
+              //  
+              if (!pos) pos = jQuery("#copyright").position();
+              if (pos != jQuery("#copyright").position())
+                  pos = jQuery("#copyright").position();
+              if (pos.top > 100) jQuery("#the_page").height(pos.top);
+
+              if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return;
+              jQuery(window).resize();
+              return;
+          });
+          var pos;
+          //===================================================================	  
+          jQuery(window).resize();
+
+
+      } // function
+);                                                                                                                                                                                                                                                                                                         // ready
     /*
 *
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 7353)
+++ /extensions/Autosize/main.inc.php	(revision 7354)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.2.3
+Version: 1.2.4
 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
