--- a/branches/2.5.4/cgi-bin/yabb2/Templates/default/default.html
+++ b/branches/2.5.4/cgi-bin/yabb2/Templates/default/default.html
@@ -2,22 +2,29 @@
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
 <head>
-<!-- YaBB 2.5.4 $Revision: 1004 $ -->
+<!-- YaBB 2.5.4 $Revision: 1080 $ -->
 <title>{yabb title}</title>
 <meta http-equiv="Content-Type" content="text/html; charset={yabb charset}" />
 {yabb style}
-{yabb syntax_js}
-<script type="text/javascript" src="{yabb html_root}/YaBB.js"></script>
-<script type="text/javascript" src="{yabb html_root}/ajax.js"></script>
 <script type="text/javascript">
-	<!--
 	//force no cache
 	if ((navigator.appVersion.substring(0,1) == "5" && navigator.userAgent.indexOf('Gecko') != -1) || navigator.userAgent.search(/Opera/) != -1) {
 	document.write('<meta http-equiv="pragma" CONTENT="no-cache" />');
 	}
+</script>
+<script type="text/javascript" src="{yabb html_root}/YaBB.js"></script>
+<script type="text/javascript" src="{yabb html_root}/ajax.js"></script>
+<script type="text/javascript">
 	{yabb javascript}
-// -->
+	{yabb javascripta}
+<!--
+if (top.location != self.location) {
+top.location = self.location.href
+}
+//-->
 </script>
+	{yabb syntax_js}
+	{yabb grayscript}
 </head>
 <body>
 <div id="ImageAlert" class="center">
@@ -59,15 +66,23 @@
 				</td>
 			</tr>
 		</table>
+		<div id="fixmenu" style="position: relative; width:100%; z-index: 100000; top: 0px;">
 		<table>
 		    <col style="width:auto" />
 		    <col style="width:100px" />
 			<tr>
-				<td class="tabmenu"><ul>{yabb tabmenu}</ul></td>
+				<td class="tabmenu">
+				    <ul>{yabb tabmenu}</ul>
+				    <div class="navmenu" id="navmen" style="display: none;">
+				        <img src="{yabb images}/back_to_top.png" id="navtotop" alt="{yabb fixtop}" title="{yabb fixtop}" onclick="toTop(0)" class="cursor" style="margin-top:5px;" />
+				    </div>
+                </td>
 				<td class="tabmenu vtop">{yabb tabadd}</td>
 			</tr>
 		</table>
+		</div>
 		{yabb addtab}
+		<div id="brcrumb" style="top: 0px;">
 		<table>
 		    <col style="width:2%" />
 			<tr>
@@ -75,6 +90,7 @@
 				<td class="nav">{yabb boardlink} {yabb navigation}</td>
 			</tr>
 		</table>
+		</div>
 		<div class="yabb_main">{yabb main}
             <div class="yabb_forumjump">{yabb forumjump}&nbsp;</div>
         </div>
@@ -100,10 +116,30 @@
 		<br /><br />
 	</div>
 </div>
+{yabb high}
 <script type="text/javascript">
-<!--
-sh_highlightDocument();
-// -->
+// Many thanks to Carsten for the fixmenu code.
+
+function fixMenu() {
+	if(document.body.scrollTop) var bdelement = document.body.scrollTop;
+	else var bdelement = document.documentElement.scrollTop;
+	if(bdelement > 135) {
+		document.getElementById("fixmenu").style.position = 'fixed';
+		document.getElementById("fixmenu").style.top = 0 + 'px';
+		document.getElementById("fixmenu").style.zIndex = 100000;
+		document.getElementById("fixmenu").style.width = '92%';
+		document.getElementById("navmen").style.display = 'block';
+		document.getElementById("brcrumb").style.marginTop = 30 + 'px';
+	}
+	else {
+		document.getElementById("fixmenu").style.position = 'relative';
+		document.getElementById("fixmenu").style.width = '100%';
+		document.getElementById("navmen").style.display = 'none';
+		document.getElementById("brcrumb").style.marginTop = 0 + 'px';
+	}
+}
+
+onscroll = fixMenu;
 </script>
 </body>
 </html>