Index: /gs3-installations/whakatohea-dl/trunk/interfaces/wmtb/transform/layouts/main.xsl
===================================================================
--- /gs3-installations/whakatohea-dl/trunk/interfaces/wmtb/transform/layouts/main.xsl	(revision 37392)
+++ /gs3-installations/whakatohea-dl/trunk/interfaces/wmtb/transform/layouts/main.xsl	(revision 37393)
@@ -27,7 +27,4 @@
       <xsl:if test="$favouriteBasketOn">
         <xsl:call-template name="favouritesHeadTags" />
-      </xsl:if>
-      <xsl:if test="$documentBasketOn">
-        <xsl:call-template name="documentBasketHeadTags" />
       </xsl:if>
       
@@ -98,10 +95,12 @@
                       <xsl:if test="page/pageRequest/@subaction='home'">
                         <div id="cross-coll-div">
+			  <xsl:call-template name="langSwitch"/>
                           <xsl:call-template name="crossCollSearch"/>
                         </div>
                       </xsl:if>
                       <xsl:if test="page/pageRequest/paramList/param/@name='c' and /page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
-                        <xsl:call-template name="quick-search-area"/>
-                      </xsl:if>
+			<xsl:call-template name="langSwitch"/>
+			<xsl:call-template name="quick-search-area"/>
+		      </xsl:if>
                     </div>
                   </div>
@@ -160,4 +159,35 @@
 </xsl:template>
 
+<xsl:template name="langSwitch">
+<xsl:variable name="swaplangname"><xsl:choose><xsl:when test="/page/@lang = 'mi'">English</xsl:when><xsl:otherwise>Maori</xsl:otherwise></xsl:choose></xsl:variable>
+<div style="float:left; text-align:right;"><small><a id="replaceLink"><xsl:attribute name="title"><gsf:collectionText name="about.changelangtofrommaori"/></xsl:attribute><xsl:value-of select="$swaplangname"/></a></small></div>
+<xsl:variable name="langcgiarg"><xsl:choose><xsl:when test="/page/@lang = 'mi'">l=en</xsl:when><xsl:otherwise>l=mi</xsl:otherwise></xsl:choose></xsl:variable>
+<script type="text/javascript">
+  <xsl:text disable-output-escaping="yes">
+    $(window).ready(function()
+    {
+    var url = document.URL;
+    if(url.indexOf("?") != -1)
+    {
+    if(url.search(/[&amp;?]?l=[^&amp;\b]*/g) != -1)
+    {
+    url = url.replace(/([&amp;?]?)l=[^&amp;\b]*/g, "$1</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
+    $("#replaceLink").attr("href", url);
+    }
+    else
+    {
+    $("#replaceLink").attr("href", url + "&amp;</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
+    }
+    }
+    else
+    {
+    $("#replaceLink").attr("href", url + "?</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
+    }
+    });
+  </xsl:text>
+</script>
+
+</xsl:template>
+
 <xsl:template name="sideNavBar">
   <div class="side-navbar">
@@ -171,5 +201,5 @@
     <!-- TODO: Hardcoded strings! -->
 
-    <a href="{$library_name}">Our Six Pou</a>
+    <a href="{$library_name}">Home</a>
 
     <a href="{$library_name}/collection/{$collNameChecked}/page/about">
@@ -443,4 +473,6 @@
 
     <!-- The index level selection list. hideSingle=true to hide the dropdown if there's only 1 level (the default). -->
+    <!-- currently only have one level, as we don't display gs versions of documents, so makes no sense to search at section level.-->
+    <!--
     at
     <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='level']/@type = 'enum_single'">
@@ -456,5 +488,5 @@
     </xsl:if>
     level
-    
+    -->
     <!-- The language selection list -->						
     <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'">
@@ -482,5 +514,4 @@
     </xsl:if>
         </form>
-        
         <div class="query-form-links" id="advanced"><a href="{$library_name}/collection/{$collNameChecked}/search/AdvancedFieldQuery">Advanced search</a></div>
         
