Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 22217)
+++ /extensions/Autosize/autosize.inc.php	(revision 22218)
@@ -66,4 +66,5 @@
 			$infos_message .=  "GET:"  . cl_print_var($_GET) ;
 			$infos_message .= "POST:"  . cl_print_var($_POST) ;
+      $infos_message .= "SERVER:"  . cl_print_var($_SERVER["HTTP_HOST"]) ;
 			$infos_message .= "$pictureDeriv $pictureSelType $pictureMap ";
 		}
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 22217)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 22218)
@@ -232,7 +232,9 @@
         }
         if (options.pictureDeriv) {
-          if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi")
+          jQuery(".switchCheck").css({ visibility: "hidden" });
+          if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {
             jQuery("#derivativeChecked" + options.pictureSelType).css("visibility", "visible");
-          else
+            jQuery("#derivativeChecked" + options.pictureDeriv + ".switchCheck").css({ visibility: "visible", color: "grey" });
+          } else
             jQuery("#derivativeChecked" + options.pictureDeriv).css("visibility", "visible");
           jQuery('.auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ") " + options.pictureDeriv);
@@ -505,5 +507,4 @@
     jQuery(".Autosize").hide();
     DEBUG_autosize = options.DEBUG_autosize;
-    var COOKIE_PATH = options.COOKIE_PATH;
     OptionsCookie = jQuery.extend({}, { path: options.COOKIE_PATH, expires: 1 });
     var cookies = Get_cookies();
@@ -523,6 +524,6 @@
     var infos_window = jQuery(window).infos();
     var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos();  // Cadre
-    // general
-    var infos_content;
+    // general  
+    var infos_content=jQuery("#content").infos(true);
     var infos_the_page = jQuery("#the_page").infos(true);
     var nopano = false;
@@ -813,6 +814,8 @@
         options.pictureMap = retour.pictureDeriv;
         Save_cookies(options);
-        setTimeout("Autosize_resize(false, options)", 500);
-        // Autosize_resize(true, options);
+        setTimeout(function (i) {
+          Autosize_resize(false, options);
+        }, 2);
+
       }
     });
@@ -1014,116 +1017,8 @@
     // _________________Autosize ____________________________________
 
-    /***************************************************************************
-    * changeImgSrc
-    **************************************************************************/
-    changeImgSrc = function (url, typeSave, typeMap, type) {
-      if (type == "Autosize" || type == "SelMaxi") {
-
-      }
-      if (COOKIE_PATH == type) {
-        type = options.pictureSelType;
-      }
-      if (typeof type != "undefined") {
-        options.pictureSelType = type;
-      } else {
-        type = options.pictureSelType;
-      }
-      options.pictureDeriv = typeSave;
-      typeMap = typeSave;
-      options.pictureMap = typeMap;
-      options.pictureDeriv = typeSave;
-      jQuery.cookie('picture_deriv', typeSave, { path: COOKIE_PATH, expires: 1 });
-
-      url_old = jQuery("#theMainImage").attr("src");
-
-      jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
-      if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) {
-        jQuery('#derivativeChecked' + type).css('visibility', 'visible');
-        jQuery.cookie('picture_sel_type', type, OptionsCookie);
-      } else {
-
-        jQuery('#derivativeChecked' + typeSave).css('visibility', 'visible');
-        jQuery.cookie('picture_sel_type', typeSave, OptionsCookie);
-      }
-      if (url != url_old) {
-        file_exists(url);
-        url_old = url;
-      }
-      jQuery("#theMainImage").removeAttr("width height")
-      .load(function (i) {
-        if (!init_img(this)) {
-          return;
-        }
-        // =======================================================================
-
-      })
-      .error(function (e) {
-        imgsrc = this.src;
-        if (!this.complete) {
-          // le fichier n'est pas present
-          imgsrc = jQuery(this).attr("src");
-          return false;
-        }
-
-      })
-           .live("Success", function (e) {
-             if (typeof imageInfos_id == "undefined") return false;
-           })
-
-            .live("Error", function (data) {
-              if (typeof imageInfos_id == "undefined") return;
-
-            })
-             .live("fail", function (data) {
-               if (typeof imageInfos_id == "undefined") return;
-
-             })
-              .live("Progress", function (data) {
-                if (typeof imageInfos_id == "undefined") return;
-
-              })
-              .live("IsRejected", function (data) {
-                if (typeof imageInfos_id == "undefined") return;
-
-              })
-         .live("Finish", function (e, data) {
-           if (typeof imageInfos_id == "undefined") return;
-
-         })
-         .live("change", function (e) {
-           theMainImage_st = this.complete;
-           imgsrc = this.src;
-         })
-            .live("Complete", function (e, data) {
-              if (data.statusText != "OK") {
-                popup = jQuery(".errors");
-                if (popup.length == 0) {
-                  jQuery("#theImage").append("<div class='errors'><span></span></div>");
-                }
-                jQuery(".errors").text("Erreur : [" + data.done + "] " + data.src);
-                jQuery(".errors").show().delay(10000).hide(2000);
-                return;
-              }
-              if (data.src) { }
-              if (options.pictureDeriv == "Original" && data.src.match(RegExp("\-.." + ".jpg", "gi"))) {
-                // Autosize_resize(true, options);
-              } else if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) {
-                // Autosize_resize(true, options);
-              } else {
-
-              }
-
-            });
-      // _________ theMainImage ___________
-
-    };
-
-    // __________________ changeImgSrc ______________________
 
     /***************************************************************************
     * pamoorama
     **************************************************************************/
