Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 12682)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 12683)
@@ -498,7 +498,4 @@
 
          Bandeau_bas = Info_Description_f(Parent);
-         if (typeof Bandeau_bas == "undefined") {
-
-         }
          if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
          else Bandeau = 0;
@@ -564,4 +561,6 @@
              }
 
+             if (typeof Bandeau_bas == "undefined")
+               return;
 
            if (typeof cl_visible == "undefined") return true;
@@ -940,5 +939,6 @@
            //=========================================================================
            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);
+             if (Bandeau_bas.height < Zone_Affichage.height) 
+                 Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
            } else {
            }
@@ -1121,8 +1121,10 @@
            //=== cadre = theImage
            jQuery(Cadre).css({ marginLeft: "auto" });
-           if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
+           if (theme.match(RegExp("simple", "gi"))) {
+             jQuery(Cadre).width(Zone_Affichage.width); //centrer simple black
+           } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
              jQuery(Cadre).css("width", "auto");
            } else {
-           jQuery(Cadre).width(Zone_Affichage.width); //centrer simple black
+             jQuery(Cadre).css("width", "auto");
 
            }
@@ -1162,6 +1164,6 @@
 
              jQuery("#charlie").css({
-               width: img_finale.width + pdf,
-               height: img_finale.height,
+               width: img_finale.width + pdf + "px",
+               height: img_finale.height + "px",
                marginLeft: "auto"
              });
@@ -1180,15 +1182,27 @@
              } 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("#player").css("height", img_finale.height + "px");
+
+               jQuery("#embedplayer").css("width", img_finale.width + "px");
+               jQuery("#embedplayer").css("height", img_finale.height + "px");
+
+               jQuery("embed").css({ width: img_finale.width + "px",
+                                    height: img_finale.height + "px" });
+               jQuery("object").css({ width: img_finale.width + "px",
+                                    height: img_finale.height + "px"
+                                  });
+              jQuery("video").css({ width: img_finale.width + "px",
+                                    height: img_finale.height + "px"
+                                  });
+
+
+
                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(Cadre).height(img_finale.height + Bandeau_bas.height); //??             
+
                jQuery(The_MainImage).height(img_finale.height);
                jQuery(Cadre).css("height", "auto");
@@ -1577,24 +1591,38 @@
 *
 */
-
+type_src = "div";
 //====================================================
 function Info_Description_f(Parent) {
     jQuery(Parent).css({ display: "block" });
     //====== détection du type d'images ======
-    if (jQuery("#charlie").length > 0) {
-        Type_Img = "charlie";
-      jQuery("#charlie").css({
-        paddingTop: "0px",
-        marginTop: "0px",
-        paddingBottom: "10px",
-        marginBottom: "0px"
-      });
-
-      } else if (jQuery("#Panorama").length) {
+   if (jQuery("#Panorama").length) {
         Type_Img = "panorama";
     } else if (jQuery("#pamoorama").length) {
         Type_Img = "pamoorama";
+
+    } else if (jQuery(Parent + " object").length > 0) {
+        Type_Img = "charlie";
+        if (jQuery(Parent + " div").length > 0)
+          jQuery(Parent + " div").attr("id", "charlie");
+        else
+          jQuery(Parent + " object").attr("id", "charlie");
+        type_src = "object";
+
     } else if (jQuery(Parent + " embed").length > 0) {
-        Type_Img = "embed";
+        Type_Img = "charlie";
+        if (jQuery(Parent + " div").length > 0)
+          jQuery(Parent + " div").attr("id", "charlie");
+        else
+        jQuery(Parent + "embed").attr("id", "charlie");
+        type_src = "embed";
+
+      } else if (jQuery(Parent + " iframe").length > 0) {
+        Type_Img = "charlie";
+        if (jQuery(Parent + " div").length > 0)
+          jQuery(Parent + " div").attr("id", "charlie");
+        else
+          jQuery(Parent + " iframe").attr("id", "charlie");
+        type_src = "iframe";
+
     } else if (jQuery("#map").length) {
         Type_Img = "map";
@@ -1613,4 +1641,14 @@
         return;
     }
+      //=========================================================
+      if (jQuery("#charlie").length > 0) {
+        jQuery("#charlie").css({
+          paddingTop: "0px",
+          marginTop: "0px",
+          paddingBottom: "0px",
+          marginBottom: "0px"
+        });
+
+      } 
     // jQuery(Parent + " p:not(:contains(' ')) ").remove();
     // jQuery(Parent + " p:(:contains('')) ").remove();
@@ -1699,10 +1737,5 @@
           });
         } else {
-          jQuery("#charlie").css({
-            paddingTop: "0px",
-            marginTop: "0px",
-            paddingBottom: "10px",
-            marginBottom: "0px"
-          });
+        
         }
 
@@ -1728,4 +1761,9 @@
       info_img = jQuery(The_MainImage).infos();
       Type_Img == "charlie"
+      if (info_img.width == 0) {
+        The_MainImage = jQuery("#theMainImage");
+        info_img = jQuery(The_MainImage).infos();
+
+      }
     }
 
Index: /extensions/Autosize/js/autosize.dimensions.js
===================================================================
--- /extensions/Autosize/js/autosize.dimensions.js	(revision 12682)
+++ /extensions/Autosize/js/autosize.dimensions.js	(revision 12683)
@@ -275,5 +275,8 @@
     // getStyles(Obj) Récupérer la valeur CSS 
     getStyles: function (elt) {
-      var element = elt;
+      var element = jQuery(elt).get(0);
+      propriete = [];
+      try{
+      if (jQuery(element).length > 0)
       if (window.getComputedStyle) // Mozilla Firefox & cie
       {
@@ -285,4 +288,7 @@
         var propriete = element.currentStyle;
       }
+        }catch(e){
+
+        }
       return propriete;
     },
