Index: /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/header.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/header.xsl	(revision 33074)
+++ /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/header.xsl	(revision 33074)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:java="http://xml.apache.org/xslt/java"
+                xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+                xmlns:gslib="http://www.greenstone.org/skinning"
+                xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+                extension-element-prefixes="java util"
+                exclude-result-prefixes="java util gsf">
+
+  <xsl:template name="favicon">
+    <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
+  </xsl:template>
+
+  <xsl:template name="additionalHeaderContent-interface">
+    <link rel="stylesheet" href="interfaces/{$interface_name}/style/custom.css" type="text/css"/>
+  </xsl:template>
+
+
+
+
+  <!-- ***** QUICK SEARCH AREA ***** -->
+  <!-- Search form should only appear if there's a search (query) service AND it has an index. 
+       By default, all collections end up with some query service (default is MGPP) even when they have
+       no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
+  <xsl:template name="quick-search-area">
+    <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
+      <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
+      <div id="quicksearcharea">
+	<xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
+	  <xsl:choose>
+	    <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'">
+	      <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
+		<!-- This parameter says that we have come from the quick search area -->
+		<input type="hidden" name="qs" value="1"/>
+		<input type="hidden" name="rt" value="rd"/>
+		<input type="hidden" name="s1.level">
+		  <xsl:attribute name="value">
+		    <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
+		  </xsl:attribute>
+		</input>
+		<xsl:choose>
+		  <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
+		    <input type="hidden" name="s1.startPage" value="1"/>
+		  </xsl:when>
+		  <xsl:otherwise>
+		    <input type="hidden" name="startPage" value="1"/>
+		  </xsl:otherwise>
+		</xsl:choose>
+
+		<!-- The query text box -->
+		<span class="querybox">
+		  <xsl:variable name="qs">
+		    <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
+		  </xsl:variable>
+		  <nobr>
+		    <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
+		      <!--
+			  <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
+		      -->
+		      <xsl:with-param name="default" select="normalize-space($qs)"/>
+		      
+		    </xsl:apply-templates>
+		  </nobr>
+		</span>
+		<!-- The index selection list -->
+		<xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
+		  <span class="textselect">
+		    <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
+		      <xsl:with-param name="default">
+			<xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
+		      </xsl:with-param>
+		      <xsl:with-param name="hideSingle">false</xsl:with-param>
+		      <xsl:with-param name="quickSearch">true</xsl:with-param>
+		    </xsl:apply-templates>
+		  </span>
+		</xsl:if>
+		<!-- The partition selection list -->						
+		<xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'">
+		  <span class="textselect">
+		    <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']">
+		      <xsl:with-param name="default">
+			<xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/>
+		      </xsl:with-param>
+		      <xsl:with-param name="hideSingle">true</xsl:with-param>
+		      <xsl:with-param name="quickSearch">true</xsl:with-param>
+		    </xsl:apply-templates>
+		  </span>
+		</xsl:if>	
+		<!-- The language selection list -->						
+		<xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'">
+		  <span class="textselect">
+		    <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']">
+		      <xsl:with-param name="default">
+			<xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" mode="calculate-default"/>
+		      </xsl:with-param>
+		      <xsl:with-param name="hideSingle">true</xsl:with-param>
+		      <xsl:with-param name="quickSearch">true</xsl:with-param>
+		    </xsl:apply-templates>
+		  </span>
+		</xsl:if>							
+		<!-- The submit button (for TextQuery) -->
+		<xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
+		  <input type="submit" id="quickSearchSubmitButton">
+		    <xsl:attribute name="value">
+		      <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
+		    </xsl:attribute>
+		  </input>
+		  <br/>
+		</xsl:if>
+	      </form>
+	    </xsl:when>
+	    <xsl:otherwise><br/></xsl:otherwise>
+	  </xsl:choose>			
+	</xsl:if>
+	<!-- The list of other search types -->
+	<ul>
+	  <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
+	    <xsl:if test="/page/pageRequest/paramList/param[@name='qs']/@value = 1 or not(@name = /page/pageRequest/paramList/param[@name='s']/@value)">
+	      <!-- **** Customized -->
+	      <xsl:if test="@name != 'TextQuery'">
+
+		<li class="ui-state-default ui-corner-all">
+		  <a>
+		    <xsl:attribute name="href">
+		      <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
+		    </xsl:attribute>
+		    <xsl:value-of select="displayItem[@name='name']"/>
+		  </a>
+		</li>
+	      </xsl:if>
+	    </xsl:if>
+	  </xsl:for-each>
+	</ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  
+</xsl:stylesheet>
Index: /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/main.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/main.xsl	(revision 33073)
+++ /main/trunk/model-interfaces-dev/heritage-nz/transform/layouts/main.xsl	(revision 33074)
@@ -19,5 +19,4 @@
 	<xsl:include href="formatmanager.xsl"/>
 	-->