-
-
     jQuery("#pamoorama").bind("on", function () { alert($(this).text()); });
     jQuery("#pamoorama").bind("on", function (e) {
@@ -1445,5 +1340,5 @@
         // ===== calcul Image ===
         if (typeof imageInfos_id == "undefined") return;
-        if (Calcul_Image()=="Wait") {   // image en cours           
+        if (Calcul_Image() == "Wait") {   // image en cours           
           return "Wait";
         }
@@ -1828,7 +1723,7 @@
       Zone_image.marges = { width: marge_left + marge_right + retrait_img.width,
         height: marge_top + marge_bottom + retrait_img.height
-      }
+      };
       return true;
-    }
+    };
 
     /***************************************************************************
@@ -2269,50 +2164,7 @@
     } // Debug_pos
     // ==========================================================
-
-
-
-
-
-
-
-
-
-  });                                                                                                                                                            // ready
-
-
-
+  });                                                                                                                                                               // ready
   jQuery("#derivativeSwitchBox a").click(function (e) {
     k1 = 0;
   });
 //==========================================================
-  function file_exists(filename){	
-  	  var params = { filename: filename, types: [], src: [] };
-  	  url = "plugins/PersonalPlugin/fileok.php?filename=" + filename;
-    jQuery.ajax({
-        type: "POST",
-        url: url,
-        data: params,
-        dataType: "json",
-        success: function (data) {
-          if (!data.stat || data.stat != "ok") {
-            return;
-          }
-         if(data.result[1]=="ok"){
-  	jQuery("#theMainImage").attr("src", data.result[0]);
-  }
-  /*
-          retour = "<ul>"  ;
-          jQuery(".infos").text(data.stat);        
-          for (var i = 0; i < data.result.length; i++) {
-            retour = retour + "<li >" + data.result[i] + "</li>";
-
-          }
-          retour += "</ul>";
-          jQuery(".infos").html(retour);
-  */
-        },
-        error: function (data) {
-          jQuery(".infos").html(data.responseText);
-        }
-      });
-  };
Index: /extensions/Autosize/js/JScript.js
===================================================================
--- /extensions/Autosize/js/JScript.js	(revision 22217)
+++ /extensions/Autosize/js/JScript.js	(revision 22218)
@@ -43,6 +43,6 @@
     stb = jQuery('#scrolltobottom');
     stt = jQuery('#scrolltotop');
