Index: webform.module
===================================================================
--- webform.module	(revision 13762)
+++ webform.module	(working copy)
@@ -1143,11 +1143,36 @@
 function theme_webform_view($node, $teaser, $page, $form, $enabled) {
   // Only show the form if this user is allowed access.
   if ($enabled) {
-    return $form;
+    return $form . theme_webform_navigation($node);
   }
 }
 
 /**
+ * Output a navigation section for the Webform
+ *
+ * @param $node
+ *   The webform node object.
+ */
+function theme_webform_navigation($node) {
+  $nav = '';
+  $page_num = 1;
+  $components = $node->webform['components'];
+  foreach ($components as $component) {
+    if ($component['type'] == 'pagebreak') {
+      $page_num++;
+    }
+    if ($component['type'] == 'section') {
+      $nav .= '<li><a href="/?q=node/' . $node->nid . '&page='. $page_num . '">' .$component['name']."</a></li>\n";;
+    }
+  }
+  if (!empty($nav)) {
+    $nav = '<ul id="webform_nav">' . $nav . "</ul>\n";
+  }
+  return $nav;
+}
+
+
+/**
  * Display a message to a user if they are not allowed to fill out a form.
  *
  * @param $node
@@ -1480,7 +1505,12 @@
           }
         }
         else {
-          $page_num = 1;
+	  if (isset($_GET['page'])) {
+	    $page_num = max(intval($_GET['page']), 1);
+	  }
+	  else {
+	    $page_num = 1;
+	  }
         }
 
         $form['details']['page_num'] = array(