-
 	
 	<!-- the main layout is defined here -->
@@ -31,4 +30,7 @@
 				<xsl:call-template name="create-html-header"/>
 				<xsl:call-template name="berryBasketHeadTags"/>	
+				<!-- custom berry basket javascript -->
+				<!-- ***** custom css **** -->
+				<script type="text/javascript" src="interfaces/heritage-nz/js/berrybasket/custom.js"><xsl:text> </xsl:text></script>
 			</head>
 			
Index: /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/berry.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/berry.xsl	(revision 33074)
+++ /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/berry.xsl	(revision 33074)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+
+  
+  <!-- set page title -->
+  <xsl:template name="pageTitle"><a href="{$library_name}/collection/pdf-reports/page/about">PDF Reports</a><gslib:rightArrow/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'berry.title')"/></xsl:template>
+
+  <!-- add in our custom berry basket code -->
+  <xsl:template name="customJavascript">
+    <script type="text/javascript" src="interfaces/heritage-nz/js/berrybasket/custom.js"><xsl:text> </xsl:text></script>
+  </xsl:template>
+
+</xsl:stylesheet>  
Index: /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl	(revision 33073)
+++ /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl	(revision 33074)
@@ -10,9 +10,174 @@
   
 
+  <!-- set page title -->
+  <xsl:template name="pageTitle"><gslib:collectionNameLinked/><gslib:rightArrow/><gslib:serviceName/></xsl:template>
+
+
+  <!-- the page content -->
+  <xsl:template match="/page/pageResponse">
+    <xsl:call-template name="classifierPre"/>
+    
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript">$(window).load(openStoredClassifiers);</script>
+
+    <!-- **** Customized **** -->
+    <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable>
+    <xsl:variable name="floatRightWidth">
+      <xsl:choose>
+	<xsl:when test="$clName = 'CL4'">20</xsl:when>
+	<xsl:otherwise>20</xsl:otherwise> <!-- used to be 30 -->
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="floatLeftWidth">
+      <xsl:choose>
+	<xsl:when test="$clName = 'CL4'">58</xsl:when>
+	<xsl:otherwise>77</xsl:otherwise> <!-- used to be 67 -->
+      </xsl:choose>
+    </xsl:variable>
+
+    <!-- **** Customized **** -->
+    <div id="float-anchor" style="width: {$floatRightWidth}%; min-width:180px; float:right; margin: 0 0 10px 20px;">
+
+      <!-- this right sidebar -->
+      <div id="rightSidebar">
+	<xsl:comment>Filler needed for div</xsl:comment>
+	<xsl:if test="$berryBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
+	  <xsl:if test="$berryBasketOn">
+	    <xsl:call-template name="viewOptions"/>
+	    <!-- show the berry basket if it's turned on -->
+	    <div class="tableOfContentsContainer" style="position:relative; z-index: 2;"> <!-- **** -->
+	      <gslib:berryBasket/>
+	      <xsl:text> </xsl:text>
+	    </div>
+	  </xsl:if>
+	  
+	  <xsl:if test="$documentBasketOn">
+	  <gslib:documentBasket/>
+	  <xsl:text> </xsl:text>
+	  </xsl:if>
+	</xsl:if>
+      </div>
+    </div>
+    
+    <!--
+	show the clasifier results - 
+	you can change the appearance of the results by editing
+	the two templates at the bottom of this file
+    -->
+    <!-- **** Customized **** -->
+    <div id="results" style="width: {$floatLeftWidth}%">
+      <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
+      <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
+      
+      <xsl:call-template name="classifierResultsPre"/>
+      
+      <xsl:apply-templates select="classifier">
+	<xsl:with-param name="collName" select="$collName"/>
+	<xsl:with-param name="serviceName" select="$serviceName"/>
+      </xsl:apply-templates>
+    </div>
+    
+    <div class="clear"><xsl:text> </xsl:text></div>
+  </xsl:template>
+
+
+
+  <xsl:template name="viewOptions">
+
+    <div id="viewAndZoomOptions" class="ui-state-default ui-corner-all">
+      <ul id="viewOptions">
+	
+	<!-- Zoom on/off button -->
+
+	  <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false'">
+
+	    <!-- **** Customized **** -->
+	    <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable>
+	    <xsl:if test="$clName = 'CL4'">
+	      <li id="zoomOptions" style="display:none;">
+<!--
+		<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute>
+-->
+		<xsl:attribute name="title">Enable/disable Zoom feature over map</xsl:attribute>
+		<img id="zoomToggleImage">
+		  <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'zoom_image')"/></xsl:attribute>
+		</img>
+
+		<input id="zoomToggle" type="checkbox" checked="checked"/>
+		<script type="text/javascript">
+		  <xsl:text disable-output-escaping="yes">
+		    $("#zoomToggle").change(function()
+		    {
+		      //console.log("**** zoomToggle.change()");
+		      _imageZoomEnabled = $("#zoomToggle").prop("checked");
+		      //console.log("**** imageZoomEnable now = " + _imageZoomEnabled);
+		    });
+		  
+		    $("#zoomToggleImage").click(function()
+		    {
+		      //console.log("**** zoomToggle.click()");
+		      $("#zoomToggle").prop("checked", !$("#zoomToggle").prop("checked"));
+		      _imageZoomEnabled = $("#zoomToggle").prop("checked");
+		      //console.log("**** imageZoomEnable now = " + _imageZoomEnabled);
+		    });
+		  </xsl:text>
+		</script>
+	      </li>
+	    </xsl:if>
+	  </xsl:if>
+
+
+          <!-- Floating TOC on/off button -->
+	    <li id="floatingTOCOptions">
+<!--
+	      <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute>
+-->
+	      <xsl:attribute name="title">Fix the berry basket to the right side of the screen</xsl:attribute>
+	      <img id="floatTOCToggleImage">
+		<xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_toc_image')"/></xsl:attribute>
+	      </img>
+
+	      <input id="floatTOCToggle" type="checkbox"/>
+	      <script type="text/javascript">
+		<xsl:text disable-output-escaping="yes">
+		  $("#floatTOCToggle").prop("checked", false);
+		  $("#floatTOCToggle").click(function()
+		  {
+		    floatMenu($("#floatTOCToggle").prop("checked"));
+		  });
+		  
+		  $("#floatTOCToggleImage").click(function()
+		  {
+		    $("#floatTOCToggle").prop("checked", !$("#floatTOCToggle").prop("checked"))
+		    floatMenu($("#floatTOCToggle").prop("checked"));
+		  });
+		</xsl:text>
+	      </script>
+	    </li>
+	    <xsl:if test="/page/pageRequest/paramList/param[@name='ftoc']/@value = '1'">
+	      <script type="text/javascript">
+		<xsl:text disable-output-escaping="yes">
+		  $(window).load(function()
+		  {
+		    $("#floatTOCToggle").prop("checked", true);
+		    floatMenu(true);
+		  });
+		</xsl:text>
+	      </script>
+	    </xsl:if>
+      </ul>
+      <div style="clear:both;"><xsl:text> </xsl:text></div>
+    </div>
+  </xsl:template>
+  
+
+
+
   <xsl:template match="classifier">
     <xsl:param name="collName"/>
     <xsl:param name="serviceName"/>
     <div id="classifiers">
