Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css	(revision 17537)
+++ /extensions/Autosize/css/autosize.css	(revision 17538)
@@ -5,4 +5,7 @@
   overflow:hidden;
   height:30px}
+
+  #theImage img{
+   }
 #theImage {
 
@@ -46,5 +49,6 @@
 #theImage {/*
 background-color: #DDE3E3;
-background-image: url('../images/quadrille_100.png');*/
+background-image: url('../images/quadrille_100.png');
+*/
  /*height:auto;
    */
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 17537)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 17538)
@@ -16,5 +16,13 @@
     var theImg;
     var Zone_image;
-
+    /******************************************
+    * test_theme("mont,pur") ...
+    ******************************************/
+    test_theme = function (param) {
+      if (!param) return
+      regx = new RegExp(param, "gi");
+      return (options.theme.match(regx))
+
+    }
     /******************************************
     * Save_cookies
@@ -296,49 +304,35 @@
       infos_imageInfos = jQuery(imageInfos_id).infos(true);             // information
       infos_theMainImage = jQuery(theMainImage_id).infos(true);         // Image 
+      infos_copyright = jQuery("#copyright").infos(true);
 
       jQuery("#loading").show(0);
-
+      zheight = infos_window.height - (infos_theImage.top);
+      h01 = 0;
+      h02 = 0;
       if (options.check_desc_v) {
-        info_comments = jQuery("#comments").infos(true);
+
+        infos_comments = jQuery("#comments").infos(true);
         infos_Licence = jQuery(".licencetag").infos(true);
         infos_imageComment = jQuery(imageComment_id).infos(true);
-        h01 = info_comments.top - infos_theMainImage.bottom;
+
+        if (infos_imageComment.visible = true && infos_imageComment.general.bottom > infos_theMainImage.bottom) {
       h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom; 
+        }
+        if (infos_Licence.visible = true && infos_Licence.general.bottom > infos_theMainImage.bottom) {
+          h01 = infos_Licence.general.bottom - infos_theMainImage.bottom;
+        }
         delta_h = infos_imageInfos.bottom - infos_imageInfos.top;
-        if (options.theme.match(RegExp("blanc", "gi")) || options.theme.match(RegExp("pure", "gi")) 
-         || options.theme.match(RegExp("hr_", "gi")))  {
+        info_comments1 = jQuery(theImage_id + " p").infos(true);
+        if (test_theme("simple")) {
+          options.marge_basse += info_comments1.general.height;
     
-          h01 = infos_Licence.general.bottom-infos_theMainImage.bottom;
-          options.marge_basse += h01;
+        } else {
+          options.marge_basse += Math.max(h01, h02);
+          if (test_theme("blanc , pure, hr_ ")) {
           options.marge_gauche += 10;
           options.marge_droite += 10;
-
-        } else {
-
-          if (options.theme != "simple")
-            if (delta_h > 5 && (infos_imageInfos.top > infos_theMainImage.bottom)) {
-              if (infos_imageComment.visible) {
-               
               }
             }
-
-
-          h01 = infos_Licence.general.bottom - infos_theMainImage.bottom;
-          h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom;
-
-          if (Type_Img == "pamoorama") {
-            h01 = infos_Licence.general.bottom - infos_theMainImage.bottom;
-           
-            ;
-            options.marge_basse += (h01);
-          } else
-            options.marge_basse += Math.max(h01, h01);
-
-        }
-      }
-
-      infos_theMainImage = jQuery(theMainImage_id).infos(true);
-      infos_theImage = jQuery(theImage_id).infos(true);
-
+        }
       Zone_image = { image_init: {
         width: infos_theMainImage.width,
@@ -353,8 +347,9 @@
         container: {
           width: infos_theImage.general.width,
-          height: infos_window.height - (infos_theImage.top),
+          height: zheight,
           margesWidth: infos_window.width - infos_theImage.width + (options.marge_droite + options.marge_gauche)
         }
       }
+
 
 
@@ -391,4 +386,15 @@
           }
         }
+
+        if (test_theme("simple")) {
+          jQuery(theMainImage_id).css({ maxWidth: "none" });
+          infos_menubar = jQuery("#menubar").infos(true);
+          if (infos_menubar.visible == true) {
+            jQuery(theImage_id).width(infos_window.width - infos_imageInfos.general.width - infos_menubar.general.width-20);
+            infos_theImage = jQuery(theImage_id).infos(true);
+
+          }
+        }
+
         if ((old_w - infos_theImage.width) != 0) {
           Zone_image.container.width = infos_theImage.width;
@@ -398,13 +404,7 @@
         infos_body = jQuery("body").infos();
         infos_content = jQuery(content_id).infos();
-
-
         // imageInfos
-
-
-
         infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos();  // Cadre general 
         //=============================================================
-
         Zone_image.container = {
           height: infos_window.height - (infos_theImage.top),
@@ -413,13 +413,8 @@
         };
 
-        if (options.theme.match(RegExp("simple", "gi"))) {
-          jQuery(theMainImage_id).css({ maxWidth: "none" });
-          infos_menubar = jQuery("#menubar").infos(true);
-          if (infos_menubar.visible == true) {
-            Zone_image.container.width -= infos_menubar.right;
-          }
-        }
-
         jQuery(theImage_id).height(Zone_image.container.height + 2);
+
+
+
 
         if (DEBUG_autosize == "no") return;
@@ -515,8 +510,8 @@
     fade_in = options.fade_in || 0;
     imageComment_id = ".imageComment";
-    if (options.theme.match(RegExp("simple", "gi"))) {
+    if (test_theme("simple")) {
       jQuery("#theImage p").addClass("imageComment");
     }
-    if (options.theme.match(RegExp("mont", "gi"))) {
+    if (test_theme("mont")) {
       jQuery("#content").css({ marginLeft: 'auto' }); //monblanc
     }
@@ -885,4 +880,11 @@
           jQuery(theMainImage_id).height(Zone_image.image.height);
           jQuery(theMainImage_id).width(Zone_image.image.width);
+
+          if (test_theme("xxxxxxx")) {
+            jQuery(theImage_id).css({ height: "auto" });
+            jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);
+            jQuery(theImage_id).width(Zone_image.image.width + Zone_image.marges.width);
+
+          }
         }
 
@@ -890,5 +892,5 @@
         set_cl(true);
       } else {
-        jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);
+        //   jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);
         Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height });
         set_cl(false);
@@ -1129,5 +1131,5 @@
       if (typeof Zone_image == "undefined") Zone_image = { image: {} };
       if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.image_init.height, width: Zone_image.image_init.width };
-      theImg.width = img_init.height;
+      theImg.height = img_init.height;
       theImg.width = img_init.width;
 
@@ -1530,5 +1532,5 @@
 
       //==========================================================
-      if (options.theme.match(RegExp("stripped", "gi"))) {
+      if (test_theme("stripped")) {
         infos_the_page.margin.left = 20;  //taille fleche
         infos_the_page.margin.right = 20;
@@ -1536,5 +1538,5 @@
 
 
-      if (options.theme.match(RegExp("elegant", "gi"))) {
+      if (test_theme("elegant")) {
 
         jQuery("#imageInfos").css({ position: "absolute", right: 0, top: 0
@@ -1552,16 +1554,16 @@
         marge_left += 1;
 
-      } else if (options.theme.match(RegExp("stripped", "gi"))) {
-
-      } else if (options.theme.match(RegExp("simple", "gi"))) {
-
-
-
-      } else if (options.theme.match(RegExp("OS", "gi"))) {
-
-      } else if (options.theme.match(RegExp("pur", "gi"))) {
+      } else if (test_theme("stripped")) {
+
+      } else if (test_theme("simple")) {
+
+
+
+      } else if (test_theme("OS")) {
+
+      } else if (test_theme("pur")) {
         marge_right += 0;
         // marge_right += 25;
-      } else if (options.theme.match(RegExp("mont", "gi"))) {
+      } else if (test_theme("mont")) {
         marge_right += 0;
 
@@ -1948,7 +1950,4 @@
     //_______________________ init_gen _______________________
 
-    if (typeof changeImgSrc != "function") {
-
-    }
   });                                                                                                                                                                                                                                       // ready
 
