Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl	(revision 7315)
+++ /extensions/Autosize/admin/template/admin.tpl	(revision 7316)
@@ -27,4 +27,7 @@
      var user_status = '{$user_status}';
      var check_auto_w = '{$check_auto_w}';
+
+     var check_desc_v = '{$check_desc_v}';
+
      </script>
     {known_script id="jquery" src="themes/default/js/jquery.packed.js"}
@@ -132,5 +135,5 @@
  
 </tr>
-<!--=================== Bloc Alignement =============================-->	 
+
 <tr >  
 <td class="cluetip" title="{'cl_autosize_marge_basse'|translate}|{'cl_autosize_hlp_line5'|@translate}" > {'cl_autosize_marge_basse'|translate}</td>
@@ -147,8 +150,16 @@
   </fieldset>
  </table>
+ <!--=================== Bloc choix =============================-->	 
  <table>
   <tr><td style="visibility:visible">{'cl_autosize_icon_view'|@translate}
          <input type="checkbox" name="check_icon_v" value="on"  {$check_icon_v}  />
-  </td><td></td><td></td></tr>
+  </td>
+  <td>{'cl_autosize_desc_view'|@translate}
+         <input type="checkbox" name="check_desc_v" value="on"  {$check_desc_v}  />
+  </td>
+  <td>
+  </td>
+  
+  </tr>
 </table>
  
Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 7315)
+++ /extensions/Autosize/autosize.inc.php	(revision 7316)
@@ -114,10 +114,7 @@
  * conflit =============================================
  */
-	static public function cl_autosize_script()
-	{
-	   global  $template,$user,$conf ;
-
- 
-		$my_path = dirname(__FILE__).'/';
+	static public function cl_autosize_script($pictures)
+	{	$my_path = dirname(__FILE__).'/';
+		   global  $template,$user,$conf ;
 		$template->set_filenames(
 		     array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl')
@@ -131,6 +128,7 @@
 						 );
 
-		   return $template->parse( 'autosize_cl_init', false);
-
+		   $template->parse( 'autosize_cl_init', false);
+
+ return $pictures;
        
 	}// function cl_autosize_script
@@ -232,14 +230,14 @@
 
 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') )  {  
-
- 	$autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ;
+		$autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_icon_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" ;
 	 }else{
-   $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->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') ;  
    }
-if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') )  { 
-   $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ;
-	 }else{
-   $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') ; ;
-   }
+ 
+
 return $autosize_parametres;
 }
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php	(revision 7315)
+++ /extensions/Autosize/include/affiche.php	(revision 7316)
@@ -2,4 +2,6 @@
 
 $visible=(isset($visible))?$visible:false;
+
+
 
 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
@@ -26,4 +28,5 @@
                     '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,
@@ -36,5 +39,6 @@
                     'normal_width' => $autosize_parametres->normal_width,
                     'normal_height' => $autosize_parametres->normal_height,
-					'user_status'   => get_user_status($user_status) 
+					'user_status'   => get_user_status($user_status)  
+					
 				 )
 				);	
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 7315)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 7316)
@@ -26,4 +26,5 @@
 var user_status = '{$user_status}';
 var check_auto_w = '{$check_auto_w}';
+var check_desc_v = '{$check_desc_v}';
 */
 
@@ -100,52 +101,112 @@
 *
 */
