Index: /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl	(revision 25484)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl	(revision 25485)
@@ -377,5 +377,18 @@
 						</xsl:attribute>
 					</input>
-					<input type="hidden" name="startPage" value="1"/>
+					<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>
+					<xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.hitsPerPage'])">
+						<input type="hidden" name="s1.hitsPerPage" value="20"/>
+					</xsl:if>
+					<xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.maxDocs'])">
+						<input type="hidden" name="s1.maxDocs" value="100"/>
+					</xsl:if>
 					<!-- The query text box -->
 					<span class="querybox">
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl	(revision 25484)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl	(revision 25485)
@@ -53,4 +53,18 @@
 	
 	<xsl:template name="displayTermInfo">
+		
+		<!-- Find the number of documents displayed per page -->
+		<xsl:variable name="level">
+			<xsl:choose>
+				<xsl:when test="/page/pageRequest/paramList/param[@name='level']">
+					<xsl:value-of select="/page/pageRequest/paramList/param[@name='level']/@value" />
+				</xsl:when>
+				<xsl:when test="/page/pageRequest/paramList/param[@name='s1.level']">
+					<xsl:value-of select="/page/pageRequest/paramList/param[@name='s1.level']/@value" />
+				</xsl:when>
+				<xsl:otherwise>Doc</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+	
 		<!-- The list of search terms with their frequency and document count -->
 		<p class="termList">
@@ -83,8 +97,24 @@
 						<xsl:choose>
 							<xsl:when test="@numDocsMatch = 1">
-								<xsl:text> </xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document')"/>
+								<xsl:text> </xsl:text>
+								<xsl:choose>
+									<xsl:when test="$level = 'Doc'">
+										<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document')"/>
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.section')"/>
+									</xsl:otherwise>
+								</xsl:choose>
 							</xsl:when>
 							<xsl:otherwise>
-								<xsl:text> </xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document_plural')"/>
+								<xsl:text> </xsl:text>
+								<xsl:choose>
+									<xsl:when test="$level = 'Doc'">
+										<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document_plural')"/>
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.section_plural')"/>
+									</xsl:otherwise>
+								</xsl:choose>
 							</xsl:otherwise>
 						</xsl:choose>
@@ -106,7 +136,7 @@
 					<input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input>
 					<input type="hidden" name="rt" value="rd"/>
-					<xsl:if test="not(paramList/param[@name='startPage'])">
-						<input type="hidden" name="startPage" value="1"/>
-					</xsl:if>
+					<!--<xsl:if test="not(paramList/param[@name='s1.startPage'])">
+						<input type="hidden" name="s1.startPage" value="1"/>
+					</xsl:if>-->
 					<xsl:choose>
 						<xsl:when test="/page/pageRequest/paramList/param[@name = 's1.maxDocs']">
@@ -179,4 +209,11 @@
 			</xsl:choose>
 		</xsl:variable>
+		
+		<xsl:variable name="usesS1">
+			<xsl:choose>
+				<xsl:when test="/page/pageRequest/paramList/param[@name='s1.startPage']">true</xsl:when>
+				<xsl:otherwise>false</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
 	
 		<!-- Find the total number of documents returned -->
@@ -206,9 +243,24 @@
 		</xsl:variable>
 		
+		<!-- Find the number of documents displayed per page -->
+		<xsl:variable name="level">
+			<xsl:choose>
+				<xsl:when test="/page/pageRequest/paramList/param[@name='level']">
+					<xsl:value-of select="/page/pageRequest/paramList/param[@name='level']/@value" />
+				</xsl:when>
+				<xsl:when test="/page/pageRequest/paramList/param[@name='s1.level']">
+					<xsl:value-of select="/page/pageRequest/paramList/param[@name='s1.level']/@value" />
+				</xsl:when>
+				<xsl:otherwise>Doc</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+		
 		<table id="searchResultNavTable"><tr>
+			<xsl:variable name="startPageName"><xsl:if test="$usesS1 = 'true'">s1.</xsl:if>startPage</xsl:variable>
+			
 			<!-- Previous button -->
 			<td id="prevArrowTD">
 				<xsl:if test="$currentPage != 1">
-					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/@subaction}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;startPage={$currentPage - 1}">
+					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/@subaction}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage - 1}">
 						<img src="interfaces/oran/images/previous.png"/>
 					</a>
@@ -217,5 +269,5 @@
 			<td id="prevTD">
 				<xsl:if test="$currentPage != 1">
-					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/@subaction}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;startPage={$currentPage - 1}">Previous</a>
+					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/@subaction}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage - 1}">Previous</a>
 				</xsl:if>
 			</td>
@@ -243,11 +295,27 @@
 					<!-- "Z" -->
 					<xsl:value-of select="$docMax"/>
-					<!-- "document[s]"-->
+					<!-- "document[s]/section[s]"-->
 					<xsl:choose>
 						<xsl:when test="$docMax = 1">
-							<xsl:text> </xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document')"/>
+							<xsl:text> </xsl:text>
+							<xsl:choose>
+								<xsl:when test="$level = 'Doc'">
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document')"/>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.section')"/>
+								</xsl:otherwise>
+							</xsl:choose>
 						</xsl:when>
 						<xsl:otherwise>
-							<xsl:text> </xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document_plural')"/>
+							<xsl:text> </xsl:text>
+							<xsl:choose>
+								<xsl:when test="$level = 'Doc'">
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.document_plural')"/>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.section_plural')"/>
+								</xsl:otherwise>
+							</xsl:choose>
 						</xsl:otherwise>
 					</xsl:choose>
@@ -258,10 +326,10 @@
 			<td id="nextTD">
 				<xsl:if test="($currentPage * $docsPerPage + 1) &lt; $docMax">
-					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/paramList/param[@name = 'sa']/@value}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;startPage={$currentPage + 1}">Next</a>
+					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/paramList/param[@name = 'sa']/@value}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage + 1}">Next</a>
 				</xsl:if>
 			</td>
 			<td id="nextArrowTD">
 				<xsl:if test="($currentPage * $docsPerPage + 1) &lt; $docMax">
-					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/paramList/param[@name = 'sa']/@value}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;startPage={$currentPage + 1}">
+					<a href="{$library_name}?a=q&amp;sa={/page/pageRequest/paramList/param[@name = 'sa']/@value}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage + 1}">
 						<img src="interfaces/oran/images/next.png"/>
 					</a>
