Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.80
diff -u -r1.80 menu.inc
--- includes/menu.inc	24 Apr 2005 16:34:32 -0000	1.80
+++ includes/menu.inc	6 May 2005 23:37:44 -0000
@@ -557,6 +557,81 @@
     return "\n<ul>\n". $tree ."\n</ul>\n";
   }
 }
+ 
+ /**
+ * Generate the horizontal menu. Often referred to as primary and secondary links.
+ *
+ * @param $pid
+ *   The menu ID where to render from. All children of this menu item will be rendered, 
+ *   but the item itself will be omitted.
+ *   defaults to NULL, meaning it will use the settings from menu.
+ * @param $start_level
+ *   provide the number of levels under the pid you want to show your items. 
+ *   For example, if you want to show the secondary items somewhere else, you call
+ *   theme_tabs_menu_tree with a $start_level 2. 
+  * @param $end_level
+ *   provide the number of levels under the pid you want to show children of your items. 
+ *   For example, if you want to show the secondary and tertiary items somewhere else, you call
+ *   theme_tabs_menu_tree with a $start_level 2 and $end_level 3; Provide 'inf' if you want to show all items.
+ *   If you want only onle level , say level 2, give $start_level = 1  and $end_level = 1.
+ * @param $show_empty
+ *   can be 'TRUE' or 'FALSE'
+ *   used to render an empty secondary link tab, if therre are no secondary items.
+ *   if no empty tab is rendered, it is very difficult to design the page in a consistant
+ *   way. Defaults to 'TRUE'
+ *
+ * @ingroup themeable
+ */
+ 
+function theme_tabs_menu_tree($pid = NULL, $start_level = 1, $end_level = 2, $show_empty = TRUE) {
+  $menu = menu_get_menu();
+
+  if (!$pid) {
+    //normal sitution
+    $pid = theme_get_setting('primary_menu');
+  }
+  else {
+    //we are dealing with a second row of primary tabs.
+    static $active_level;
+  }
+
+  if (!$active_level) {
+    $active_level = 1;
+  }
+
+  $tabs = '';
+
+  while ($stop == FALSE) {
+    $stop = TRUE;
+
+    ($start_level <= $active_level) ? $tabs .= "<ul class=\"tabs level-$active_level\">\n" : NULL;
+    //walk trough all children.
+    foreach ($menu['visible'][$pid]['children'] as $mid) {      
+      if (count($menu['visible'][$mid]['children'])) {
+        if (menu_in_active_trail($mid)) {
+          $active_mid = $mid;
+          ($end_level == 'inf' || ($active_level < $end_level)) ? $stop = FALSE : $stop = TRUE;
+          $style = 'expanded'; 
+        }
+        else {
+          $style = 'collapsed';
+        }
+      }
+      else {
+        $style = 'leaf';
+      }
+      if ($start_level <= $active_level) { //TODO: the $show_empty stuff must be in here.
+        $tabs .= "\t\t<li class=\"$style level-$active_level\">". menu_item_link($mid) ."</li>\n";
+      }
+    }
+    ($start_level <= $active_level) ? $tabs .= "</ul>\n" : NULL;
+
+    $pid = $active_mid;
+    $active_level ++;
+  }
+
+  return $tabs;
+}
 
 /**
  * Returns a rendered menu tree.
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.235
diff -u -r1.235 theme.inc
--- includes/theme.inc	6 May 2005 09:01:46 -0000	1.235
+++ includes/theme.inc	6 May 2005 23:37:45 -0000
@@ -215,6 +215,7 @@
     'secondary_links'               =>  array(),
     'mission'                       =>  '',
     'default_logo'                  =>  1,
+    'primary_menu'                  =>  1,
     'logo_path'                     =>  '',
     'toggle_logo'                   =>  1,
     'toggle_name'                   =>  1,
Index: misc/drupal.css
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.css,v
retrieving revision 1.102
diff -u -r1.102 drupal.css
--- misc/drupal.css	8 Apr 2005 14:59:14 -0000	1.102
+++ misc/drupal.css	6 May 2005 23:37:46 -0000
@@ -553,3 +553,41 @@
 ul.secondary a.active {
   border-bottom: 4px solid #999;
 }
+
+
+
+
+/* navigation */
+
+ul.level-1 {
+  list-style-type: none;
+  text-align: right;
+}
+
+ul.level-1 li, ul.level-2 li {
+  margin: 0;
+  padding: 0;
+  display: block;
+  float: right;
+  text-align: center;
+}
+
+ul.level-1 li a, ul.level-2 li a {
+  background-color: #fff;
+  margin: 5px 0 0 10px;
+  padding: 0 5px;
+  display: block;
+}
+
+ul.level-1 li a.active, ul.level-1 li a:hover, ul.level-2 li a.active, ul.level-2 li a:hover {
+ text-decoration: underline;
+}
+
+
+ul.level-2 {
+  clear: both;
+  list-style-type: none;
+  text-align: right;
+}
+
+
Index: modules/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system.module,v
retrieving revision 1.208
diff -u -r1.208 system.module
--- modules/system.module	5 May 2005 07:35:57 -0000	1.208
+++ modules/system.module	6 May 2005 23:37:48 -0000
@@ -653,43 +653,20 @@
   if (!$key) {
     // Menu settings
 
-    $header = array(t('link text'), t('url'), t('description'));
-    foreach (array('Primary', 'Secondary') as $utype) {
-      $group = '';
-      $rows = array();
-
-      // Use $utype field , and strtolower() it to get the type field.. to avoid issues with ucfirst() and unicode.
-      $type = strtolower($utype);
-      $value = $settings[$type . '_links'];
-      if (!is_array($value)) {
-        $value = array();
-      }
-
-      // Increment the link count, if the user has requested more links.
-      if (variable_get($type . '_links_more', false)) {
-        variable_del($type . '_links_more');
-        variable_set($type . '_link_count', variable_get($type . '_link_count', 5) + 5);
-      }
-
-      // Get the amount of links to show, possibly expanding if there are more links defined than the count specifies.
-      $count = variable_get($type . '_link_count', 5);
-      $count = ($count > sizeof($value['link'])) ? $count : sizeof($value['link']);
-      if (variable_get($type . '_link_count', 5) != $count) {
-        variable_set($type . '_link_count', $count);
-      }
-
-      for ($i = 0; $i < $count; $i++) {
-        $row = array();
-        foreach (array('text', 'link', 'description') as $field) {
-          $row[] = form_textfield('', $var . '][' . $type . '_links][' . $field . '][' . $i, $value[$field][$i], 15, 90);
-        }
-        $rows[] = $row;
-      }
+    $menu = menu_get_menu();
+    $group = '';
 
-      $group .= form_item('', theme("table", $header, $rows), t('You can specify your _TYPE_ links here, one link per line.<br /> The link text field is the text you want to link.<br /> The url field is the location the link points to.<br /> The description field is an optional description of where the link points.', array('_TYPE_' => $type)));
-      $group .= form_checkbox(t('I need more _TYPE_ links.', array('_TYPE_' => $type)), $type . '_links_more', 1, FALSE, t('Checking this box will give you 5 additional _TYPE_ links.', array('_TYPE_' => $type)));
-      $form .= form_group(t('_TYPE_ link settings', array('_TYPE_' => $utype)), $group);
+    foreach ($menu['items'][0]['children'] as $mid) {
+      $options[$mid] = $menu['items'][$mid]['title'];
+    }
+    if(count($options) > 1) {
+      $group = form_radios(t('primary menu items'), $var . '][primary_menu', $settings['primary_menu'], $options, t('Choose a container for primary menu items.'), FALSE);
+    }
+    else {
+      $group = form_hidden($var . '][primary_menu', $settings['primary_menu']);
+      $group .= t('You have only one container. The primary items are automatically set to use that container.');
     }
+    $form .= form_group(t('Navigation settings'), $group); 
 
     // Toggle node display.
     $group = '';
