Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 12526)
+++ /extensions/Autosize/autosize.inc.php	(revision 12527)
@@ -29,6 +29,6 @@
 		global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
  
-  header ('X-UA-Compatible: n=7')  ;
-   header ('X-UA-Compatible: IE=Edge')  ;
+ // header ('X-UA-Compatible: n=7')  ;
+ // header ('X-UA-Compatible: IE=Edge')  ;
   if(isset($page['body_id']) &&	$page['body_id'] == 'theAdminPage' ) return ;
 
@@ -50,5 +50,4 @@
 $DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ; 
 //=================================================================================================
-
     $autosize_parametres =	 cl_autosize_Get_Options() ;			
     $theme=$user['theme'];
@@ -64,5 +63,5 @@
         'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH)  ,
         'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
-        'Version_pwg' => PHPWG_VERSION
+        'Version_pwg' => PHPWG_VERSION       
          )
     );
@@ -72,5 +71,5 @@
  //===========================================================
  /*
-  * cl_autosize_script_2(admin)
+  * cl_autosize_script_2()
  */
  static public function cl_autosize_script_2()
@@ -90,5 +89,6 @@
 			$theme=$user['theme'];
  			if ($ma_page=='thePiwiShackControllerPage') return ;
-			
+
+
 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
@@ -96,6 +96,15 @@
 $img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480;
 $img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320;
+
+
+
+
 $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width               ;
 $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height              ;
+if(isset($_COOKIE['img_w'])){
+$src_img_w=$_COOKIE['img_w'];
+$src_img_h=$_COOKIE['img_h'];
+}
+
 $window_height= isset($_POST['window_height'])?$_POST['window_height']: $img_scaled_height ;
 $window_width= isset($_POST['window_width'])?$_POST['window_width']: $img_scaled_width    ;
@@ -107,4 +116,5 @@
             'window_height' =>$window_height,
             'window_width' => $window_width
+
           );
 
@@ -122,9 +132,9 @@
 					)
 						);
-						 
+
 			$autoscript="<script type='text/javascript'>
 			/* cl_autosize_script_2 */
 			if (typeof (save_framework) == 'function')
-			   save_framework('".$ma_page."');
+			   save_framework('".$ma_page."');      
 			</script>";
           
@@ -179,4 +189,5 @@
 						$template->assign('cl_autosize_button', 
 						array(	'cl_autosize_info' => 'cl_autosize_info' ,
+            'cl_autosize_info_1' => 'cl_autosize_info_' ,  
 								    'cl_autosize_info_2' => 'cl_autosize_info_2' ,    
 								    'URL' => $_SERVER['REQUEST_URI'] ,
Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css	(revision 12526)
+++ /extensions/Autosize/css/autosize.css	(revision 12527)
@@ -80,9 +80,5 @@
 }
 #form_autosize_picture { 
-  z-index: -100;
-  display: none;
-  visibility: hidden;
-  position:fixed;
-  top:-200px;
+
 }
 .Image {
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 12526)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 12527)
@@ -1,5 +1,7 @@
 Parent = "#theImage";
