Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.716
diff -u -r1.716 common.inc
--- includes/common.inc	20 Nov 2007 10:18:42 -0000	1.716
+++ includes/common.inc	20 Nov 2007 11:33:54 -0000
@@ -2041,6 +2041,18 @@
   drupal_add_js($settings, 'setting');
 }
 
+/*
+ * Provide base_path for javascript.  Needed for many Ajax calls
+ */
+function drupal_add_basepath() {
+  static $bathpath_added = FALSE;
+  if (!$bathpath_added) {
+    drupal_add_js( array( 'base_path' => base_path() ), 'setting' );
+    $bathpath_added = TRUE;
+  }
+}
+
+
 /**
  * Aggregate JS files, putting them in the files directory.
  *
