How i change scripts in my custom theme in drupal 6
It's been a while but I think this is the way to do it in Drupal 6:

function MYTHEME_preprocess_page(&amp;$vars) {
  // Add your JS
  drupal_add_js(drupal_get_path('theme', 'MYTHEME') . '/my-tableheader.js'));

  // Get the cached JS
  $js = drupal_add_js();

  // Remove the core tableheader file
  unset($js['module']['misc/tableheader.js']); 

  // Change the scripts var to reflect the new array
  $vars['scripts'] = drupal_get_js('header', $js);
}