+// problème avec GMaps+diaporama:
+// corriger   gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow'])) 
 function Toggle_bp() {
-    cl_visible = !cl_visible;
+  cl_visible = !cl_visible;
   set_cl();
   jQuery().newResize();
@@ -8,9 +10,17 @@
   function set_cl(){
   if (typeof cl_visible == "undefined") return;
-    if (typeof src1 == "undefined") return;
+  if (typeof src1 == "undefined") return;
+
     if (cl_visible) src = src1;
     else src = src2;
-    if (cl_visible) src_info = src3;
-    else src_info = src4;
+
+    if (cl_visible) {
+      src_info = src3;
+      src_info_1 = src3;
+    }
+    else {
+      src_info = src4;
+      src_info_1 = src5;
+    }
 
     jQuery('#bp_cla').attr('alt', src_info);
@@ -19,11 +29,13 @@
     jQuery('#bp_cla').attr('Stitle', src_info);
     jQuery('#bp_cla').attr('Stip', " ");
-
+    zoom = jQuery('#zoom ').val();
+    jQuery('#bp_cla').text(src_info_1);
+    jQuery('#bp_cla span').text(zoom+"%" );
     bp_scr = jQuery('#bp_img_cla');
 
     if (bp_scr.length > 0) {
-      bp_scr.get(0).src = src;
-    jQuery('#bp_img_cla').attr('alt', src_info);
-    jQuery('#bp_img_cla').attr('title', src_info);
+        bp_scr.get(0).src = src;
+        jQuery('#bp_img_cla').attr('alt', src_info);
+        jQuery('#bp_img_cla').attr('title', src_info);   
     }
 
@@ -66,8 +78,5 @@
 //==========================================================================
 function Wait_Affichage() {
-  href = location.href;
-
-  jQuery.post(href, function (data) { });
-   // alert("Data Loaded: " + data);  
+ 
   if (typeof fade_in == "undefined") fade_in = 1000;
     fade_in = parseInt(fade_in);
@@ -83,18 +92,22 @@
         jQuery(Parent).css({ opacity: "1" });
     } else {
-        jQuery(Parent).animate({ opacity: "1" },
+    jQuery(Parent).animate({ opacity: "1" },
                                          fade_in, "swing",
                                          function (i) {
-                                             jQuery(Parent).css({ opacity: "1" });
-                                             if (DEBUG_autosize == "true") {
-                                                 bp1 = jQuery('.debug').get(nu_img);
-                                                 if (!bp1) nu_img = 0;
-                                                 bp1 = jQuery('.debug').get(nu_img);
-                                                 jQuery(bp1).trigger('ON');
-                                             }
+                                           jQuery(Parent).css({ opacity: "1" });
+                                       if (DEBUG_autosize == "true") {
+
+                                         nu_img--;
+                                         if (nu_img < 1) nu_img = 1;
+
+                                         bp1 = jQuery('.debug').get(nu_img);
+                                         jQuery(bp1).trigger('ON');
+                                       }
                                          }
                                        );
 
-    }
+                                       }
+
+
     //   if (nu_img > 1) return;
   if (typeof theImg == "undefined") return true;
@@ -118,5 +131,7 @@
     jQuery("#window_height").val(Window_Affichage.height);
     jQuery("#window_width").val(Window_Affichage.width);
-    jQuery("#ret_autosize").trigger('ON', { width: img_w,
+
+    jQuery("#ret_autosize").trigger('ON', { 
+        width: img_w,
         height: img_h,
         theImage: theImg,
@@ -231,37 +246,37 @@
     //===============================================
 jQuery.extend(jQuery.expr[':'], {
-    // Nom du sélecteur personnalisé
-    Autosize: function (a) {
+  // Nom du sélecteur personnalisé
+  Autosize: function (a) {
     nd = a.nodeName;
-        n1 = a.className;
-        // personal_block
-        if (n1.match(RegExp("autosize", "gi"))) {
+    n1 = a.className;
+    // personal_block
+    if (n1.match(RegExp("autosize", "gi"))) {
       //   autosize = "MargeBasse:30px; ResizePicture:false"
-            infconf = jQuery(a).attr("autosize");
-            n1 = typeof infconf;
-            conf = { MargeBasse: 0, NoPicture: false }
-            if (n1 == "undefined") {
-
-            } else {
-                tableau = infconf.split(";");
-                for (var i = 0; i < tableau.length; i++) {
-                    tableau2 = tableau[i].split(":");
-                    conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]);
-                }
-                imgs = jQuery(a).find("img");
-                rap = new Array();
-                width = new Array();
-                height = new Array();
+      infconf = jQuery(a).attr("autosize");
+      n1 = typeof infconf;
+      conf = { MargeBasse: 0, NoPicture: false }
+      if (n1 == "undefined") {
+
+      } else {
+        tableau = infconf.split(";");
+        for (var i = 0; i < tableau.length; i++) {
+          tableau2 = tableau[i].split(":");
+          conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]);
+        }
+        imgs = jQuery(a).find("img");
+        rap = new Array();
+        width = new Array();
+        height = new Array();
         if (imgs.length > 0)
-                jQuery(imgs).each(function (i) {
-                    img = jQuery(this);
-                    rap.push((img.width() / img.height()));
-                    width.push(img.width());
-                    height.push(img.height());
-                });
+          jQuery(imgs).each(function (i) {
+            img = jQuery(this);
+            rap.push((img.width() / img.height()));
+            width.push(img.width());
+            height.push(img.height());
+          });
         else {
           imgs = jQuery(a).children();
           jQuery(imgs).each(function (i) {
-            if (this.height>0) {
+            if (this.height > 0) {
               rap.push(this.width / this.height);
               width.push(this.width);
@@ -274,34 +289,34 @@
         }
 
-                conf['rap'] = rap;
-                conf['width'] = width;
-                conf['height'] = height;
-
-                List_autosize.push({ obj: a, conf: conf });
-        jQuery(a).css({ opacity:0 });
-            }
-        }
-        //  Css = jQuery(a).getStyles(a);
-        return false;
-
-    },
-    Set_Class: function (a) {
+        conf['rap'] = rap;
+        conf['width'] = width;
+        conf['height'] = height;
+
+        List_autosize.push({ obj: a, conf: conf });
+        jQuery(a).css({ opacity: 0 });
+      }
+    }
+    //  Css = jQuery(a).getStyles(a);
+    return false;
+
+  },
+  Set_Class: function (a) {
     nd = a.nodeName;
     if (nd == "DIV") {
-    XBrowserAddHandler(a,'onpropertychange', onPropertyChange);
-    //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green");
-    img = jQuery(a).children("img");
-    if (img.length == 0) img = jQuery(a).find("a").children("img");
-    if (img.length > 0)
-    if (img.length == 1) {
-    if (img[0].src.match(RegExp(".png", "g")))
-    return;
-   // img[0].attachEvent('onpropertychange', onPropertyChange);
-    XBrowserAddHandler(img[0],'onpropertychange', onPropertyChange);
-    jQuery(img).addClass("Image");
-    //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true");
-    }
-    }
-    }
+      XBrowserAddHandler(a, 'onpropertychange', onPropertyChange);
+      //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green");
+      img = jQuery(a).children("img");
+      if (img.length == 0) img = jQuery(a).find("a").children("img");
+      if (img.length > 0)
+        if (img.length == 1) {
+          if (img[0].src.match(RegExp(".png", "g")))
+            return;
+          // img[0].attachEvent('onpropertychange', onPropertyChange);
+          XBrowserAddHandler(img[0], 'onpropertychange', onPropertyChange);
+          jQuery(img).addClass("Image");
+          //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true");
+        }
+    }
+  }
 });
 function XBrowserAddHandler(target,eventName,handlerName){
@@ -386,5 +401,5 @@
 jQuery(document).ready(
      function (jQuery) {
-       jQuery(':Autosize');
+       // jQuery(':Autosize');
        jQuery(window).unload(function () {
          try {
@@ -396,7 +411,7 @@
 
              if (typeof Window_Affichage != "undefined") {
-             jQuery.cookie('window_height', Window_Affichage.height);
-             jQuery.cookie('window_width', Window_Affichage.width);
-           }
+               jQuery.cookie('window_height', Window_Affichage.height);
+               jQuery.cookie('window_width', Window_Affichage.width);
+             }
            }
          } catch (r) {
@@ -410,5 +425,17 @@
        ********************************************/
        jQuery(window).load(function () {
-         jQuery(':Set_Class');
+
+         href = location.href;
+         var aff_ok = false;
+       /*
+         jQuery.post(href, function (data) {
+           nu_img--;
+           if (nu_img < 0) nu_img = 9;
+           jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+           //alert("Data Loaded: " + data);
+           Wait_Affichage();
+         });
+*/
+         // jQuery(':Set_Class');
          if (typeof img_width == "undefined") {
            if (List_autosize.length == 0) return;
@@ -457,7 +484,7 @@
          var old_window = { width: 0, height: 0 };
 
-         Bandeau_bas = Info_Description_f(Parent);        
+         Bandeau_bas = Info_Description_f(Parent);
          if (typeof Bandeau_bas == "undefined") {
- 
+
          }
          if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
@@ -519,15 +546,10 @@
            set_cl();
            if (typeof options != "undefined")
-             if (options.imageAutosize)
+             if (options.imageAutosize) {
+               Wait_Affichage();
                return true; //stripped
-           if (DEBUG_autosize == "true") {
-             nu_img += 1;
-
-             bp1 = jQuery('.debug').get(nu_img);
-             if (!bp1) nu_img = 0;
-             bp1 = jQuery('.debug').get(nu_img);
-
-             jQuery(bp1).trigger('ON');
-           }
+             }
+
+
            if (typeof cl_visible == "undefined") return true;
            if (!cl_visible == true) { return true; }
@@ -551,5 +573,5 @@
 
            var Cadre = jQuery(Parent).get(0);
-       
+
            //===============  Information cadre ======
            var info_the_page = jQuery("#the_page").infos();
@@ -588,5 +610,5 @@
            }
 
-           if(jQuery('#_Comment, ').length==0)
+           if (jQuery('#_Comment, ').length == 0)
              jQuery('.imageComment, ').wrapAll('<div id="_Comment"  />');
 
@@ -611,5 +633,6 @@
              if (theme.match(RegExp("stripped", "gi"))) {
 
-               marge = (info_the_page.width - info_HeaderBar.width) / 2;
+               info_imageHeaderBar = jQuery("#imageHeaderBar").infos();
+               marge = (info_the_page.width - info_content.width) / 2;
                marge_right = marge + 2;
                marge_left = marge + 2;
@@ -688,13 +711,13 @@
                //the theMainImage ??
                if (!theImg) {
-               theImg = jQuery("#theMainImage");
-               if (theImg.length > 0)
-                 return;
-               theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
+                 theImg = jQuery("#theMainImage");
+                 if (theImg.length > 0)
+                   return;
+                 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
                  // return;
-               if (theImg.length > 0)
-                 theImg = theImg[0];
-               else
-                 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
+                 if (theImg.length > 0)
+                   theImg = theImg[0];
+                 else
+                   theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
                }
                info_theImage = jQuery(theImg).infos();
@@ -710,5 +733,5 @@
                  theImg = jQuery("#the_page #theImg");
                }
-               info_theImage = jQuery(theImg).infos();
+
                info_the_page = jQuery("#the_page").infos();
 
@@ -857,5 +880,8 @@
            info_Licence = jQuery(".licencetag").infos();
 
-           jQuery(Parent + " #theImg IMG").css("marginTop", "0px");
+           var MainImage = jQuery("#theMainImage");
+
+           if (MainImage.length == 0) jQuery(Parent + " #theImg IMG").css("marginTop", "0px");
+
            //========== Correction en fonction du thème =============================
            var correction = 0;
@@ -889,5 +915,5 @@
 
            h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
-           if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top|0;
+           if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top | 0;
            Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
            //=========================================================================
@@ -897,7 +923,7 @@
              Zone_Affichage.width = mini_width2;
            //=========================================================================
-           if (typeof (Bandeau_bas) != "undefined") {            
+           if (typeof (Bandeau_bas) != "undefined") {
              if (Bandeau_bas.height < Zone_Affichage.height) Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
-                        } else {
+           } else {
            }
 
@@ -1122,34 +1148,52 @@
 
 
-
-             jQuery("#player").css("width", img_finale.width + "px");
-             jQuery("#player").css("height", img_finale.height);
-
-             jQuery("#embedplayer").css("width", img_finale.width);
-             jQuery("#embedplayer").css("height", img_finale.height);
-
-             jQuery("embed").css("height", img_finale.height);
-
-             jQuery("video").height(img_finale.height);
-             jQuery("video").width(img_finale.width);
-
-             jQuery("video").css({ height: img_finale.height+"px" });
-             jQuery("object").css({ height: img_finale.height+"px" });
-
-             jQuery("object").width(img_finale.width);
-             jQuery("object").height(img_finale.height);
-
-             jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
-             jQuery(theImg).height(img_finale.height);
-
-             jQuery(Cadre).css("height", "auto");  
+             if (MainImage.length > 0) {
+               img_finale.height = parseInt(img_finale.width / rapport);
+               img_finale.height -= 30;
+               img_finale.width = rapport * img_finale.height;
+
+
+               MainImage.width(img_finale.width);
+               MainImage.height(img_finale.height);
+               jQuery("#embedplayer").width(300);
+               jQuery("#embedplayer").height(15);
+             } else {
+               jQuery("#player").css("width", img_finale.width + "px");
+               jQuery("#player").css("height", img_finale.height);
+               jQuery("#embedplayer").css("width", img_finale.width);
+               jQuery("#embedplayer").css("height", img_finale.height);
+               jQuery("embed").css("height", img_finale.height);
+               jQuery("video").height(img_finale.height);
+               jQuery("video").width(img_finale.width);
+               jQuery("video").css({ height: img_finale.height + "px" });
+               jQuery("object").css({ height: img_finale.height + "px" });
+               jQuery("object").width(img_finale.width);
+               jQuery("object").height(img_finale.height);
+               jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
+               jQuery(theImg).height(img_finale.height);
+               jQuery(Cadre).css("height", "auto");
+             }
+
+
            } else if (Type_Img == "embed") {
 
-             jQuery(Cadre).css("height", "auto");
-             jQuery("embed").css("height", img_finale.height);
-             jQuery("object").css({ height: img_finale.height + "px" });
-
-             jQuery("object").width(img_finale.width);
-             jQuery("object").height(img_finale.height);
+             if (MainImage.length > 0) {
+               img_finale.height = parseInt(img_finale.width / rapport);
+               img_finale.height -= 30;
+               img_finale.width = rapport * img_finale.height;
+
+
+               MainImage.width(img_finale.width);
+               MainImage.height(img_finale.height);
+               jQuery("#embedplayer").width(300);
+               jQuery("#embedplayer").height(15);
+             } else {
+               jQuery(Cadre).css("height", "auto");
+               jQuery("embed").css("height", img_finale.height);
+               jQuery("object").css({ height: img_finale.height + "px" });
+
+               jQuery("object").width(img_finale.width);
+               jQuery("object").height(img_finale.height);
+             }
 
            } else if (Type_Img == "panorama") {
@@ -1304,6 +1348,5 @@
            zoom = parseInt(zoom * 100);
            jQuery('#zoom ').val(zoom);
-           jQuery('#bp_cla').text(zoom + "%");
-
+           jQuery('#bp_cla span').text(zoom + "%");
            //  --- réglage de la hauteur de page en fonction du copyright-----------
            if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos();
@@ -1326,12 +1369,20 @@
            info_frame = jQuery(Cadre).infos();
            if (theme.match(RegExp("stripped", "gi"))) {
+             /*
              info_theImageBox = jQuery("#theImageAndTitle").infos();
              p1 = jQuery(".randomButtons").infos();
              p2 = jQuery("#imageHeaderBar").infos();
+             p3 = info_content.top;
+             p1 = options.imageAutosizeTitle;
+
              jQuery("#theImage").width("width", info_theImageBox.width + "px");
-             jQuery("#theImageAndTitle").css("position", "relative");
-             jQuery("#theImageAndTitle").css({ marginTop: "0px",
-               paddingTop: (p1.top) + "px"
+             //jQuery("#theImageAndTitle").css("position", "relative");
+             jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px",
+             paddingTop: "0px", textAalign: "center", marginLeft: "auto"
              });
+
+             jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px",
+             paddingTop: "0px", marginLeft: "auto"
+             }); */
              t1 = info_theImageBox.top;
              l1 = info_theImageBox.left;
@@ -1351,5 +1402,5 @@
 
            Window_Affichage = info_theImageBox;
-           if (DEBUG_autosize == "true") {
+           if (DEBUG_autosize == "_true") {
              //   jQuery(Cadre).css("border", "solid green");
 
@@ -1391,5 +1442,11 @@
     var w00 = 0;
     var myImg = null;
-    img = jQuery(myobj);
+  
+    img = jQuery("#theMainImage");
+    if (img != null) {
+return;
+
+    }  
+     img = jQuery(myobj);
 
     img = jQuery('img[alt]');
@@ -1586,6 +1643,20 @@
 
       } else if (jQuery("#charlie").length > 0) {
-      info_charlie = jQuery("#charlie").infos();
-     if (jQuery("object").attr("type") == 'application/x-shockwave-flash') {
+        info_charlie = jQuery("#charlie").infos();
+        obj_charlie = jQuery("object");
+        try {
+          tp = obj_charlie.attr();
+        } catch (e) {
+          tp = obj_charlie.prop();
+        }
+
+        if (tp!=undefined) {
+          if (obj_charlie.length > 0)
+            tp = jQuery("object").attr("type") || jQuery("object").prop("type");
+          else
+            tp = jQuery("embed").attr("type") || jQuery("embed").prop("type");
+        }
+
+     if (tp == 'application/x-shockwave-flash') {
           jQuery("#charlie").css({
             paddingTop: "0px",
@@ -1602,15 +1673,27 @@
           });
         }
-        theImg = jQuery("#charlie");
-        info_img = jQuery(theImg).infos();
+
+        var MainImage = jQuery("#theMainImage");
+
+        if (MainImage.length == 0) {
+          theImg = jQuery("#charlie");
+          info_img = jQuery(theImg).infos();
+        } else {
+          theImg = jQuery("#theMainImage");
+          info_img = jQuery(theImg).infos();
+          
+        }
  
  
     } else if (jQuery(Parent + " embed").length > 0) {
-
-        theImg = jQuery(Parent + " embed");
-     
-        info_img = jQuery(theImg).infos();
-           jQuery(Parent + " embed").width({ width: info_img.width+"px", height: info_img.height + "px" });
-
+    if (jQuery("#theMainImage").lenght == 0) {
+      theImg = jQuery(Parent + " embed");
+      info_img = jQuery(theImg).infos();
+      jQuery(Parent + " embed").width({ width: info_img.width + "px", height: info_img.height + "px" });
+    } else {
+      theImg = jQuery("#theMainImage");
+      info_img = jQuery(theImg).infos();
+      Type_Img == "charlie"
+    }
 
     } else if (Type_Img == "pamoorama") {
@@ -1624,6 +1707,12 @@
         info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height);
 
-    } else {
-        theImg = jQuery(Parent + " img[alt]");
+      } else {
+        var MainImage = jQuery("#theMainImage");
+
+        if (MainImage.length == 0) {
+          theImg = jQuery(Parent + " img[alt]");
+        } else {
+          theImg = jQuery("#theMainImage");   
+        }
 
         //theImg = Get_Img_Maxi(theImg);
@@ -1678,7 +1767,9 @@
     } else if (theme.match(RegExp("stripped", "gi"))) {
         //options.imageAutosize
-        //options.imageMargin
+          //options.imageMargin
+          jQuery("#content").css({paddingTop:"5px"});
+    info_content = jQuery("#content").infos();
         if (options.imageAutosizeTitle == false) {
-            info_description.top =   info_theImageBox.bottom;
+            info_description.top =   info_theImageBox.bottom ;
 
             info_description.bottom =info_HeaderBar.margin.top+ info_description.top +
@@ -1691,6 +1782,6 @@
 
 
-            info_description.top = info_theImageBox.bottom +
-                        jQuery("#content").infos().top +
+            info_description.top = info_theImageBox.bottom -
+                        info_content.top +
                         options.imageAutosizeMargin * 2  +
                         (marges_llgbo / 2)
@@ -1759,4 +1850,5 @@
 //====================================================
 function Debug_pos() {
+  return;
     if (DEBUG_autosize == "true") {
 
@@ -1797,66 +1889,73 @@
   //'gallyInterfaceReady' 
 
-    jQuery('#pamoorama').live('ON', function (e) {
-        jQuery(jQuery('.debug').get(1)).trigger('ON');
-    if (typeof Bandeau_bas=="undefined" || Bandeau_bas.width == 0) {
-        Bandeau_bas = Info_Description_f(Parent);
-        Bandeau = Bandeau_bas.top;
-        old_window = { width: 0, height: 0 };
+  jQuery('#pamoorama').live('ON', function (e) {
+    jQuery(jQuery('.debug').get(1)).trigger('ON');
+    if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) {
+      Bandeau_bas = Info_Description_f(Parent);
+      Bandeau = Bandeau_bas.top;
+      old_window = { width: 0, height: 0 };
       jQuery(window).resize();
 
     }
 
-       // Wait_Affichage();
-    });
-
-    jQuery(Parent).live('ON', function (e) {
-        jQuery(jQuery('.debug').get(1)).trigger('ON');
-    Wait_Affichage();
-    });
-
-    // Custom Event, ON to turn on a debug.
-    jQuery('.debug').live('ON', function (e) {
-
-        jQuery('.debug').trigger('OFF');
-        jQuery(this).addClass('debugOn');
-    });
-
-    // On Click = debugs On
-    jQuery('.debug').live('click', function (e) {
-
-        jQuery(this).trigger('ON');
-    });
-
-    // Custom Event, Turn off a debug
-    jQuery('.debug').live('OFF', function (e) {
-
-        jQuery(this).removeClass('debugOn');
-    });
-
-    // on Double Click, remove the debug from the DOM
-    jQuery('.debug').live('dblclick', function () {
-
-        jQuery(this).fadeOut(function () { $(this).remove() });
-    });
-
-    // Add another debug to the DOM
-    jQuery('#adddebugs').click(function () {
-        jQuery('<div></div>')
+    // Wait_Affichage();
+  });
+
+
+
+  jQuery('#ret_autosize').live('ON', function (e) {
+    if (nu_img == "") nu_img = 8 ;
+    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+
+  });
+
+  jQuery(Parent).live('ON', function (e) {
+    if (nu_img == "") nu_img = 7;
+    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+    // Wait_Affichage();
+  });
+  // Custom Event, ON to turn on a debug.
+  jQuery('.debug').live('ON', function (e) {
+  
+    nu_img = jQuery(this).text();
+    jQuery('.debug').trigger('OFF');
+    jQuery(this).addClass('debugOn');
+   
+  });
+
+  // On Click = debugs On
+  jQuery('.debug').live('click', function (e) {
+    i = jQuery(this).text();
+    jQuery(this).trigger('ON');
+  });
+
+  // Custom Event, Turn off a debug
+  jQuery('.debug').live('OFF', function (e) {
+    jQuery(this).removeClass('debugOn');
+  });
+
+  // on Double Click, remove the debug from the DOM
+  jQuery('.debug').live('dblclick', function () {
+    jQuery(this).fadeOut(function () { jQuery(this).remove() });
+  });
+
+  // Add another debug to the DOM
+  jQuery('#adddebugs').click(function () {
+    i = jQuery('.debug').length;
+    jQuery('<div>' + i + '</div>')
             .addClass('debug')
             .appendTo('#debugsContainer');
-    });
-     
-    // Add 10 testing debugs to start with
-      jQuery(window).load(function () { 
-            DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false";
-        if (DEBUG_autosize == "true") {
-            for (var i = 0; i < 10; i++) {
-                jQuery('#adddebugs').click();
-            }
-            jQuery(jQuery('.debug').get(8)).click();
-
-          
-
-        }
-    }); //on load
+  });
+
+  // Add 10 testing debugs to start with
+  jQuery(window).load(function () {
+    DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false";
+    if (DEBUG_autosize == "true") {
+      for (var i = 0; i < 10; i++) {
+        jQuery('#adddebugs').click();
+      }
+      jQuery(jQuery('.debug').get(i - 1)).click();
+    }
+
+  }); //on load
 });
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js	(revision 12526)
+++ /extensions/Autosize/js/conflit.js	(revision 12527)
@@ -522,5 +522,5 @@
 
 librairies = new Array;
-$_ = $;
+ 
 function save_framework(page) {
     // theGategoryPage,theRegisterPage
@@ -559,10 +559,10 @@
   }
 
-  $_2 = $;
+ 
   return
 }
 
 (function ($) {
-  $(document).ready(function () {
+  jQuery(document).ready(function () {
     //=================================================
     if (typeof jQuery.fn.infos != "function") {
@@ -571,10 +571,4 @@
     }
   });
-
-})(jQuery);
-
-
-//--------------------------------------------------------------
-$_0 = $;
     function $(element, nc0) {
         if (typeof jQuery.fn.infos != "function")
@@ -584,4 +578,15 @@
         return a;
     }
+})(jQuery);
+
+ 
+//--------------------------------------------------------------
 //=== ajout des fonctions jQuery ===
-    jQuery.extend($, jQuery);
+    if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
+   //   $ = jQuery.noConflict();
+   //   jQuery.extend($, jQuery);
+    } else {
+ 
+
+    /* */
+    }
Index: /extensions/Autosize/js/conflit_2.js
===================================================================
--- /extensions/Autosize/js/conflit_2.js	(revision 12526)
+++ /extensions/Autosize/js/conflit_2.js	(revision 12527)
@@ -2,5 +2,5 @@
   //=== ajout des fonctions jQuery ===
 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
-    $mootools = window.$;
+    
   } else {
     if (typeof jQuery != 'undefined') {
Index: /extensions/Autosize/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Autosize/language/fr_FR/plugin.lang.php	(revision 12526)
+++ /extensions/Autosize/language/fr_FR/plugin.lang.php	(revision 12527)
@@ -1,4 +1,5 @@
 <?php
 global $lang;
+$lang['cl_autosize_info_1'] = "Affichage auto.";
 
 $lang['cl_autosize_hlp_line3'] = "Si la taille originale de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. "  ;
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 12526)
+++ /extensions/Autosize/main.inc.php	(revision 12527)
@@ -34,5 +34,5 @@
 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
 
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'),  EVENT_HANDLER_PRIORITY_NEUTRAL+20  ,  2);	
+add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'),  EVENT_HANDLER_PRIORITY_NEUTRAL+20  );	
 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL+21  );
 
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 12526)
+++ /extensions/Autosize/template/autosize.tpl	(revision 12527)
@@ -10,4 +10,8 @@
     var img_width='{$IMG_WIDTH }';
     var img_height = '{ $IMG_HEIGHT }';
+
+    var cookie_width='{$COOKIE_WIDTH }';
+    var cookie_height = '{ $COOKIE_HEIGHT }';
+
 
     var marge_basse='{ $MARGE_BASSE }';
@@ -58,14 +62,13 @@
 .debug {
     display: inline-block; 
-    width: 45px; 
-    height: 45px; 
+    width: 12px; 
+    height:12px; 
     background-color: black; 
     margin: 2px; 
 }
+
 .debugOn {
     background-color: yellow; 
     border: solid 1px black;
-    width: 43px; 
-    height: 43px; 
 }
 
@@ -88,7 +91,9 @@
 <div id="Debug5"  align=center style="color:black;z-index:2000;position:absolute; background-color:red; top:100px;left:0px;width:300px;margin:auto;"></div>
  <div id="Debug6"  align=center style="display:none"></div>
-<p><button id="adddebugs">Add a debug</button></p>
 
-<div id="debugsContainer"><div class="debug"></div></div>
+
+<div id="debugsContainer"><button id="adddebugs"  style="display:none">Add a debug</button>
+<div class="debug"></div>
+</div>
     {/literal}
     {else}
@@ -100,11 +105,11 @@
 
 
-
-  <form action='' method='post' name='form_autosize_picture' id='form_autosize_picture'  type='submit'  >
-<input id='ret_autosize' name='ret_autosize' type='submit' value='' />
-<input id='src_img_h' name='src_img_h' type='text' value='' />
-<input id='src_img_w' name='src_img_w'  type='text' value='' />
-<input id='window_height' name='window_height' type='text' value='' />
-<input id='window_width'  name='window_width' type='text' value='' />
-<input id='zoom'  name='zoom' type='text' value='100%' />
-</form >
+<div style="display:none">
+<form action='' method='post' name='form_autosize_picture' id='form_autosize_picture'  type='submit'  >
+<input id='ret_autosize' name='ret_autosize' type='hidden' value='' />
+<input id='src_img_h' name='src_img_h' type='hidden' value='' />
+<input id='src_img_w' name='src_img_w'  type='hidden' value='' />
+<input id='window_height' name='window_height' type='hidden' value='' />
+<input id='window_width'  name='window_width' type='hidden' value='' />
+<input id='zoom'  name='zoom' type='hidden' value='' />
+</form ></div>
Index: /extensions/Autosize/template/conflit.tpl
===================================================================
--- /extensions/Autosize/template/conflit.tpl	(revision 12526)
+++ /extensions/Autosize/template/conflit.tpl	(revision 12527)
@@ -6,4 +6,8 @@
     var cl_plugin = '{$name}';
     var Version_pwg='{$Version_pwg}';
+
+    var Cookie_width='{$COOKIE_WIDTH }';
+    var Cookie_height = '{$COOKIE_HEIGHT }';
+
 {if $DEBUG_autosize == "true"}
     var cl_query = '{$autosize_parametres->query}';
Index: /extensions/Autosize/template/picture.tpl
===================================================================
--- /extensions/Autosize/template/picture.tpl	(revision 12526)
+++ /extensions/Autosize/template/picture.tpl	(revision 12527)
@@ -14,5 +14,6 @@
     title="{'cl_autosize_info_2'|@translate}"
     alt="{'cl_autosize_info_2'|@translate}" />
-    <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}"  src="{$cl_autosize_button.ICON}"  complete="complete"/>{$zoom}
+    <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}"  src="{$cl_autosize_button.ICON}"  complete="complete"/><span>
+    </span>
   </a>
 
@@ -51,3 +52,4 @@
  var src3="{'cl_autosize_info_2'|@translate}";
  var src4 = "{'cl_autosize_info'|@translate}";
+ var src5 = "{'cl_autosize_info_1'|@translate}";
  </script> 
