--- ne_orig	2008-03-11 09:48:58.000000000 +0100
+++ ne_edited	2008-03-11 09:52:02.000000000 +0100
@@ -3,7 +3,7 @@ function nicedit_footer() {
     // include the nicEdit.js
     $path = drupal_get_path('module', 'nicedit') .'/nicEditor';
     if (file_exists(realpath($path .'/nicEdit.js'))) {
-      drupal_add_js($path .'/nicEdit.js', 'module');
+      $output = '<script type="text/javascript" src="'.base_path().'/'.$path.'/nicEdit.js"></script>';
     }
     else {
       $output = '<script type="text/javascript" src="http://js.nicedit.com/nicEdit.js"></script>';
@@ -23,7 +23,7 @@ function nicedit_footer() {
       $all_settings = _nicedit_get_js_settings($page, $name, $path);
       $js[] = 'try { $(\''. $element_id .'\').nicedit = new nicEditor({'. $all_settings .'}).panelInstance(\''. $element_id .'\') } catch(err) { }';
     }
-    drupal_add_js('bkLib.onDomLoaded(function() {'. implode(';', $js) .'})', 'inline', isset($output) ? 'footer' : 'header');
+    $output .= '<script type="text/javascript">bkLib.onDomLoaded(function() {'. implode(';', $js) .'})</script>';
 
     return $output;
   }