-      <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
+      <!-- **** Customized **** -->
+      <xsl:variable name="clName"><xsl:value-of select="@name"/></xsl:variable>
       <xsl:choose>
 	<xsl:when test="@childType = 'HList'">
@@ -23,6 +188,7 @@
 	</xsl:when>
 	<xsl:otherwise>
+	  <!-- **** Customized **** -->
 	  <div style="position: relative">
-	    <xsl:if test="$cl_name = 'CL4'">
+	    <xsl:if test="$clName = 'CL4'">
 	      <!--
 		  width="1380.2666"
@@ -30,5 +196,5 @@
 	      -->
 	      <iframe src="interfaces/{$interface_name}/iframe/nz-territories.svg"
-		      style="float:right; positionXX: absolute; width: 345px; height: 436px; border: none; ">
+		      style="float:right; width: 345px; height: 436px; border: none; ">
 		<gsf:comment>filler</gsf:comment>
 	      </iframe>
Index: /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/query.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/query.xsl	(revision 33074)
+++ /main/trunk/model-interfaces-dev/heritage-nz/transform/pages/query.xsl	(revision 33074)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	xmlns:gsvar="http://www.greenstone.org/skinning-var"
+	xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util gsf">
+
+  <!-- set page title -->
+  <xsl:template name="pageTitle">
+    <gslib:collectionNameLinked/><gslib:rightArrow/><gslib:serviceName/>
+  </xsl:template>
+</xsl:stylesheet>
