Index: modules/comment/comment.js
===================================================================
RCS file: modules/comment/comment.js
diff -N modules/comment/comment.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/comment/comment.js	3 Mar 2007 06:52:35 -0000
@@ -0,0 +1,30 @@
+// $Id: $
+
+/**
+ * Add next/previous links for new comments.
+ */
+Drupal.commentNewHandler = function() {
+  // Find all current "New" notices.
+  var total = $("span.new").length;
+  if (total <= 1) {
+    // If there are 1 or 0 new comments there is no need to add prev/next links.
+    return;
+  }
+
+  // Add previous/next links to each "New" notice.
+  $("span.new").each(function(i) {
+    // Wrap to the end if necessary.
+    var prevNum = (i == 0? total - 1 : i - 1); 
+    // Wrap to the beginning if necessary.
+    var nextNum = (i == total - 1? 0 : i + 1); 
+    $(this).prepend($('<a href="#" title="'+ Drupal.settings.comment.previous +'">&laquo;</a> ').click(function() { Drupal.commentNewScrollTo(prevNum); return false; }));
+    $(this).append($(' <a href="#" title="'+ Drupal.settings.comment.next +'">&raquo;</a>').click(function() { Drupal.commentNewScrollTo(nextNum); return false; }) );
+  });
+}
+
+/**
+ * Scroll to the ith new comment.
+ */
+Drupal.commentNewScrollTo = function(i) {
+  window.scrollTo(0, Drupal.absolutePosition($("span.new").get(i)).y);
+}
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.520.2.2
diff -u -p -r1.520.2.2 comment.module
--- modules/comment/comment.module	29 Jan 2007 21:51:53 -0000	1.520.2.2
+++ modules/comment/comment.module	3 Mar 2007 06:52:36 -0000
@@ -1012,6 +1012,13 @@ function comment_render($node, $cid = 0)
       $divs = 0;
       $last_depth = 0;
       drupal_add_css(drupal_get_path('module', 'comment') .'/comment.css');
+      drupal_add_js(drupal_get_path('module', 'comment') .'/comment.js');
+      drupal_add_js(array('comment' => array('previous' => t('Previous new comment'), 'next' => t('Next new comment'))), 'setting');
+      drupal_add_js('
+// Global Killswitch
+if (Drupal.jsEnabled) {
+  $(document).ready(Drupal.commentNewHandler);
+}', 'inline');
       while ($comment = db_fetch_object($result)) {
         $comment = drupal_unpack($comment);
         $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