- jQuery(document).ready(
-
-
-    function (jQuery) {
-        /* 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 };
+     //============================================================
         /*
-        * 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;
-                        }
+ 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 -
+                              (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_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_the_page.borderwidth.top) +
+                                      Get_Val_int(Zone_Affichage.borderwidth.top);
+
+             return { marge_top: Bandeau_t, img_top: Bandeau };
 
                 }
-            });
-            return TheImg;
+
+        /* 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) {
+                 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);
+                 }
+
+
+
+
+             });
+             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;
+
         }
-
-
-        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()
-            };
-        //===================================================================	
-
-        var old_h = 0;
-        var rapport = -1;
-
         /*
         * Get_val_int
@@ -210,635 +271,703 @@
         *
         */
-
-
-        /*
-        * 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;
-
-            if (old_w != winwidth)
-            { old_w = winwidth; }
-            else
-            { if (old_h != winheight) old_h = winheight; }
-            //===========================================================================
-            Cadre = jQuery("#theImage").get(0);
-            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;
-            }
-
-
-            //===============  Information cadre ======
-
-            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 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 marge_right = 0;
-            var marge_left = 0;
-            if (info_content.width > 100) {
-                var 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;
-
-            //======================================================================
-
-            if (Type_Img == "pamoorama") {
-                var info_pamoorama = jQuery("#pamoorama").info();
-                var info_pamoorama = jQuery("#pamoorama_outter").info();
-                var info_pamoorama = jQuery("#pamoorama_inner").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":
-                    //
-
-                    var 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":
-
-                    var 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);
-
-            maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth);
-            maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight);
-
-            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 = jQuery("#theImage").css("borderWidth");
-            borderW = Get_Val_int(borderW, 2);
-
-            zone_affichage.width = winwidth - (borderW * 2);
-            zone_affichage.height = winheight - marge_top;
-
-
-
-            //===========================================================================  
-            var sel0 = { top: 0 };
-
-
-
-
-            if (info_ToolBar.height > 0) {
-                Bandeau = info_ToolBar.bottom;
-
-            }
-            else {
-
-                Bandeau = info_HeaderBar.bottom;
-            }
-
-
-            //==================================================================================
-            jQuery("#theImage #theImg IMG").css("marginTop", "0px")
-            var Lmt = 0;
-
-            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; //??
-
-            }
-
-
-            if (Type_Img != "map") {
-                //=============== Description ================
-                Parent = "theImage";
-                if (jQuery("#" + Parent + " br").length > 0) {
-                    jQuery("#" + Parent + " br").remove();
-                }
-                //=============================================
-                var Description = jQuery("#" + Parent + " p");
-                jQuery(Description).each(function (i) {
-                    t = jQuery(this).text();
-                    p0 = jQuery(this).parent().get(0);
-                    if (p0.id == Parent || p0.nodeName == "TD") {
-                        if (jQuery(this).text() == "")
-                            jQuery(this).remove();
-                        else {
-                            h += 10;
-                            h += jQuery(this).info().height;
-                        }
-
-
-                    }
-
-                });
-                //================ Licence  ========================
-
-                var Licence = jQuery(".licencetag");
-                if (Licence.length > 0) {
-                    var info_licence = jQuery(".licencetag").info();
-                    h += info_licence.height;
-                    jQuery(".licencetag").css("padding", "0px");
-                    jQuery(".licencetag img").css("position", "static");
-
-                    Licence = Licence.parent();
-
-
-                    //====================================================================
-
-
-
-                }
-
-
-
-                //  zone_affichage.height -= h;
-            }
-
-            info_img = jQuery(TheImg).info();
-            info_licence = jQuery(".licencetag").info();
-            Lmt = info_licence.top - info_img.bottom
-            var Bandeau_bas = h;
-
-            //=========================================================================
-            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 - img_padding_top;
-
-            //=============================================================
-            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);
-
-            if (rapport > 0)
-                var Image_width = parseInt(Image_height * rapport);
-
-            else if (Type_Img == "map") {
-                var Image_width = zone_affichage.width - marge_left - marge_right;
-
-                if (theme.match(RegExp("gally", "g"))) {
-                    //  Image_height -= "30";
-                }
-
-            } else {
-                var 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 = twidth * 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);
-                }
-
-
-
-            }
-
-
-            // }
-
-            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 = twidth;
-                    } 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).width(zone_affichage.width);
-            //==============================================================
-
-            img_finale.height = Image_height;
-            img_finale.width = Image_width;
-            //==============================================================
-
-
-            if (Type_Img == "charlie") {
-                t1 = jQuery("#charlie").position();
-                /**/
-                pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight"));
-                jQuery("#charlie").css("width", Image_width + pdf);
-                jQuery("#charlie").css("height", Image_height);
-                jQuery("#charlie").css("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") {
-                marge_left += 0;
-                new_width = zone_affichage.width - marge_right - marge_left;
-                jQuery("#pamoorama").css("margin", 0 + "px");
-                jQuery("#pamoorama").css("left", marge_left + "px");
-                jQuery("#pamoorama").css("height", Image_height + "px");
-
-                jQuery("#pamoorama").css("width", new_width + "px");
-                jQuery("#pamoorama").width(new_width);
-
-
-                jQuery("#pamoorama_outter").css("left", marge_left + "px");
-
-                jQuery("#pamoorama_outter").css("height", Image_height + "px");
-
-                jQuery("#pamoorama_outter").css("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(".thumbLink").css("height", init_taille_thumblink.height + "px");
-                    jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px");
-                
-                } 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
-
-/* Extension
- * absolutize:
- * relativize:
- */
+        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(document).ready(
+       function (jQuery) {
+           /* 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()
+               };
+           //===================================================================	
+
+           var old_h = 0;
+           var rapport = -1;
+
+
+           /*
+           * 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);
+
+
+               maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth);
+               maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight);
+
+               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
+    /*
+*
+*/
+    jQuery.extend(jQuery.expr[':'], {
+        // Nom du sélecteur personnalisé
+        Description: function (a) {
+            n = jQuery(a).info();
+            return a;
+
+        }
+    });
+
+    /* Extension
+    * absolutize:
+    * relativize:
+    */
 //=========================================================
     jQuery.fn.extend({
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js	(revision 7315)
+++ /extensions/Autosize/js/conflit.js	(revision 7316)
@@ -2,5 +2,5 @@
 var d1 = 0;
 var init_tb = 0;
- 
+
 function $(element, nc) {
     //============== détection framework ==================
@@ -45,120 +45,123 @@
    var  jq = jQuery(element).selector;
    var  new_element = jQuery(element);
-
-   if (Prototype_Version == "0" && MooTools_version == "0") {
-       if (jq == "#iGMapsIconContent") {
-           
+   //div.gmapsPopup div.ui-dialog-titlebar
+   if (jq.match(/GMaps/) || jq.match(/gmaps/)) {   
+       if (jq == "#iGMapsIconContent") {           
            setTimeout('jQuery().recentrage_widget()', 0);
-           return new_element;
-          
        }
-         return new_element;
+       if (new_element.length > 0) return new_element;
+       return new_element;
+       }
+       if (Prototype_Version == "0" && MooTools_version == "0") {   
+      return new_element;
     }
 //=======================================================================================
-    if (arguments.caller && arguments.caller.length>0 ) {
+    if (arguments.caller && arguments.caller.length > 0) {
         if (arguments.caller.length > 1) {
             if (element == "pamoorama") {
-                return jQuery().$Pamoorama(element) ;
+                return jQuery().$Pamoorama(element);
             }
-
-            //=========== options rv_maps prototype.js ===================================   
             arg = arguments.caller[1];
-            if (Prototype_Version != '0')
-            switch (arg) {
-                case "dom:loaded":
-                    return element;
-                    return jQuery().$Protype(element);
-                    break;
-                case "load":
-                    return jQuery().$Protype(element); 
-                    break;
-                case "unload":
-                    return jQuery().$Protype(element);
-                    break;
-                case "prototype_event_registry":
-
-                    try {
-                        new_element = jQuery().$Protype(element);
-                    } catch (e) {
-                        new_element = null;
+            if (typeof (arg) != "undefined" && typeof (arg) != undefined) {
+                //=========== options rv_maps prototype.js ===================================   
+
+                if (Prototype_Version != '0')
+                    switch (arg) {
+                    case "dom:loaded":
+                        return element;
+                        return jQuery().$Protype(element);
+                        break;
+                    case "load":
+                        return jQuery().$Protype(element);
+                        break;
+                    case "unload":
+                        return jQuery().$Protype(element);
+                        break;
+                    case "prototype_event_registry":
+
+                        try {
+                            new_element = jQuery().$Protype(element);
+                        } catch (e) {
+                            new_element = null;
+                        }
+
+
+                        return new_element;
+                        break;
+                    case "readystatechange":
+                        try {
+                            new_element = jQuery().$Protype(element);
+                        } catch (e) {
+                            new_element = null;
+                        }
+
+                        return new_element;
+                        break;
+                }
+
+                if (MooTools_version == 'pamoorama' && typeof (arg) != undefined)
+                //=========== options pamoorama ===================================  
+                {
+                    var reg1 = new RegExp("pamoorama", "g");
+                    switch (arg) {
+                        case "bottom":
+                            return jQuery().$Pamoorama(element);
+                            break;
+                        case "left":
+                            return jQuery().$Pamoorama(element);
+                            break;
+                        case "prototype_event_registry":
+                            return jQuery().$Pamoorama(element);
+                            break;
+                        case "readystatechange":
+                            return jQuery().$Pamoorama(element);
+                            break;
+
+                        default:
+                            if (arg.area) {
+                                return jQuery().$Pamoorama(element);
+                            } else
+                                if (arg.velocity) {
+                                    return jQuery().$Pamoorama(element);
+                                } else if (arg.src) {
+                                    return jQuery().$Pamoorama(element);
+                                } else if (arg.modifiers) {
+                                    return jQuery().$Pamoorama(element);
+                                } else if (arg.limit) {
+                                    return jQuery().$Pamoorama(element);
+                                } else if (arg.duration) {
+                                    return jQuery().$Pamoorama(element);
+                                } else if (arg.id) {
+                                    switch (arg.id) {
+                                        case "pamoorama_footer":
+                                            return jQuery().$Pamoorama(element);
+                                            break;
+                                        case "pamoorama_outter":
+                                            return jQuery().$Pamoorama(element);
+                                            break;
+                                        case "pamoorama_inner":
+                                            return jQuery().$Pamoorama(element);
+                                            break;
+
+                                        default:
+                                            return jQuery().$Pamoorama(element);
+                                            break;
+
+                                    }
+                                } else if (arg.src) {
+                                    return jQuery().$Pamoorama(element);
+
+                                }
+                            //=======================================================
+                            return new_element;
+                            break;
+
                     }
-
-                   
-                    return new_element;
-                    break;
-                case "readystatechange":
-                    try {
-                        new_element = jQuery().$Protype(element);
-                    } catch (e) {
-                        new_element = null;
-                    }
-
-                    return new_element; 
-                    break;
+                } else if (MooTools_version == 'Luciano') { //=========== options luciano =================================== 
+                    //=== theme Luciano ====
+                    return ret_Luciano;
+                }
+
             }
-
-            if (MooTools_version == 'pamoorama')
-            //=========== options pamoorama ===================================  
-            {
-                var reg1 = new RegExp("pamoorama", "g");
-                switch (arg) {
-                    case "bottom":
-                        return jQuery().$Pamoorama(element) ;
-                        break;
-                    case "left":
-                        return jQuery().$Pamoorama(element) ;
-                        break;
-                    case "prototype_event_registry":
-                        return jQuery().$Pamoorama(element) ;
-                        break;
-                    case "readystatechange":
-                        return jQuery().$Pamoorama(element);
-                        break;
-
-                    default:
-                        if (arg.area) {
-                            return jQuery().$Pamoorama(element);
-                        } else
-                            if (arg.velocity) {
-                                return jQuery().$Pamoorama(element);
-                            } else if (arg.src) {
-                                return jQuery().$Pamoorama(element);
-                            } else if (arg.modifiers) {
-                                return jQuery().$Pamoorama(element);
-                            } else if (arg.limit) {
-                                return jQuery().$Pamoorama(element);
-                            } else if (arg.duration) {
-                                return jQuery().$Pamoorama(element);
-                            } else if (arg.id) {
-                                switch (arg.id) {
-                                    case "pamoorama_footer":
-                                        return jQuery().$Pamoorama(element);
-                                        break;
-                                    case "pamoorama_outter":
-                                        return jQuery().$Pamoorama(element);
-                                        break;
-                                    case "pamoorama_inner":
-                                        return jQuery().$Pamoorama(element);
-                                        break;
-
-                                    default:
-                                        return jQuery().$Pamoorama(element);
-                                        break;
-
-                                }
-                            } else if (arg.src) {
-                                return jQuery().$Pamoorama(element);
-
-                            }
-                        //=======================================================
-                            return new_element;
-                        break;
-
-                }
-            }else if (MooTools_version=='Luciano')
-             { //=========== options luciano =================================== 
-                 //=== theme Luciano ====
-                 return ret_Luciano;
-             }
         }
     }
@@ -174,5 +177,5 @@
               }
           id = "window_" + new Date().getTime();
-              var reg1 = new RegExp("^window_", "g");
+              reg1 = new RegExp("^window_", "g");
               if (element.match(reg1, "g")) {
                   
@@ -262,5 +265,5 @@
         return new_element;
     }
-    //==========================================================
+    //========= ????  ===================
     if (new_element.context)
         if (new_element.context.loaded) {
@@ -268,6 +271,12 @@
         if (MooTools_version == "Luciano")  return ret_Luciano;
         //=== theme gally ? ====
-        
-            return new_element;
+        if (Prototype_Version != '0') {
+            //=== rvmaps ===
+            try {
+                return jQuery(element); 
+            } catch (e) {
+               return jQuery().$Protype(element);
+            }
+        }
         }
     init_tb = 0;
Index: /extensions/Autosize/language/en_UK/lang.php
===================================================================
--- /extensions/Autosize/language/en_UK/lang.php	(revision 7315)
+++ /extensions/Autosize/language/en_UK/lang.php	(revision 7316)
@@ -1,4 +1,5 @@
 <?php
 global $lang;
+$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";
 $lang['cl_autosize_info_2'] = "No resizing Display.";
Index: /extensions/Autosize/language/fr_FR/lang.php
===================================================================
--- /extensions/Autosize/language/fr_FR/lang.php	(revision 7315)
+++ /extensions/Autosize/language/fr_FR/lang.php	(revision 7316)
@@ -1,4 +1,5 @@
 <?php
 global $lang;
+$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";
 $lang['cl_autosize_info'] = "Permet d'ajuster automatiquement l'affichage en fonction de la fenêtre de l'explorateur.";
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 7315)
+++ /extensions/Autosize/main.inc.php	(revision 7316)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.2.2
+Version: 1.2.3
 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
@@ -16,9 +16,12 @@
 
 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('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 
+//add_event_handler('loc_begin_page_header', array(&$autosize_controler,'cl_autosize_script'),20 );
+//add_event_handler('loc_begin_picture', array(&$autosize_controler,'cl_autosize_script'),20 );
+add_event_handler('loc_begin_page_tail', array(&$autosize_controler,'cl_autosize_script'),100 );
+
+add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 
 //add_event_handler('amd_jpegMD_loaded', array(&$autosize_controler, 'cl_autosize_affiche'),45);
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 100 ); 
+//add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 100 ); 
 
 ?>
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 7315)
+++ /extensions/Autosize/template/autosize.tpl	(revision 7316)
@@ -34,4 +34,5 @@
     var user_status = '{$user_status}';
     var check_auto_w = '{$check_auto_w}';
+    var check_desc_v = '{$check_desc_v}';
      </script>
 
Index: /extensions/Autosize/template/cl_conflit.tpl
===================================================================
--- /extensions/Autosize/template/cl_conflit.tpl	(revision 7315)
+++ /extensions/Autosize/template/cl_conflit.tpl	(revision 7316)
@@ -1,18 +1,6 @@
-
 {html_head}
-<!--- autosize/cl_confilt.tpl (head) --->
-
-<script type="text/javascript">
-
-</script>
-<!---FIN auto/cl_confilt.tpl  --->
-
-
 <!--- autosize/cl_confilt.tpl (before) ---> 
 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } 
 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
 <!---FIN auto/cl_confilt.tpl (before) --->	
-{/html_head} 
- 
-
-    
+{/html_head}    
