Index: greenstone3/trunk/web/interfaces/classic/transform/document.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/classic/transform/document.xsl	(revision 14125)
+++ greenstone3/trunk/web/interfaces/classic/transform/document.xsl	(revision 14379)
@@ -79,9 +79,13 @@
     <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
     <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
+    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
+    
+    
     <div class="heading_image">
-       <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
+       <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">       
 	<xsl:call-template name="coverImage"/> 
        </xsl:if>
     </div>
+    
     <div class="buttons" id="toc_buttons">
         <xsl:call-template name="documentButtons">
@@ -195,4 +199,11 @@
     <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
     <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
+    
+    <!-- added parameters -->
+    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
+    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
+    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
+    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
+    
     <xsl:if test="documentNode[@nodeID]">
 	<tr valign='top'><td>
@@ -206,5 +217,14 @@
 	      <table>
 		<xsl:for-each select="documentNode/documentNode[@nodeID]">
-		  <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/></xsl:apply-templates>
+		  <xsl:apply-templates select='.'>
+		  <xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/>
+		  
+		  <!-- added parameters -->
+		  <xsl:with-param name="p.a" select="$p.a"/>
+		  <xsl:with-param name="p.s" select="$p.s"/>
+		  <xsl:with-param name="p.sa" select="$p.sa"/>
+		  <xsl:with-param name="p.c" select="$p.c"/>
+		  
+		</xsl:apply-templates>
 		</xsl:for-each>
 	      </table>
@@ -218,7 +238,19 @@
     <xsl:param name="collName"/>
     <xsl:param name="ec"/>
+    
+    <!-- added these parameters to be carried when changing in toc -->
+    <xsl:param name="p.a"/>
+    <xsl:param name="p.s"/>
+    <xsl:param name="p.sa"/>
+    <xsl:param name="p.c"/>
     <!-- Display the appropriate image, depending on the node type -->
+    	
     <tr><td valign="top">
+    <!--
 	<a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
+	-->	
+	
+	<a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
+	
 	  <xsl:apply-templates select="." mode="displayNodeIcon"/>
 	</a>
@@ -243,4 +275,7 @@
 	      <xsl:with-param name="collName" select="$collName"/>
 	      <xsl:with-param name="ec" select="$ec"/>
+	      
+	      <!-- added parameters -->
+	      <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
 	      <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
 	    </xsl:apply-templates>
