Index: /extensions/Autosize/admin/admin_autosize.php
===================================================================
--- /extensions/Autosize/admin/admin_autosize.php	(revision 11441)
+++ /extensions/Autosize/admin/admin_autosize.php	(revision 11442)
@@ -31,6 +31,7 @@
 if (!defined('ROOT_URL')) 
 define(  'ROOT_URL',  get_root_url().'/' );
+
 if (!defined('AUTOSIZE_PATH_ABS')) 
-define('AUTOSIZE_PATH_ABS', dirname(__FILE__).'/' );
+define('AUTOSIZE_PATH_ABS', realpath(AUTOSIZE_PATH)."/");
 
 // +-----------------------------------------------------------------------+
Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 11441)
+++ /extensions/Autosize/autosize.inc.php	(revision 11442)
@@ -27,9 +27,8 @@
 if (!defined('ROOT_URL')) 
 define(  'ROOT_URL',  get_root_url().'/' );
-
-$AUTOSIZE_PATH_ABS=str_replace('\\','/',dirname(__FILE__) );
+ 
 if (!defined('AUTOSIZE_PATH_ABS')) 
 define(
-  'AUTOSIZE_PATH_ABS',   $AUTOSIZE_PATH_ABS."/"
+  'AUTOSIZE_PATH_ABS',  realpath(AUTOSIZE_PATH)."/"
 );
 
@@ -195,6 +194,21 @@
 						array('autosize_content'=> $AUTOSIZE_PATH.'template/autosize.tpl')
 					);
-			$template->concat('autosize_content', $template->parse('autosize_content_header', true));							 			
-				return $template->parse( 'autosize_content', false);
+			$template->concat('autosize_content', $template->parse('autosize_content_header', true));		
+      if(isset($conf['go_up_down']) && ($conf['go_up_down']==true) ){
+        $template->set_filenames(array('mes_script' => realpath(AUTOSIZE_PATH).'/template/mes_scripts.tpl') );
+        $template->func_combine_script(array('id'=>'my_script_2',
+        'path'=> AUTOSIZE_PATH.'/js/JScript.js',
+        'require' => 'jquery'),
+        $template->smarty);
+        $template->assign(array( 
+                          'MY_FOOTER_PATH' =>AUTOSIZE_PATH
+                          ));
+					
+        $template->parse('mes_script');
+      }      
+        
+        
+        
+        return $template->parse( 'autosize_content', false);
      				  }
 		}
Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css	(revision 11441)
+++ /extensions/Autosize/css/autosize.css	(revision 11442)
@@ -63,3 +63,2 @@
 }
 
-
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 11441)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 11442)
@@ -1,5 +1,3 @@
 Parent = "#theImage";