-    stt.css('opacity', 1)
-    stb.css('opacity', 1)
+    stt.css('opacity', 1);
+    stb.css('opacity', 1);
 
     jQuery('#scrolltotop').height(100);
Index: /extensions/Autosize/js/autosize.cookie.js
===================================================================
--- /extensions/Autosize/js/autosize.cookie.js	(revision 22217)
+++ /extensions/Autosize/js/autosize.cookie.js	(revision 22218)
@@ -1,226 +1,44 @@
-jQuery.cookie = function(name, value, options) {
+if (typeof jQuery.cookie != "function") {
+  jQuery.cookie = function (name, value, options) {
     if (typeof value != 'undefined') { // name and value given, set cookie
-        options = options || {};
-        if (value === null) {
-            value = '';
-            options.expires = -1;
+      options = options || {};
+      if (value === null) {
+        value = '';
+        options.expires = -1;
+      }
+      var expires = '';
+      if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+        var date;
+        if (typeof options.expires == 'number') {
+          date = new Date();
+          date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+        } else {
+          date = options.expires;
         }
-        var expires = '';
-        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
-            var date;
-            if (typeof options.expires == 'number') {
-                date = new Date();
-                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
-            } else {
-                date = options.expires;
-            }
-            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+      }
+      // CAUTION: Needed to parenthesize options.path and options.domain
+      // in the following expressions, otherwise they evaluate to undefined
+      // in the packed version for some reason...
+      var path = options.path ? '; path=' + (options.path) : '';
+      var domain = options.domain ? '; domain=' + (options.domain) : '';
+      var secure = options.secure ? '; secure' : '';
+      document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+      var cookieValue = null;
+      if (document.cookie && document.cookie != '') {
+        var cookies = document.cookie.split(';');
+        for (var i = 0; i < cookies.length; i++) {
+          var cookie = jQuery.trim(cookies[i]);
+          // Does this cookie string begin with the name we want?
+          if (cookie.substring(0, name.length + 1) == (name + '=')) {
+            cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+            break;
+          }
         }
-        // CAUTION: Needed to parenthesize options.path and options.domain
-        // in the following expressions, otherwise they evaluate to undefined
-        // in the packed version for some reason...
-        var path = options.path ? '; path=' + (options.path) : '';
-        var domain = options.domain ? '; domain=' + (options.domain) : '';
-        var secure = options.secure ? '; secure' : '';
-        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
-    } else { // only name given, get cookie
-        var cookieValue = null;
-        if (document.cookie && document.cookie != '') {
-            var cookies = document.cookie.split(';');
-            for (var i = 0; i < cookies.length; i++) {
-                var cookie = jQuery.trim(cookies[i]);
-                // Does this cookie string begin with the name we want?
-                if (cookie.substring(0, name.length + 1) == (name + '=')) {
-                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
-                    break;
-                }
-            }
-        }
-        return cookieValue;
+      }
+      return cookieValue;
     }
-    };
-   
-
-    function hideMenu(delay) {
-      var menubar = jQuery("#menubar");
-      var menuswitcher = jQuery("#menuSwitcher");
-      var content = jQuery("#the_page > .content");
-      var pcontent = jQuery("#content");
-
-      menubar.hide(delay);
-      menuswitcher.addClass("menuhidden").removeClass("menushown");
-      content.addClass("menuhidden").removeClass("menushown");
-      pcontent.addClass("menuhidden").removeClass("menushown");
-      jQuery.cookie('picture-menu', 'hidden', { path: "/" });
-
-    }
-
-    function showMenu(delay) {
-
-      var menubar = jQuery("#menubar");
-      var menuswitcher = jQuery("#menuSwitcher");
-      var content = jQuery("#the_page > .content");
-      var pcontent = jQuery("#content");
-
-      menubar.show(delay);
-      menuswitcher.addClass("menushown").removeClass("menuhidden");
-      content.addClass("menushown").removeClass("menuhidden");
-      pcontent.addClass("menushown").removeClass("menuhidden");
-      jQuery.cookie('picture-menu', 'visible', { path: "/" });
-
-    }
-
-    function hideInfo(delay) {
-
-      var imageInfos = jQuery("#imageInfos");
-      var infoswitcher = jQuery("#infoSwitcher");
-      var theImage = jQuery("#theImage");
-
-      imageInfos.hide(delay);
-      infoswitcher.addClass("infohidden").removeClass("infoshown");
-      theImage.addClass("infohidden").removeClass("infoshown");
-      jQuery.cookie('side-info', 'hidden', { path: "/" });
-
-    }
-
-    function showInfo(delay) {
-
-      var imageInfos = jQuery("#imageInfos");
-      var infoswitcher = jQuery("#infoSwitcher");
-      var theImage = jQuery("#theImage");
-
-      imageInfos.show(delay);
-      infoswitcher.addClass("infoshown").removeClass("infohidden");
-      theImage.addClass("infoshown").removeClass("infohidden");
-      jQuery.cookie('side-info', 'visible', { path: "/" });
-
-    }
-    //=========================================================================
-    jQuery(window).ready(function (jQuery) {
-      return;
-      jQuery(window).load(function (i) {
-
-      });
-      var myWidth = 0, myHeight = 0, myImgWidth = 0, myImgHeight = 0;
-      if (typeof (window.innerWidth) == 'number') {
-        //Non-IE
-        myWidth = window.innerWidth;
-        myHeight = window.innerHeight;
-      } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
-        //IE 6+ in 'standards compliant mode'
-        myWidth = document.documentElement.clientWidth;
-        myHeight = document.documentElement.clientHeight;
-      } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
-        //IE 4 compatible
-        myWidth = document.body.clientWidth;
-        myHeight = document.body.clientHeight;
-      }
-      windowWidth = parseInt(myWidth);
-      windowHeight = parseInt(myHeight);
-
-
-      return;
-
-      // side-menu show/hide
-
-
-      var sidemenu = jQuery.cookie('picture-menu') || jQuery.cookie('side-menu');
-      var menubar = jQuery("#menubar");
-      //  return;
-      if (menubar.length == 1) {
-
-        jQuery("#menuSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
-
-        // if cookie says the menu is hiding, keep it hidden!
-        if (sidemenu == 'visible' || sidemenu == 'showing') {
-          showMenu(0);
-        } else {
-          hideMenu(0);
-        }
-
-        jQuery("#menuSwitcher").click(function () {
-          if (jQuery("#menubar").is(":hidden")) {
-            showMenu(0);
-            return false;
-          } else {
-            hideMenu(0);
-            return false;
-          }
-        });
-
-      }
-
-      // info show/hide
-
-      var sideinfo = jQuery.cookie('side-info');
-      var imageInfos = jQuery("#imageInfos");
-
-      if (imageInfos.length == 1) {
-
-        jQuery("#infoSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
-
-        // if cookie says the menu is hiding, keep it hidden!
-        if (sideinfo == 'hidden') {
-          hideInfo(0);
-        } else {
-          showInfo(0);
-        }
-
-        jQuery("#infoSwitcher").click(function () {
-          if (jQuery("#imageInfos").is(":hidden")) {
-            showInfo(0);
-            return false;
-          } else {
-            hideInfo(0);
-            return false;
-          }
-        });
-
-      }
-
-      // comments show/hide
-
-      var commentsswicther = jQuery("#commentsSwitcher");
-      var comments = jQuery("#thePicturePage #comments");
-
-      commentsswicther.html("<div class=\"switchArrow\">&nbsp;</div>");
-
-      if (comments.length == 1) {
-        var comments_button = jQuery("#comments h3");
-
-        if (comments_button.length == 0) {
-          jQuery("#addComment").before("<h3>Comments</h3>");
-          comments_button = jQuery("#comments h3");
-        }
-
-        if (jQuery.cookie('comments') == 'visible') {
-          comments.addClass("commentsshown");
-          comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
-        } else {
-          comments.addClass("commentshidden");
-          comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
-        }
-
-        comments_button.click(function () { commentsToggle() });
-        commentsswicther.click(function () { commentsToggle() });
-
-      }
-
-
-    });
-
-    function commentsToggle() {
-      var comments = jQuery("#thePicturePage #comments");
-      var comments_button = jQuery("#comments h3");
-
-      if (comments.hasClass("commentshidden")) {
-        comments.removeClass("commentshidden").addClass("commentsshown");
-        comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_on"); ;
-        jQuery.cookie('comments', 'visible', { path: "/" });
-      } else {
-        comments.addClass("commentshidden").removeClass("commentsshown");
-        comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off"); ;
-        jQuery.cookie('comments', 'hidden', { path: "/" });
-      }
-
-    }
+  };
+  //=========================================================================
+}
Index: /extensions/Autosize/js/autosize.dimensions.js
===================================================================
--- /extensions/Autosize/js/autosize.dimensions.js	(revision 22217)
+++ /extensions/Autosize/js/autosize.dimensions.js	(revision 22218)
@@ -117,5 +117,5 @@
 
 
-      var Left = 0, Top = 0, offset, parentOffset, offsetParent, results;
+      var Left = 0, Top = 0,  results;
       var borderwidth = { width: "0 0 0 0",
         top: 0,
@@ -123,5 +123,5 @@
         right: 0,
         bottom: 0
-      }
+      };
       var padding = { padding: "0 0 0 0",
         top: 0,
@@ -196,5 +196,4 @@
           var myWidth = 0, myHeight = 0;
 
-          var xHeight = jQuery(document).height();
           var x2Height = jQuery(window).height();
 
@@ -377,5 +376,5 @@
         };
 
