Index: misc/checkbox.js
===================================================================
RCS file: misc/checkbox.js
diff -N misc/checkbox.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ misc/checkbox.js	16 Nov 2006 22:48:33 -0000
@@ -0,0 +1,25 @@
+// $Id: $
+
+Drupal.checkAllAttach = function() {
+  // Find all <a> with class check-all, and attach a toggle event to them
+  // so that when the link is clicked, checkboxes within the form are checked
+  // and when the link is clicked again, checkboxes are unchecked
+  $('a.check-all').show().toggle(function() {
+    $('input:checkbox', this.form).each(function() {
+      this.checked = true;
+    });
+    $(this).html('Check&nbsp;none');
+    return false;
+  }, function() {
+    $('input:checkbox', this.form).each(function() {
+      this.checked = false;
+    });
+    $(this).html('Check&nbsp;all');
+    return false;
+  });
+}
+
+// Global Killswitch
+if (Drupal.jsEnabled) {
+  $(document).ready(Drupal.checkAllAttach);
+}
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.496
diff -u -F^f -r1.496 comment.module
--- modules/comment/comment.module	12 Nov 2006 00:11:15 -0000	1.496
+++ modules/comment/comment.module	16 Nov 2006 22:48:35 -0000
@@ -1029,6 +1029,8 @@ function comment_admin($type = 'new') {
 }
 
 function comment_admin_overview($type = 'new', $arg) {
+  drupal_add_js('misc/checkbox.js');
+
   // build an 'Update options' form
   $form['options'] = array(
     '#type' => 'fieldset', '#title' => t('Update options'),
@@ -1044,7 +1046,7 @@ function comment_admin_overview($type = 
   // load the comments that we want to display
   $status = ($type == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
   $form['header'] = array('#type' => 'value', '#value' => array(
-    NULL,
+    array('data' => l(t('Check&nbsp;all'), NULL, array('class' => 'check-all'), NULL, NULL, FALSE, TRUE)),
     array('data' => t('Subject'), 'field' => 'subject'),
     array('data' => t('Author'), 'field' => 'name'),
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.728
diff -u -F^f -r1.728 node.module
--- modules/node/node.module	16 Nov 2006 08:32:19 -0000	1.728
+++ modules/node/node.module	16 Nov 2006 22:48:37 -0000
@@ -1491,6 +1491,8 @@ function node_admin_content() {
 }
 
 function node_admin_nodes() {
+  drupal_add_js('misc/checkbox.js');
+
   global $form_values;
   $filter = node_build_filter_query();
 
@@ -1527,7 +1529,7 @@ function node_admin_nodes() {
  */
 function theme_node_admin_nodes($form) {
   // Overview table:
-  $header = array(NULL, t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
+  $header = array(l(t('Check&nbsp;all'), NULL, array('class' => 'check-all'), NULL, NULL, FALSE, TRUE), t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
 
   $output .= drupal_render($form['options']);
   if (isset($form['title']) && is_array($form['title'])) {
Index: modules/system/system.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.css,v
retrieving revision 1.14
diff -u -F^f -r1.14 system.css
--- modules/system/system.css	24 Oct 2006 19:36:52 -0000	1.14
+++ modules/system/system.css	16 Nov 2006 22:48:37 -0000
@@ -325,3 +325,8 @@
   display: block;
   padding: 1.5em 0 .5em;
 }
+
+a.check-all {
+  display: none;
+  width: 6em;
+}
\ No newline at end of file
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.711
diff -u -F^f -r1.711 user.module
--- modules/user/user.module	16 Nov 2006 09:01:55 -0000	1.711
+++ modules/user/user.module	16 Nov 2006 22:48:40 -0000
@@ -1958,6 +1958,8 @@ function theme_user_admin_new_role($form
 }
 
 function user_admin_account() {
+  drupal_add_js('misc/checkbox.js');
+
   $filter = user_build_filter_query();
 
   $header = array(
@@ -2029,7 +2031,7 @@ function user_admin_account() {
 function theme_user_admin_account($form) {
   // Overview table:
   $header = array(
-    array(),
+    array('data' => l(t('Check&nbsp;all'), NULL, array('class' => 'check-all'), NULL, NULL, FALSE, TRUE)),
     array('data' => t('Username'), 'field' => 'u.name'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),