- 
-
 function Toggle_bp() {
     cl_visible = !cl_visible;
@@ -310,8 +308,10 @@
          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;
          else Bandeau = 0;
-         if (typeof Bandeau_bas == "undefined") { }
          old_window = { width: 0, height: 0 };
          jQuery("#theImage").trigger('ON');
@@ -376,6 +376,5 @@
          newResize: function () {
            //
-
-           if (typeof options != undefined)
+          if (typeof options != undefined)
              if (options.imageAutosize)
                return true; //stripped
@@ -464,5 +463,11 @@
            marge_left += Zone_Affichage.borderwidth.left;
            winwidth -= (marge_right + marge_left);
-
+           //---------------------------------------------
+           /*
+           jQuery(Parent).width(winwidth); // 1.6.2
+           jQuery(Parent).css({ height: "auto" }); //1.6.2
+           */
+           //  jQuery(Parent).height(Zone_Affichage.height);
+           //---------------------------------------------
 
            if (Type_Img == "pamoorama") {
@@ -600,5 +605,5 @@
                //info_theImage.height = img_reelle.height;
 
-               info_theImage.height =info_theImage.height;
+               info_theImage.height = info_theImage.height;
 
                info_the_page = jQuery("#the_page").infos();
@@ -641,9 +646,9 @@
 
            img_reelle.width = parseInt(img_reelle.width);
-           // jQuery(Cadre).width(mini_width);
+           // jQuery(Cadre).width(mini_width); 1.6.2
 
 
            if (img_reelle.width < mini_width) {
-             //jQuery(Cadre).width(mini_width);
+             //jQuery(Cadre).width(mini_width); 1.6.2
              return true;
 
@@ -728,10 +733,7 @@
              Zone_Affichage.width = mini_width2;
            //=========================================================================
-           if (typeof (Bandeau_bas) != "undefined") {
+           if (typeof (Bandeau_bas) != "undefined") {            
              Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
-
-
-           } else {
-
+                        } else {
            }
 
@@ -923,8 +925,10 @@
            // jQuery(Cadre).width(Zone_Affichage.width);
            jQuery(Cadre).css("width", "auto");
-           if (Type_Img == "panorama" || Type_Img == "pamoorama") 
-           img_finale.height = info_theImage.height;
-           Zone_Affichage.height = img_finale.height;
-           jQuery(Cadre).height(Zone_Affichage.height);
+
+           if (Type_Img == "panorama" || Type_Img == "pamoorama") {
+             img_finale.height = info_theImage.height;
+             Zone_Affichage.height = img_finale.height;
+             jQuery(Cadre).height(Zone_Affichage.height);
+           }
 
            if (typeof (gmaps) != "undefined") {
@@ -957,5 +961,5 @@
                width: img_finale.width + pdf,
                height: img_finale.height,
-               margin: "auto"
+               marginLeft: "auto"
              });
 
@@ -972,4 +976,8 @@
              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 == "panorama") {
@@ -1064,4 +1072,8 @@
            } else {
              //===map ? luciano ===
+
+        // jQuery(Cadre).height(Zone_Affichage.height + Bandeau_bas.height); //??
+              //     jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
+         jQuery(Cadre).css("height","auto"); //??
              jQuery(theImg).height(img_finale.height);
              jQuery(theImg).width(img_finale.width);
@@ -1331,4 +1343,5 @@
     if (jQuery("#charlie").length > 0) {
         Type_Img = "charlie";
+
     } else if (jQuery("#pamoorama").length) {
         Type_Img = "pamoorama";
@@ -1357,5 +1370,5 @@
 
     if (llgboframe.height > 0) {
- ll2 = jQuery("#gbo div:last").infos();
+        ll2 = jQuery("#gbo div:last").infos();
         ll1 = jQuery("#gbo div:first").infos();
         ll2 ="" ;
@@ -1413,14 +1426,24 @@
 
 
-    } else if (jQuery("#charlie").length > 0) {
-
-        jQuery("#charlie").css({ padding: "0px"
-
-        });
-        theImg = jQuery("#charlie")
+      } else if (jQuery("#charlie").length > 0) {
+   
+     if (jQuery("object").attr("type") == 'application/x-shockwave-flash') {
+          jQuery("#charlie").css({
+            paddingTop: "0px",
+            marginTop: "0px",
+            paddingBottom: "30px",
+            marginBottom: "0px"
+          });
+        } else {
+          jQuery("#charlie").css({
+            paddingTop: "0px",
+            marginTop: "0px",
+            paddingBottom: "10px",
+            marginBottom: "0px"
+          });
+        }
+        theImg = jQuery("#charlie");
         info_img = jQuery(theImg).infos();
-
-
-
+ 
     } else if (jQuery(Parent + " embed").length > 0) {
 
@@ -1433,5 +1456,5 @@
         if (!nopano) {
             Wait_pamoorama();
-            return
+            return info_description;
         }
         theImg = jQuery("#pamoorama");
@@ -1453,4 +1476,6 @@
           }
 
+        //theImg = Get_Img_Maxi(theImg);  //1.6.2
+        //if (!theImg) theImg = jQuery(Parent);   // 1.6.2sans img ??
         info_img = jQuery(theImg).infos();
     }
@@ -1517,5 +1542,8 @@
         check_desc_v = true;
 
-    } else {
+      } else {
+        if (theme.match(RegExp("sobre", "gi"))) {
+          info_description.marge.top = -2;
+        }
         info_description.bottom = info_theImage.bottom;
         info_description.top = info_img.height + info_theImage.top;
@@ -1524,5 +1552,5 @@
     //
 
-    info_description.height = info_description.bottom - info_description.top;
+    info_description.height =   info_description.bottom - info_description.top;
 
     if (check_desc_v == false) {
Index: /extensions/Autosize/js/JScript.js
===================================================================
--- /extensions/Autosize/js/JScript.js	(revision 11442)
+++ /extensions/Autosize/js/JScript.js	(revision 11442)
@@ -0,0 +1,92 @@
+﻿jQuery(document).ready(
+function (jQuery) {
+  stb = jQuery('#scrolltobottom');
+  stt = jQuery('#scrolltotop');
+  stt.css('opacity', 1 )
+  //===================================================================	  		
+  jQuery(window).resize(function (event, ui) {
+    if (typeof (event) == 'undefined') return;
+    scrollBottom = jQuery(window).scrollTop();
+  });
+  //===================================================================	    		
+  jQuery(window).scroll(function () {
+    if (scrollBottom < 500) {
+      if (stt.css('opacity') > 0) {
+        stt.stop().fadeTo(1000, 0);
+        stt.css("display", "none");
+      } else {
+        if (stt.css('opacity') == 0) {
+          stt.stop().fadeTo(1000, 1);
+          stt.css("display", "block");
+        }
+      }
+    }
+
+    if (scrollBottom < 500) {
+      if (stb.css('opacity') == 0) {
+        stb.stop().fadeTo(1000, 1);
+        stb.css("display", "block");
+
+      }
+    } else {
+      if (stb.css('opacity') > 0) {
+        stb.stop().fadeTo(1000, 0);
+        stb.css("display", "none");
+
+      }
+    }
+
+  });
+
+  jQuery('#scrolltobottom a').click(function () {
+    pos = jQuery('body').outerHeight();
+    jQuery('html, body').animate({
+      scrollTop: pos + 'px'
+    }, 1000, function () {
+      scrollBottom = jQuery(window).scrollTop();
+      if (stb.css('opacity') > 0) {
+        stb.stop().fadeTo(1000, 0);
+        stb.css("display", "none");
+        stt.stop().fadeTo(1000, 1);
+        stt.css("display", "block");
+      }
+    });
+  });
+
+  jQuery('#scrolltotop a').click(function () {
+
+    pos = 0;
+    jQuery('html, body').animate({
+      scrollTop: pos + 'px'
+    }, 1000, function () {
+      st = false;
+     // scrollBottom = jQuery(window).scrollTop();
+      if (stb.css('opacity') > 0) {
+        stt.stop().fadeTo(1000, 0);
+        stt.css("display", "none");
+        stb.stop().fadeTo(1000, 1);
+        stb.css("display", "block");
+      }
+      scrollBottom = jQuery(window).scrollTop();
+    });
+  });
+
+
+  function gotoPos(pos) {
+    jQuery('html, body').animate({ scrollTop: jQuery('body').outerHeight() + 'px' },
+     600, function () {
+
+
+     });
+
+
+    return false;
+  }
+  //===================================================================	  
+  jQuery(window).resize();
+  jQuery(window).scroll();
+
+
+}); 
+//=========================================================
+
Index: /extensions/Autosize/template/mes_scripts.tpl
===================================================================
--- /extensions/Autosize/template/mes_scripts.tpl	(revision 11442)
+++ /extensions/Autosize/template/mes_scripts.tpl	(revision 11442)
@@ -0,0 +1,35 @@
+<!--- $MY_ENTETE_PATH Mes_SCRIPTS Header--->
+{html_head}
+
+<!--- Mes_SCRIPTS body --->
+
+  {literal}
+<style type="text/css" media="screen">
+#scrolltotop { position:fixed; top:100px;right:10px; z-index:1000; opacity:0; }
+#scrolltotop a { {/literal} 
+  background-color:transparent;
+  background-image: url("{$MY_FOOTER_PATH}images/top.png");
+  background-position:left top; background-repeat:no-repeat; 
+  display:block;
+  height:100px; text-indent:-9999px; width:50px; border:0; 
+  {literal}
+  } 
+
+#scrolltobottom { position:fixed; bottom:100px;right:10px; z-index:1000; opacity:0; }
+#scrolltobottom a { {/literal} 
+  background-color:transparent;
+  background-image: url("{$MY_FOOTER_PATH}images/bottom.png");
+  background-position:left top; background-repeat:no-repeat; 
+  display:block;
+  height:100px; text-indent:-9999px; width:50px; border:0; 
+  {literal}
+  } 
+</style>
+ {/literal}  
+{/html_head}
+<div id="scrolltobottom"><a title="Revenir en bas de la page" href="#"></a></div>
+<div id="scrolltotop" ><a title="Revenir en haut de la page" href="#"></a></div>
+{literal}
+{/literal}
+ 
+<!---Fin Mes SCRIPTS --->