-        return results
+        return results;
       } return results;
     },
@@ -384,5 +383,5 @@
     */
     d_position: function () {
-      var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
+      var  elem = this[0], offset, parentOffset, offsetParent, results=null;
       l1 = jQuery(elem).css("left");
       if (elem) {
@@ -426,9 +425,10 @@
     */
     offsetParent: function () {
+    	 var offsetParent = null;
       if (this[0] == window) return;
       try {
 
         n1 = this[0].nodeName;
-        var offsetParent = this[0].offsetParent;
+        offsetParent = this[0].offsetParent;
 
         while (offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static'))
@@ -447,10 +447,9 @@
           if (window.getComputedStyle) // Mozilla Firefox & cie
           {
-            var propriete = window.getComputedStyle(element, null);
+             propriete = window.getComputedStyle(element, null);
           }
           else if (element.currentStyle) // Microsoft Internet Explorer
           {
-
-            var propriete = element.currentStyle;
+             propriete = element.currentStyle;
           }
       } catch (e) {
@@ -541,5 +540,5 @@
     return val;
 
-  }
+  };
 
   /*
@@ -559,6 +558,6 @@
       }
     }
-    valeur_num = Math.ceil(valeur_num);
-    return valeur_num || 0;
+    valeur_num = Math.ceil(valeur_num)|| 0;
+    return valeur_num  ;
   }
 
Index: /extensions/Autosize/js/autosizeDetect.js
===================================================================
--- /extensions/Autosize/js/autosizeDetect.js	(revision 22217)
+++ /extensions/Autosize/js/autosizeDetect.js	(revision 22218)
@@ -1,4 +1,4 @@
 function on_load() {
-	var myWidth = 0, myHeight = 0, myImgWidth = 0, myImgHeight = 0;
+	var myWidth = 0, myHeight = 0;
 	if (typeof (window.innerWidth) == 'number') {
 		// Non-IE
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js	(revision 22217)
+++ /extensions/Autosize/js/conflit.js	(revision 22218)
@@ -7,5 +7,5 @@
 var browser = detect_browser();
 image_w = 600;
-image_h = 400
+image_h = 400;
 var pamoorama_detect = true;
 
@@ -23,5 +23,5 @@
         netscape: false,
         seamonkey: false
-    }
+    };
     if (checkIt('konqueror')) { mybrowser.Konqueror = true; lbrowser = "konqueror"; OS = "Linux"; }
     else if (checkIt('seamonkey')) { mybrowser.seamonkey = true; lbrowser = "seamonkey"; }
@@ -46,5 +46,5 @@
     mybrowser.OS = OS;
     mybrowser.browser = lbrowser;
-    return mybrowser
+    return mybrowser;
 };
 function checkIt(string) {
@@ -190,5 +190,5 @@
           jQuery(".gmapsPopup").css("left", l1 + "px");
           jQuery(".gmapsPopup").css("top", h1 + "px");
-        })
+        });
         //=============================================================
         //   jQuery(window).resize();
@@ -281,12 +281,16 @@
 function getStackTrace() {
     var callstack = [];
-    var isCallstackPopulated = false;
+    var isCallstackPopulated = false; 
+    var state_ff = "";
+    var currentFunction = arguments.callee.caller;
+    var fn2 = null;
+    var fn1=null;
+    
     try {
         i.dont.exist += 0; //doesn't exist- that's the point
     } catch (e) {
-        var retcallstack = [];
-        var e_message = e.message;
+        retcallstack = [];        
         var e_stack = e.stack;
-        var state_ff = "";
+       
         if (e_stack) { //Firefox Opera 3.6
             //=== test fichier source =============
@@ -361,5 +365,6 @@
     }
     if (!isCallstackPopulated) { //IE and Safari
-        var currentFunction = arguments.callee.caller;
+        currentFunction = arguments.callee.caller;
+        fn2 = null,fn1=null;
         //next
         callstack = [];
@@ -370,8 +375,8 @@
         }
         states = [];
-        var fn1 = currentFunction.toString(); // fonction d'appel local (conflit)
+        fn1 = currentFunction.toString(); // fonction d'appel local (conflit)
 
         currentFunction = currentFunction.caller;
-        var fn2 = currentFunction.toString(); // fonction d'appel local (conflit)
+       fn2 = currentFunction.toString(); // fonction d'appel local (conflit)
         currentFunction = currentFunction.caller;
         //$family
@@ -407,5 +412,5 @@
             //======================
             //? bubble
-            Expression = new RegExp("\\$", "gi")
+            Expression = new RegExp("\\$", "gi");
             if (fn.match(Expression)) {
                 if (fn.match(RegExp("rateForm", "gi"))) {
@@ -416,8 +421,8 @@
             }
             // "window.fireEvent('domready')"
-            Expression = new RegExp("window.fireEvent", "gi")
+            Expression = new RegExp("window.fireEvent", "gi");
             if (fn.match(Expression)) {  //luciano
                 // "window.fireEvent('domready')"
-                Expression = new RegExp("window.fireEvent..domready..", "gi")
+                Expression = new RegExp("window.fireEvent..domready..", "gi");
                 if (fn.match(Expression)) {
                     states.push('Luciano');
@@ -492,5 +497,5 @@
     $.ajax = function (args) {
       return jQuery.ajax(args);
-    }   
+    }   ;
 }
    
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 22217)
+++ /extensions/Autosize/template/autosize.tpl	(revision 22218)
@@ -11,5 +11,5 @@
         has_pamoorama: '{$has_pamoorama}',
         slideshow: '{$slide_show}',
-
+        AUTOSIZE_PATH:'{$AUTOSIZE_PATH}',
         pictureSelType:'{$pictureSelType}',       
         pictureDeriv :'{$pictureDeriv}' ,
Index: /extensions/Autosize/template/picture_1.tpl
===================================================================
--- /extensions/Autosize/template/picture_1.tpl	(revision 22217)
+++ /extensions/Autosize/template/picture_1.tpl	(revision 22218)
@@ -15,7 +15,5 @@
 {else }
 	{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions'  }
-	{if $theme != "elegant"}
-		{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery"  }
-	{/if} 
+
 	{combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
 {/if} 
@@ -24,2 +22,8 @@
 	{combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false" require="jquery" }
 {/if}
+
+	{if $theme != "elegant"}	{/if} 
+
+		{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery,Affiche_script" }
+
+ 
