diff -urp drupal-6.16/misc/ahah.js sync/ahah.js
--- drupal-6.16/misc/ahah.js	2008-02-11 15:46:27.000000000 +0100
+++ sync/ahah.js	2010-03-29 16:37:40.000000000 +0200
@@ -15,11 +15,11 @@
 /**
  * Attaches the ahah behavior to each ahah form element.
  */
-Drupal.behaviors.ahah = function(context) {
-  for (var base in Drupal.settings.ahah) {
+Drupal.behaviors.ahah = function(context, settings) {
+  settings = settings || Drupal.settings;
+  for (var base in settings.ahah) {
     if (!$('#'+ base + '.ahah-processed').size()) {
-      var element_settings = Drupal.settings.ahah[base];
-
+      var element_settings = settings.ahah[base];
       $(element_settings.selector).each(function() {
         element_settings.element = this;
         var ahah = new Drupal.ahah(base, element_settings);
@@ -198,7 +198,8 @@ Drupal.ahah.prototype.success = function
   // Attach all javascript behaviors to the new content, if it was successfully
   // added to the page, this if statement allows #ahah[wrapper] to be optional.
   if (new_content.parents('html').length > 0) {
-    Drupal.attachBehaviors(new_content);
+    var settings = response.settings || Drupal.settings;
+    Drupal.attachBehaviors(new_content, settings);
   }
 
   Drupal.unfreezeHeight();
diff -urp drupal-6.16/misc/drupal.js sync/drupal.js
--- drupal-6.16/misc/drupal.js	2009-07-21 10:59:10.000000000 +0200
+++ sync/drupal.js	2010-03-29 16:37:48.000000000 +0200
@@ -34,12 +34,13 @@ Drupal.jsEnabled = document.getElementsB
  *   An element to attach behaviors to. If none is given, the document element
  *   is used.
  */
-Drupal.attachBehaviors = function(context) {
+Drupal.attachBehaviors = function(context, settings) {
   context = context || document;
+  settings = settings || Drupal.settings;
   if (Drupal.jsEnabled) {
     // Execute all of them.
     jQuery.each(Drupal.behaviors, function() {
-      this(context);
+      this(context, settings);
     });
   }
 };
