diff -ur moin-1.5.0rc1.orig/MoinMoin/theme/__init__.py moin-1.5.0rc1/MoinMoin/theme/__init__.py
--- moin-1.5.0rc1.orig/MoinMoin/theme/__init__.py	2005-12-11 22:04:10.000000000 +0100
+++ moin-1.5.0rc1/MoinMoin/theme/__init__.py	2006-01-07 22:02:03.000000000 +0100
@@ -227,8 +227,10 @@
             if request.user.valid:
                 userlinks.append("""\
 <form action="" method="POST">
+<div>
 <input type="hidden" name="action" value="userform">
 <input type="submit" name="logout" value="%(logout)s">
+</div>
 </form>
 """ % { 'logout': _('Logout') })
             else:
@@ -359,28 +361,14 @@
         current = d['page_name']
 
         # Process config navi_bar
-        if request.cfg.navi_bar:
-            for text in request.cfg.navi_bar:
-                pagename, link = self.splitNavilink(text)
-                if pagename == current:
-                    cls = 'wikilink current'
-                else:
-                    cls = 'wikilink'
-                items.append(item % (cls, link))
-                found[pagename] = 1
+        (items_found, pages_found) = self.config_navibar(d)
+        items.extend([item % (i[2], i[0]) for i in items_found])
+        found.update(pages_found)
 
         # Add user links to wiki links, eliminating duplicates.
-        userlinks = request.user.getQuickLinks()
-        for text in userlinks:
-            # Split text without localization, user knows what he wants
-            pagename, link = self.splitNavilink(text, localize=0)
-            if not pagename in found:
-                if pagename == current:
-                    cls = 'userlink current'
-                else:
-                    cls = 'userlink'
-                items.append(item % (cls, link))
-                found[pagename] = 1
+        (items_found, pages_found) = self.user_navibar(d)
+        items.extend([item % (i[2], i[0]) for i in items_found])
+        found.update(pages_found)
 
         # Add current page at end
         if not current in found:
@@ -399,6 +387,57 @@
 ''' % items
         return html
 
+    def config_navibar(self,d):
+        """ Get the links from the configfile for the navibar
+
+        @param d: parameter dictionary
+        @rtype: unicode
+        @return: list with navibar items from config, dictionary with found page
+        """
+        navi_bar = self.request.cfg.navi_bar
+        found = {} # pages we found. prevent duplicates
+        items = [] # navibar items
+        current = d['page_name']
+
+        # Process config navi_bar
+        if navi_bar:
+            for text in navi_bar:
+                pagename, link = self.splitNavilink(text)
+                if pagename == current:
+                    cls = 'wikilink current'
+                else:
+                    cls = 'wikilink'
+		items.append((link, pagename, cls))
+                found[pagename] = 1
+
+        return items, found
+
+    def user_navibar(self,d):
+        """ Get the quick links for the navibar
+
+        @param d: parameter dictionary
+        @rtype: unicode
+        @return: list with navibar items, dictionary with found page
+        """
+        found = {} # pages we found. prevent duplicates
+        items = [] # navibar items
+        current = d['page_name']
+
+        # Add user links to wiki links, eliminating duplicates.
+        userlinks = self.request.user.getQuickLinks()
+        for text in userlinks:
+            # Split text without localization, user knows what he wants
+            pagename, link = self.splitNavilink(text, localize=0)
+            if not pagename in found:
+                if pagename == current:
+                    cls = 'userlink current'
+                else:
+                    cls = 'userlink'
+                items.append((link, pagename, cls))
+                found[pagename] = 1
+
+        return (items, found)
+
     def get_icon(self, icon):
         """ Return icon data from self.icons
 
@@ -759,11 +798,11 @@
     }
 }
 
-function actionsMenuInit(title) {
-    // Initialize action menu
+function menuInit(menu, title) {
+    // Initialize a menu
     for (i = 0; i < document.forms.length; i++) {
         var form = document.forms[i];
-        if (form.className == 'actionsmenu') {
+        if (form.className == menu) {
             // Check if this form needs update
             var div = form.getElementsByTagName('div')[0];
             var label = div.getElementsByTagName('label')[0];
@@ -778,11 +817,22 @@
                 item.appendChild(document.createTextNode(title));
                 item.value = 'show';
                 select.insertBefore(item, select.options[0]);
-                select.selectedIndex = 0;
+                // If there is no options with the selected attribute, we
+                // don't want to select the newly added first item.
+                // (We take a shortcut and do not loop over every item!)
+                if (!select.options[select.selectedIndex].defaultSelected)
+                  select.selectedIndex = 0;
             }
         }
     }
 }
+
+function actionsMenuInit(title) {
+    // Initialize action menu
+    // This function is replaced by menuInit(), which can initialize
+    // any menu. It remains here for backward compatibility.
+    menuInit('actionsmenu', title);
+}
 //-->
 </script>
 """ % {
