--- wiki.pl	2009-08-16 00:03:22.000000000 +0200
+++ larpwiki-search-on-top.pl	2009-08-16 00:03:03.000000000 +0200
@@ -1298,6 +1298,7 @@
   my ($id, $title, $oldId, $backlinks) = @_;
   my $header = "";
   my $logoImage = "";
+  my $logoLink = "dummy";
   my $result = "";
   my $embed = &GetParam('embed', $EmbedWiki);
   my $altText = T('[Home]');
@@ -1319,13 +1320,25 @@
     if (!$LogoLeft) {
       $logoImage .= " align=\"right\"";
     }
-    $header = &ScriptLink($HomePage, "<$logoImage>");
+    $header = &ScriptLink($HomePage);
+    $logoLink = &ScriptLink($HomePage, "<$logoImage>");
   }
+  # changed by patch: search on top
+  $result .= '<table border="0" class="headline" summary="layout" width="100%"><tr>';
+  $result .= '<td align="left" width="60%">';
   if ($id and $backlinks) {
     $result .= $q->h1($header . &GetBackLinksSearchLink($id));
   } else {
     $result .= $q->h1($header . $title);
   }
+  $result .= "</td>";
+  $result .= '<td align="right" width="20%">';
+  $result .= '<form method="post" action="wiki.pl" enctype="application/x-www-form-urlencoded">' . &GetSearchForm() . '</form>'; # add search field
+  $result .= "</td>";
+  $result .= '<td align="right" width="20%">';
+  $result .= $logoLink;
+  $result .= "</td></tr></table>\n";
+  # end patch: search on top
   if (&GetParam("toplinkbar", 1)) {
     $result .= &GetGotoBar($id) . "<hr class=wikilineheader>";
   }
