Index: greenstone3/trunk/web/interfaces/default/transform/about.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/about.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/about.xsl	(revision 18316)
@@ -12,22 +12,22 @@
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
@@ -40,7 +40,7 @@
 
   <xsl:template match="pageResponse">
-     <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
+    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     <xsl:apply-templates select="collection|serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
-   </xsl:template>
+  </xsl:template>
   
   <xsl:template match="collection|serviceCluster">
@@ -53,8 +53,8 @@
     </xsl:call-template>     
     <div id="content"> 
-        <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
-        <xsl:apply-templates select="serviceList">
-          <xsl:with-param name="collName" select="$collName"/>
-        </xsl:apply-templates>
+      <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
+      <xsl:apply-templates select="serviceList">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:apply-templates>
     </div>
   </xsl:template>
@@ -74,7 +74,7 @@
     
     <xsl:if test="service">
-     <ul id="servicelist">  	
-      <xsl:for-each select="service">
-	    <xsl:variable name="action"><xsl:choose>
+      <ul id="servicelist">  	
+	<xsl:for-each select="service">
+	  <xsl:variable name="action"><xsl:choose>
 	      <xsl:when test="@type='query'">q</xsl:when>
 	      <xsl:when test="@type='browse'">b</xsl:when>
@@ -83,10 +83,10 @@
 	      <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
 	    </xsl:choose></xsl:variable>
-	   <xsl:if test="$action !='DO_NOT_DISPLAY'">
-	       <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
+	  <xsl:if test="$action !='DO_NOT_DISPLAY'">
+	    <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
 	  </xsl:if>
   	</xsl:for-each>
       </ul> 
-     </xsl:if> 
+    </xsl:if> 
   </xsl:template>
 
Index: greenstone3/trunk/web/interfaces/default/transform/applet.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/applet.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/applet.xsl	(revision 18316)
@@ -12,22 +12,22 @@
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
@@ -41,7 +41,7 @@
   <xsl:template match="pageResponse">
     <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-     <xsl:call-template name="standardPageBanner">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>
     
     <xsl:call-template name="navigationBar">
@@ -51,5 +51,5 @@
       <xsl:copy-of select="service/applet"/>
     </div>
-    </xsl:template>
+  </xsl:template>
 </xsl:stylesheet>  
 
Index: greenstone3/trunk/web/interfaces/default/transform/authen.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/authen.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/authen.xsl	(revision 18316)
@@ -15,20 +15,20 @@
   <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>  
 
@@ -66,5 +66,5 @@
 		<td><xsl:if test="$un_s!=''">
 		    <xsl:if test="$asn!='' and $asn!='0'">
-		    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
+		      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
 		    </xsl:if>
 		  </xsl:if></td>
@@ -83,9 +83,9 @@
 		  <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
 		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ListUsers&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
-	    </xsl:when>
-	      <xsl:otherwise>
-		<a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
-	      </xsl:otherwise>
-	    </xsl:choose></li>
+		  </xsl:when>
+		  <xsl:otherwise>
+		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
+		  </xsl:otherwise>
+		</xsl:choose></li>
 	      
 	      <!--add a new user-->
@@ -100,5 +100,5 @@
 		</xsl:choose>
 	      </li>
-	     
+	      
 	      <!-- change password-->
 	      <li>
@@ -138,23 +138,23 @@
 		      <xsl:otherwise>
 
-			  <p align="left">
-			    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
-			  <xsl:if test="$err='un-pw-err'">
-			    <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
-			  </xsl:if>
-			  <xsl:if test="$err='no-permission' and $info='Login'">
-			    <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
-			  </xsl:if>
-			 <xsl:if test="$err='as-false'">
-			    <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
-			  </xsl:if>
-			  <xsl:call-template name="login">
-			    <xsl:with-param name="sub_action" select="$sub_action"/>
-			    <xsl:with-param name="authen_service" select="$authen_service"/>
-			    <xsl:with-param name="pro_action" select="$pro_action"/>	
-			  </xsl:call-template>
+			<p align="left">
+			  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
+			<xsl:if test="$err='un-pw-err'">
+			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
+			</xsl:if>
+			<xsl:if test="$err='no-permission' and $info='Login'">
+			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
+			</xsl:if>
+			<xsl:if test="$err='as-false'">
+			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
+			</xsl:if>
+			<xsl:call-template name="login">
+			  <xsl:with-param name="sub_action" select="$sub_action"/>
+			  <xsl:with-param name="authen_service" select="$authen_service"/>
+			  <xsl:with-param name="pro_action" select="$pro_action"/>	
+			</xsl:call-template>
 
 		      </xsl:otherwise>
-		   </xsl:choose>
+		    </xsl:choose>
 		  </xsl:if>
 
@@ -179,5 +179,5 @@
 		  <xsl:if test="$pro_action='AddUser'"> 
 		    <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
-			<p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
+		      <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
 		    </xsl:if>
 
@@ -185,5 +185,5 @@
 		      <p align="left">
 			<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/>
-		</p>
+		      </p>
 		      <xsl:if test="$err='no-permission'">
 			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
@@ -204,5 +204,5 @@
 			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
 		      </xsl:if>	
-		    <xsl:if test="$err='un-exist'">
+		      <xsl:if test="$err='un-exist'">
 			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
 		      </xsl:if>
@@ -306,5 +306,5 @@
 			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p>
 		      </xsl:if>
-		       <xsl:if test="$err='un-exist'">
+		      <xsl:if test="$err='un-exist'">
 			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
 		      </xsl:if>
@@ -344,5 +344,5 @@
   </xsl:template>
   
- <!--template name="login"-->
+  <!--template name="login"-->
   <xsl:template name="login">
     <xsl:param name="sub_action"/>
@@ -374,12 +374,12 @@
 	      <input type="submit" value="submit"></input></td>
 	  </tr>
-	  </table>
+	</table>
       </form>
     </div>
   </xsl:template>
 
- <!--template name="listusers"-->
+  <!--template name="listusers"-->
   <xsl:template name="listusers" >
-   <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
+    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
 
     <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
@@ -392,21 +392,21 @@
       </tr>
       <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
-      <tr>
-	<td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
-	<td id="status" bgcolor="#eeeeee">
+	<tr>
+	  <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
+	  <td id="status" bgcolor="#eeeeee">
 	    <script type="text/javascript">
 	      <xsl:text disable-output-escaping="yes">
 		var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
 		if (status=="true"){
-		   document.getElementById("status").innerHTML="enabled";
+		  document.getElementById("status").innerHTML="enabled";
 		}
 		if (status=="false"){
-		   document.getElementById("status").innerHTML="disabled";
+		  document.getElementById("status").innerHTML="disabled";
 		}
 	      </xsl:text>		 
 	    </script>
 	  </td>
-	<td id="group" bgcolor="#eeeeee">
-	     <script type="text/javascript">
+	  <td id="group" bgcolor="#eeeeee">
+	    <script type="text/javascript">
 	      <xsl:text disable-output-escaping="yes">
 		var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
@@ -414,12 +414,12 @@
 		var new_groups="";
 		for (j=0; j &lt; split_groups.length ; j++){
-                   new_groups+=split_groups[j]+" &lt;br /&gt; ";
-	       }
-	      document.getElementById('group').innerHTML=new_groups;
+		  new_groups+=split_groups[j]+" &lt;br /&gt; ";
+		}
+		document.getElementById('group').innerHTML=new_groups;
 	      </xsl:text>		 
 	    </script>
 	  </td>
-	<td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
-	<td bgcolor="#eeeeee">
+	  <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
+	  <td bgcolor="#eeeeee">
 	    <form name="ListUsersForm" method="get" action="{$library_name}">
 	      <input type='hidden' name='a' value='g'/>
@@ -437,12 +437,12 @@
 	      <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
 	    </form>
-	</td>
+	  </td>
 	</tr>
-       </xsl:for-each>
+      </xsl:for-each>
     </table>
   </xsl:template>
 
- <!--template name="modifypassword"-->
- <xsl:template name="modifypassword" >
+  <!--template name="modifypassword"-->
+  <xsl:template name="modifypassword" >
     <xsl:param name="sub_action"/>
     <xsl:param name="authen_service"/>
@@ -464,18 +464,18 @@
 	
 	<table align="center"><tr><td align="right">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
+	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
 	  <tr><td align="right">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
+	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
 	  <tr><td align="right">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
+	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
 	  <tr><td></td><td>
-	<input type="submit" value="submit"></input></td>
-	    </tr>
-	  </table>
-	</form>
-      </div>
-  </xsl:template>
-
-<!--template name="deleteuser"-->
+	      <input type="submit" value="submit"></input></td>
+	  </tr>
+	</table>
+      </form>
+    </div>
+  </xsl:template>
+
+  <!--template name="deleteuser"-->
   <xsl:template name="deleteuser">
     <xsl:param name="sub_action"/>
@@ -502,5 +502,5 @@
   </xsl:template>
   
-<!--template name="edituser"-->
+  <!--template name="edituser"-->
   <xsl:template name="edituser" >
     <xsl:param name="sub_action"/>
@@ -554,5 +554,5 @@
 	    <td  align="right"> <select id="groups" size="0">
 		<script type="text/javascript">
-		    <xsl:text disable-output-escaping="yes">
+		  <xsl:text disable-output-escaping="yes">
 		    var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
 		    var group_string=document.getElementById("group").value;
@@ -560,18 +560,18 @@
 		    var find=0;
 		    for (i=0; i &lt; group_arr.length; i++){
-		         find=0;
-		         for (j=0; j &lt; group_arr.length; j++){
-		            if (split_group_string[j]==group_arr[i]){
-		               find=1;
-                      	    }
-		         }
-	                 if (find==0){
-		             op = document.createElement('option');
-		             op.innerHTML = group_arr[i];
-		             op.setAttribute("value", group_arr[i]);
-		             document.getElementById("groups").appendChild(op);
-                         }
+		      find=0;
+		      for (j=0; j &lt; group_arr.length; j++){
+		        if (split_group_string[j]==group_arr[i]){
+		          find=1;
+		        }
+		      }
+		      if (find==0){
+		        op = document.createElement('option');
+		        op.innerHTML = group_arr[i];
+		        op.setAttribute("value", group_arr[i]);
+		        document.getElementById("groups").appendChild(op);
+		      }
 	            }
-		   
+		    
 		  </xsl:text>		 
 		</script>
@@ -590,17 +590,17 @@
 		      var find=0;
 		      for (i=0; i &lt; split_group_string.length; i++){
-		          if (split_group_string[i]==group){
-		              find=1;
-		          }
+		        if (split_group_string[i]==group){
+		          find=1;
+		        }
 		      }
 		      if (find==0){
-		          op = document.createElement('option');
-		          op.innerHTML = group;
-		          op.setAttribute("value", group);
-		          document.getElementById("collects").appendChild(op);
+		        op = document.createElement('option');
+		        op.innerHTML = group;
+		        op.setAttribute("value", group);
+		        document.getElementById("collects").appendChild(op);
 		      }
 		    </xsl:text>		 
 		  </script>
-		 </xsl:for-each>
+		</xsl:for-each>
 	      </select>
 	    </td>
@@ -610,12 +610,12 @@
 	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/>
 
-</textarea></div></td></tr> 
+		</textarea></div></td></tr> 
 	  <tr>
 
-<td></td><td>
+	    <td></td><td>
 	      <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-	       <xsl:if test="$pro_action!='AddUser'">
-	      <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-		</xsl:if>
+	      <xsl:if test="$pro_action!='AddUser'">
+		<input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
+	      </xsl:if>
 	    </td><td></td></tr>
 	</table>
@@ -625,35 +625,35 @@
   </xsl:template>
 
-<!-- addGroup() javascript -->
+  <!-- addGroup() javascript -->
   <xsl:template name="addGroup">
     <script type="text/javascript">
       <xsl:text disable-output-escaping="yes">
 	function addGroup(g){
-	    var itemSelected;
-	    var splitGroup;
-	    var groupExit;
-
-	if (document.getElementById("editForm")!=null){
+	  var itemSelected;
+	  var splitGroup;
+	  var groupExit;
+
+	  if (document.getElementById("editForm")!=null){
 	    //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
 	    itemSelected=document.getElementById(g).options.selectedIndex;
 	    if (document.getElementById(g).options[itemSelected].text!=""){
-	       if (document.getElementById("group").value==""){
-	           document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
-	       }else{
-	           splitGroup=document.getElementById("group").value.split(",");
-	           for (var i=0; i &lt; splitGroup.length; i++){
-	              if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
-	                  alert(document.getElementById(g).options[itemSelected].text + " has been added.");
-	                  groupExit=1;
-	                  break;
-	              }
-	           }
-	           if (groupExit!=1) {
-	              document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
-	           }
-	       }
-	       document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
-	   }
-	}
+	      if (document.getElementById("group").value==""){
+	        document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
+	      }else{
+	        splitGroup=document.getElementById("group").value.split(",");
+	        for (var i=0; i &lt; splitGroup.length; i++){
+	          if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
+	            alert(document.getElementById(g).options[itemSelected].text + " has been added.");
+	            groupExit=1;
+	            break;
+	          }
+	        }
+	        if (groupExit!=1) {
+	          document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
+	        }
+	      }
+	      document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
+	    }
+	  }
 	}
       </xsl:text>
Index: greenstone3/trunk/web/interfaces/default/transform/classifier.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/classifier.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/classifier.xsl	(revision 18316)
@@ -16,20 +16,20 @@
   <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
   
@@ -42,5 +42,4 @@
   <!-- page specific style goes here -->
   <xsl:template name="pageStyle">
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
     <xsl:if test="$berrybasketswitch = 'on'">
       <xsl:call-template name="berryStyleSheet"/>  
@@ -60,5 +59,5 @@
       <xsl:with-param name="collName" select="$collName"/>
     </xsl:call-template>      
- 
+    
     <div id="content">
       <xsl:apply-templates select="service/classifierList">
@@ -67,12 +66,11 @@
       </xsl:apply-templates>
       
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
-    <xsl:if test="$berrybasketswitch = 'on'">
-      <xsl:call-template name="berrybasket" />
-    </xsl:if>  
-    <xsl:apply-templates select="classifier">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="serviceName" select="$serviceName"/>
-    </xsl:apply-templates>
+      <xsl:if test="$berrybasketswitch = 'on'">
+	<xsl:call-template name="berrybasket" />
+      </xsl:if>  
+      <xsl:apply-templates select="classifier">
+	<xsl:with-param name="collName" select="$collName"/>
+	<xsl:with-param name="serviceName" select="$serviceName"/>
+      </xsl:apply-templates>
     </div>
   </xsl:template>
@@ -82,16 +80,16 @@
     <xsl:param name="serviceName"/>
     <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
-   <ul id="classifierlist">
-	<xsl:for-each select="classifier">
-	  <xsl:choose>
-	    <xsl:when test="@name=$selected">
-	         <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
-         
- 	</xsl:for-each>
+    <ul id="classifierlist">
+      <xsl:for-each select="classifier">
+	<xsl:choose>
+	  <xsl:when test="@name=$selected">
+	    <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
+	
+      </xsl:for-each>
     </ul>
-   </xsl:template>
+  </xsl:template>
 
 </xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/default/transform/classifiertools.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/classifiertools.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/classifiertools.xsl	(revision 18316)
@@ -6,25 +6,25 @@
   extension-element-prefixes="java util"
   exclude-result-prefixes="java util">
- 
+  
   <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>
-    <xsl:choose>
-      <xsl:when test="/page/pageResponse/service/classifierList/classifier[@name=$cl_name]/@horizontalAtTop">
-	<xsl:apply-templates select="." mode="horizontal-at-top">
-	  <xsl:with-param name="collName" select="$collName"/>
-	  <xsl:with-param name="serviceName" select="$serviceName"/>
-	</xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:apply-templates select="." mode="default">
-	  <xsl:with-param name="collName" select="$collName"/>
-	  <xsl:with-param name="serviceName" select="$serviceName"/>
-	</xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-   </div>
+      <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
+      <xsl:choose>
+	<xsl:when test="/page/pageResponse/service/classifierList/classifier[@name=$cl_name]/@horizontalAtTop">
+	  <xsl:apply-templates select="." mode="horizontal-at-top">
+	    <xsl:with-param name="collName" select="$collName"/>
+	    <xsl:with-param name="serviceName" select="$serviceName"/>
+	  </xsl:apply-templates>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:apply-templates select="." mode="default">
+	    <xsl:with-param name="collName" select="$collName"/>
+	    <xsl:with-param name="serviceName" select="$serviceName"/>
+	  </xsl:apply-templates>
+	</xsl:otherwise>
+      </xsl:choose>
+    </div>
   </xsl:template>
   
@@ -35,19 +35,19 @@
     <xsl:choose>
       <xsl:when test="classifierNode">
-      <ul id="classifiernodelist-horizontal">
-	<xsl:for-each select='classifierNode'>
-	  <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
-	</xsl:for-each>
+	<ul id="classifiernodelist-horizontal">
+	  <xsl:for-each select='classifierNode'>
+	    <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
+	  </xsl:for-each>
 	</ul>
 	<ul id="childrenlist">
 	  <li>
             <table><tr>
-	    <xsl:for-each select='classifierNode'>
-	      <xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
-	    </xsl:for-each>
-             </tr></table>
+		<xsl:for-each select='classifierNode'>
+		  <xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
+		</xsl:for-each>
+	      </tr></table>
 	  </li>
 	</ul>
-	</xsl:when>
+      </xsl:when>
       <xsl:otherwise>
 	<!-- there were no classifier nodes -->
@@ -55,7 +55,7 @@
           <xsl:for-each select='documentNode'>
 	    <li><table><tr><xsl:call-template name="documentNodeWrapper">
-		<xsl:with-param name='collName' select='$collName'/>
-		<xsl:with-param name='serviceName' select='$serviceName'/>
-	      </xsl:call-template></tr></table></li>
+		    <xsl:with-param name='collName' select='$collName'/>
+		    <xsl:with-param name='serviceName' select='$serviceName'/>
+		  </xsl:call-template></tr></table></li>
 	  </xsl:for-each>
 	</ul>
@@ -104,5 +104,5 @@
     <xsl:param name="collName"/>
     <xsl:param name="serviceName"/>
-      <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute><xsl:call-template name="bookshelfimg"/></a><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
+    <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute><xsl:call-template name="bookshelfimg"/></a><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
   </xsl:template>
   
@@ -112,8 +112,8 @@
     <xsl:param name="serviceName"/>
     <li><xsl:choose>
-      <xsl:when test="classifierNode|documentNode"><b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></b></xsl:when>
-      <xsl:otherwise>
-<a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise>
-    </xsl:choose>
+	<xsl:when test="classifierNode|documentNode"><b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></b></xsl:when>
+	<xsl:otherwise>
+	  <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise>
+      </xsl:choose>
     </li>
   </xsl:template>
@@ -124,9 +124,9 @@
     <xsl:param name="collName"/>
     <xsl:param name="serviceName"/>
-      <xsl:call-template name="processNodeChildren">
-	  <xsl:with-param name='collName' select='$collName'/>
-	  <xsl:with-param name='serviceName' select='$serviceName'/>
-      </xsl:call-template>
-   </xsl:template>
+    <xsl:call-template name="processNodeChildren">
+      <xsl:with-param name='collName' select='$collName'/>
+      <xsl:with-param name='serviceName' select='$serviceName'/>
+    </xsl:call-template>
+  </xsl:template>
   
   <xsl:template name="processNodeChildren">
@@ -135,28 +135,28 @@
     <xsl:for-each select='classifierNode|documentNode'>
       <xsl:choose><xsl:when test="name()='documentNode'">
-	 <li><table><tr>
-	    <xsl:call-template name="documentNodeWrapper">
-	      <xsl:with-param name='collName' select='$collName'/>
-	      <xsl:with-param name='serviceName' select='$serviceName'/>
-	    </xsl:call-template>
-             </tr></table>
+	  <li><table><tr>
+		<xsl:call-template name="documentNodeWrapper">
+		  <xsl:with-param name='collName' select='$collName'/>
+		  <xsl:with-param name='serviceName' select='$serviceName'/>
+		</xsl:call-template>
+	      </tr></table>
 	  </li>
 	</xsl:when>
 	<xsl:otherwise>
 	  <li><table><tr>
-	    <xsl:apply-templates select='.'>
-	      <xsl:with-param name='collName' select='$collName'/>
-	      <xsl:with-param name='serviceName' select='$serviceName'/>
-	    </xsl:apply-templates>
-             </tr></table>
+		<xsl:apply-templates select='.'>
+		  <xsl:with-param name='collName' select='$collName'/>
+		  <xsl:with-param name='serviceName' select='$serviceName'/>
+		</xsl:apply-templates>
+	      </tr></table>
 	  </li>
 	  <xsl:if test="child::classifierNode or child::documentNode">
 	    <!--recurse into the children-->
 	    <li><ul class="childrenlist">
-	      <xsl:apply-templates select='.' mode='process-all-children'>
-		<xsl:with-param name='collName' select='$collName'/>
-		<xsl:with-param name='serviceName' select='$serviceName'/>
-	      </xsl:apply-templates>
-                </ul>
+		<xsl:apply-templates select='.' mode='process-all-children'>
+		  <xsl:with-param name='collName' select='$collName'/>
+		  <xsl:with-param name='serviceName' select='$serviceName'/>
+		</xsl:apply-templates>
+	      </ul>
 	    </li>
 	  </xsl:if>
Index: greenstone3/trunk/web/interfaces/default/transform/config_format.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/config_format.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/config_format.xsl	(revision 18316)
@@ -39,10 +39,10 @@
 	<xslt:variable name="bookswitch"><xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xslt:variable>
 	<xslt:choose>
-    		<xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'">
-		        <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;ed=1&amp;book=on&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
-		</xslt:when>
-		<xslt:otherwise>
-		       <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;book=off&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
-		</xslt:otherwise>
+	  <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'">
+	    <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;ed=1&amp;book=on&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
+	  </xslt:when>
+	  <xslt:otherwise>
+	    <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;book=off&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
+	  </xslt:otherwise>
 	</xslt:choose>
       </xsl:otherwise>
Index: greenstone3/trunk/web/interfaces/default/transform/document.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/document.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/document.xsl	(revision 18316)
@@ -22,6 +22,6 @@
     <xsl:choose> 
       <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'">
-         <html>
-   		  <xsl:call-template name="response" />
+	<html>
+	  <xsl:call-template name="response" />
         </html>
       </xsl:when>
@@ -29,17 +29,17 @@
       <xsl:otherwise>    
         <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
+	  <head>
+	    <title>
+	      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	    </title>
+	    <xsl:call-template name="globalStyle"/>
+	    <xsl:call-template name="pageStyle"/>
+	  </head>
           <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
+	    <div id="globalwrapper">
+	      <xsl:call-template name="response" />
+	      <xsl:call-template name="greenstoneFooter"/>
+	    </div>
           </body>
         </html>
@@ -49,6 +49,6 @@
   
   
-   <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 
-   <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
+  <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 
+  <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
   
   <xsl:template name="pageTitle">
@@ -68,9 +68,9 @@
       </xsl:text>
     </style>
-     <!--TODO: add berry basket switch-->
- <!--<xsl:if test="$berryBaskets = 'true'">-->
+    <!--TODO: add berry basket switch-->
+    <!--<xsl:if test="$berryBaskets = 'true'">-->
     <xsl:if test="$berrybasketswitch = 'on'">
-     <xsl:call-template name="berryStyleSheet"/>  
-     <xsl:call-template name="js-library"/>
+      <xsl:call-template name="berryStyleSheet"/>  
+      <xsl:call-template name="js-library"/>
     </xsl:if>
   </xsl:template>
@@ -81,25 +81,25 @@
       <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'">
         <xsl:call-template name="standardPageBanner">
-           <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="collName" select="$collName"/>
         </xsl:call-template>
         <xsl:call-template name="navigationBar">
-           <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="collName" select="$collName"/>
         </xsl:call-template>
-  
+	
         <!--<xsl:if test="$berryBaskets = 'true'">-->
         <xsl:if test="$berrybasketswitch = 'on'">
           <xsl:call-template name="documentBerryBasket">
-             <xsl:with-param name="collName" select="$collName"/>
-             <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
-             <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
-             <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
+	    <xsl:with-param name="collName" select="$collName"/>
+	    <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
+	    <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
+	    <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
           </xsl:call-template>
         </xsl:if>
       </xsl:when>
-   </xsl:choose>	
-
-  <!-- display the document -->
+    </xsl:choose>	
+
+    <!-- display the document -->
     <xsl:if test="$bookswitch != 'flashxml'">
-       <xsl:text disable-output-escaping="yes">&lt;div id="content"&gt;</xsl:text>
+      <xsl:text disable-output-escaping="yes">&lt;div id="content"&gt;</xsl:text>
     </xsl:if>
     <xsl:apply-templates select="document">
@@ -107,85 +107,82 @@
     </xsl:apply-templates>
     <xsl:if test="$bookswitch != 'flashxml'">
-	<xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
-    </xsl:if>
-  </xsl:template>
-	
+      <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+  
   <xsl:template match="document">
-   <xsl:param name="collName"/>
-   <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
+    <xsl:param name="collName"/>
+    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     <xsl:choose>
       <xsl:when test="$external != ''">
-      <xsl:call-template name="externalPage">
-	<xsl:with-param name="external" select="$external"/>
-      </xsl:call-template>
+	<xsl:call-template name="externalPage">
+	  <xsl:with-param name="external" select="$external"/>
+	</xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
 
-   <xsl:if test="$bookswitch = 'flashxml'">
-			<xsl:call-template name="xmldocumentContentPeeling">
-				<xsl:with-param name="collName" select="$collName"/>
-			</xsl:call-template>
-		</xsl:if>
-   
-   <xsl:if test="$bookswitch = 'off'">
-    <xsl:call-template name="documentHeading">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>
-  
-    <xsl:call-template name="documentArrows">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>         
-    <xsl:call-template name="documentContent">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>
-    <xsl:call-template name="documentArrows">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>   
-   </xsl:if>
-   <xsl:if test="$bookswitch = 'on'">
-			<xsl:call-template name="documentHeading">
-				<xsl:with-param name="collName" select="$collName"/>
-			</xsl:call-template>
-			<div id="bookdiv"></div>
-			<script type="text/javascript">
-				<xsl:text disable-output-escaping="yes">
-					var doc_url = document.URL; 
-					doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
-					doc_url += '&amp;book=flashxml';
-
-					// var src_image = "http://kia.cs.waikato.ac.nz:8080/greenstone3/sites/localsite/collect/gs2mgdemo/index/assoc/HASH49aa.dir/cover.jpg"
-					//var doc_url = "/greenstone3/library?a=d&amp;c=gs2mgdemo&amp;d=HASH49aab56062938fbe2ff7f1&amp;dt=hierarchy&amp;p.a=b&amp;p.s=ClassifierBrowse&amp;ed=1";
-
-					var flash_plug_html = ""
-					flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
-					flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
-					flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
-					flash_plug_html += '  width="100%"&gt;\n';
-					flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
-					flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
-					flash_plug_html += '?src_image=' + escape(img_cover);
-					flash_plug_html += '&amp;doc_url=' + escape(doc_url)
-					flash_plug_html += '" /&gt;\n';
-					flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
-					flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
-					flash_plug_html += '    &lt;EMBED align="middle" \n';
-					flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
-					flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
-					flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
-					flash_plug_html += '      quality="high" \n';
-					flash_plug_html += '      src="Book.swf';
-					flash_plug_html += '?src_image=' + escape(img_cover);
-					flash_plug_html += '&amp;doc_url=' + escape(doc_url);
-					flash_plug_html += '"\n'; 
-					flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
-					flash_plug_html += '&lt;/OBJECT&gt;\n';
-					var flash_div = document.getElementById("bookdiv");
-					flash_div.innerHTML = flash_plug_html;
-				</xsl:text>
-			</script>
-		</xsl:if>  
-       </xsl:otherwise>
+	<xsl:if test="$bookswitch = 'flashxml'">
+	  <xsl:call-template name="xmldocumentContentPeeling">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>
+	</xsl:if>
+	
+	<xsl:if test="$bookswitch = 'off'">
+	  <xsl:call-template name="documentHeading">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>
+	  
+	  <xsl:call-template name="documentArrows">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>         
+	  <xsl:call-template name="documentContent">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>
+	  <xsl:call-template name="documentArrows">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>   
+	</xsl:if>
+	<xsl:if test="$bookswitch = 'on'">
+	  <xsl:call-template name="documentHeading">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>
+	  <div id="bookdiv"></div>
+	  <script type="text/javascript">
+	    <xsl:text disable-output-escaping="yes">
+	      var doc_url = document.URL; 
+	      doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
+	      doc_url += '&amp;book=flashxml';
+
+	      var flash_plug_html = ""
+	      flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
+	      flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
+	      flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
+	      flash_plug_html += '  width="100%"&gt;\n';
+	      flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
+	      flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
+	      flash_plug_html += '?src_image=' + escape(img_cover);
+	      flash_plug_html += '&amp;doc_url=' + escape(doc_url)
+	      flash_plug_html += '" /&gt;\n';
+	      flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
+	      flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
+	      flash_plug_html += '    &lt;EMBED align="middle" \n';
+	      flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
+	      flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
+	      flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
+	      flash_plug_html += '      quality="high" \n';
+	      flash_plug_html += '      src="Book.swf';
+	      flash_plug_html += '?src_image=' + escape(img_cover);
+	      flash_plug_html += '&amp;doc_url=' + escape(doc_url);
+	      flash_plug_html += '"\n'; 
+	      flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
+	      flash_plug_html += '&lt;/OBJECT&gt;\n';
+	      var flash_div = document.getElementById("bookdiv");
+	      flash_div.innerHTML = flash_plug_html;
+	    </xsl:text>
+	  </script>
+	</xsl:if>  
+      </xsl:otherwise>
     </xsl:choose>
- </xsl:template>
+  </xsl:template>
 
   <xsl:template name="documentHeading">
@@ -197,62 +194,62 @@
     <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 id="documentheading">
-	  <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
-	  </xsl:call-template></a>
-	     <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
-  </div>
-  
- <div id="docheadwrapper">
-  <div id="documentinfo">
+    <div id="documentheading">
+      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
+	</xsl:call-template></a>
+      <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
+    </div>
     
-  <xsl:choose>
-    <xsl:when test="$bookswitch = 'on'">
-    	<xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
-         <div id="headingimage">
-          <xsl:call-template name="coverImage"/> 
-         </div>
-        </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-    	<xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
-       	  <div id="headingimage">
-             <xsl:call-template name="coverImage"/> 
-          </div>
-        </xsl:if>
-     
-        <ul id="docbuttons" >
-         <xsl:call-template name="documentButtons">
-	   <xsl:with-param name="collName" select="$collName"/>
-         </xsl:call-template>
-       </ul>
-     </xsl:otherwise>
-  </xsl:choose>     
-  </div>
-    <!--<div><xsl:call-template name="enrichServices">
-	   <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template></div>-->
-   <xsl:if test="$bookswitch = 'off'">
-    <xsl:if test="string($doTOC) != 'false'">
-       <div id="toc">
-	 <xsl:call-template name="TOC">
-	   <xsl:with-param name="collName" select="$collName"/>
-	 </xsl:call-template>
+    <div id="docheadwrapper">
+      <div id="documentinfo">
+	
+	<xsl:choose>
+	  <xsl:when test="$bookswitch = 'on'">
+	    <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
+	      <div id="headingimage">
+		<xsl:call-template name="coverImage"/> 
+	      </div>
+	    </xsl:if>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
+	      <div id="headingimage">
+		<xsl:call-template name="coverImage"/> 
+	      </div>
+	    </xsl:if>
+	    
+	    <ul id="docbuttons" >
+	      <xsl:call-template name="documentButtons">
+		<xsl:with-param name="collName" select="$collName"/>
+	      </xsl:call-template>
+	    </ul>
+	  </xsl:otherwise>
+	</xsl:choose>     
       </div>
-    </xsl:if>
-  </xsl:if>  
- </div>
- </xsl:template>
+      <!--<div><xsl:call-template name="enrichServices">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template></div>-->
+      <xsl:if test="$bookswitch = 'off'">
+	<xsl:if test="string($doTOC) != 'false'">
+	  <div id="toc">
+	    <xsl:call-template name="TOC">
+	      <xsl:with-param name="collName" select="$collName"/>
+	    </xsl:call-template>
+	  </div>
+	</xsl:if>
+      </xsl:if>  
+    </div>
+  </xsl:template>
 
   <xsl:template name="coverImage">
-  <xsl:choose>
-			<xsl:when test="$bookswitch = 'on'">
-				<script type="text/javascript">
-					<xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
-				</script>
-			</xsl:when>
-			<xsl:otherwise>
-    				<img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
-			</xsl:otherwise>
-		</xsl:choose>
+    <xsl:choose>
+      <xsl:when test="$bookswitch = 'on'">
+	<script type="text/javascript">
+	  <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
+	</script>
+      </xsl:when>
+      <xsl:otherwise>
+	<img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
@@ -264,45 +261,45 @@
     <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
     
-   
-      <!-- expand document -->
-   <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
-     <li>
+    
+    <!-- expand document -->
+    <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
+      <li>
         <xsl:choose><xsl:when test="string($ed)='1'">
-	      <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
-		  <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
-	      </a>
-	    </xsl:when>
-	    <xsl:otherwise>
-	  <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
-	     <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
-	  </a>
-	    </xsl:otherwise>
-	  </xsl:choose>
-      	</li>
-      </xsl:if> 
-      
-      <!-- expand contents -->
-      <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
+	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
+	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
+	    </a>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
+	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
+	    </a>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </li>
+    </xsl:if> 
+    
+    <!-- expand contents -->
+    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
       <li>
-          <xsl:choose><xsl:when test="string($ec)='1'">
-	      <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
-		<xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
-		 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
-	      </a>
-	    </xsl:otherwise>
-	  </xsl:choose>
-	 </li>
-      </xsl:if>
-
-      <!-- detach page -->
-      <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
-       <li>
-	  <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
-	    <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
-	  </a></li>
-      </xsl:template>
+	<xsl:choose><xsl:when test="string($ec)='1'">
+	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
+	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
+	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
+	    </a>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </li>
+    </xsl:if>
+
+    <!-- detach page -->
+    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
+    <li>
+      <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
+	<xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
+      </a></li>
+  </xsl:template>
 
   <xsl:template name="TOC">
@@ -321,5 +318,5 @@
     </xsl:choose>
   </xsl:template>
-    
+  
   <xsl:template name="hierarchicalContents">
     <xsl:param name="collName"/>
@@ -335,15 +332,15 @@
       <ul id="tocnodes">
 	<li>
-	    <xsl:choose><xsl:when test="string($oc)='0'">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
-	      </xsl:when>
-	      <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
-	<xsl:if test="string($oc)!='0'">
-           <ul class="tocnode">
-	    <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: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>
+	  <xsl:choose><xsl:when test="string($oc)='0'">
+	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
+	    </xsl:when>
+	    <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
+	  <xsl:if test="string($oc)!='0'">
+	    <ul class="tocnode">
+	      <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: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>
             </ul>
-	   </xsl:if>
+	  </xsl:if>
         </li> 
       </ul>
@@ -360,28 +357,28 @@
     <xsl:param name="p.c"/>
     <!-- Display the appropriate image, depending on the node type -->
-     <li>
-	<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>
+    <li>
+      <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>
       
       <!-- Display associated title, bolded if the node has content -->
-	<xsl:choose>
-          <xsl:when test="nodeContent">
-	    <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-    <!-- Apply recursively to the children of this node -->
-    <xsl:if test="documentNode[@nodeID]">
-       <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
-	      <xsl:with-param name="collName" select="$collName"/>
-	      <xsl:with-param name="ec" select="$ec"/>
-	      <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>
-       </ul>
-     </xsl:if>
+      <xsl:choose>
+	<xsl:when test="nodeContent">
+	  <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
+	</xsl:otherwise>
+      </xsl:choose>
+      <!-- Apply recursively to the children of this node -->
+      <xsl:if test="documentNode[@nodeID]">
+	<ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
+	    <xsl:with-param name="collName" select="$collName"/>
+	    <xsl:with-param name="ec" select="$ec"/>
+	    <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>
+	</ul>
+      </xsl:if>
     </li>
   </xsl:template>
@@ -389,12 +386,12 @@
   <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
   <xsl:template name="documentContent">
-   <div class="documenttext"> 
-    <xsl:choose>
-      <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
-      <xsl:otherwise>
-	<xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
+    <div class="documenttext"> 
+      <xsl:choose>
+	<xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
+	<xsl:otherwise>
+	  <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
+	</xsl:otherwise>
+      </xsl:choose>
+    </div>
   </xsl:template>
   
@@ -414,5 +411,5 @@
       <xsl:choose>
 	<xsl:when test="not(name())">
-		<xsl:value-of select="." disable-output-escaping="yes"/>
+	  <xsl:value-of select="." disable-output-escaping="yes"/>
 	</xsl:when>
 	<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
@@ -422,49 +419,49 @@
   
   <xsl:template name="xmldocumentContentPeeling">
-		<xsl:choose>
-			<xsl:when test="@docType='simple'">
-				<xsl:apply-templates select="nodeContent"/>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:call-template name="xmlpeelingContents" />
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
+    <xsl:choose>
+      <xsl:when test="@docType='simple'">
+	<xsl:apply-templates select="nodeContent"/>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:call-template name="xmlpeelingContents" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
   <xsl:template name="xmlpeelingContents">
-		<xsl:if test="documentNode">
-			<xsl:apply-templates select="documentNode" mode="xmlpeeling" />
-		</xsl:if>
-	</xsl:template>
-
-	<xsl:template match="documentNode" mode="xmlpeeling">
-		<!-- get title -->
-		<xsl:choose>
-			<xsl:when test="nodeContent">
-				<xsl:text disable-output-escaping="yes">
-					&lt;Section&gt;
-					&lt;Description&gt;
-					&lt;Metadata name="Title"&gt;
-				</xsl:text>
-				<xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
-				<xsl:text disable-output-escaping="yes">
-					&lt;/Metadata&gt;
-					&lt;/Description&gt;
-				</xsl:text>
-				<xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
-				<xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
-			</xsl:when>
-		</xsl:choose>
-
-		<!-- recurse to the children -->
-		<xsl:if test="documentNode">
-			<xsl:apply-templates select="documentNode" mode="xmlpeeling" />
-		</xsl:if>
-
-		<!-- end the section -->
-		<xsl:text disable-output-escaping="yes">
-			&lt;/Section&gt;
-		</xsl:text>
-	</xsl:template>
+    <xsl:if test="documentNode">
+      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="documentNode" mode="xmlpeeling">
+    <!-- get title -->
+    <xsl:choose>
+      <xsl:when test="nodeContent">
+	<xsl:text disable-output-escaping="yes">
+	  &lt;Section&gt;
+	  &lt;Description&gt;
+	  &lt;Metadata name="Title"&gt;
+	</xsl:text>
+	<xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
+	<xsl:text disable-output-escaping="yes">
+	  &lt;/Metadata&gt;
+	  &lt;/Description&gt;
+	</xsl:text>
+	<xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
+	<xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+
+    <!-- recurse to the children -->
+    <xsl:if test="documentNode">
+      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
+    </xsl:if>
+
+    <!-- end the section -->
+    <xsl:text disable-output-escaping="yes">
+      &lt;/Section&gt;
+    </xsl:text>
+  </xsl:template>
   
   <!-- match any file nodes -->
@@ -495,5 +492,5 @@
     <xsl:variable name="serviceargs">
       <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
-  </xsl:variable>
+    </xsl:variable>
     <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
   </xsl:template>
@@ -596,14 +593,14 @@
     
     <div class="documentarrows">
-    <xsl:if test="not(string($ed)='1')">
-       <xsl:call-template name="documentArrow">
-        <xsl:with-param name="collName" select="$collName"/>
-       <xsl:with-param name="direction">back</xsl:with-param>
-     </xsl:call-template>
-    <xsl:call-template name="documentArrow">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="direction">forward</xsl:with-param>
-    </xsl:call-template>
-    </xsl:if>
+      <xsl:if test="not(string($ed)='1')">
+	<xsl:call-template name="documentArrow">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="direction">back</xsl:with-param>
+	</xsl:call-template>
+	<xsl:call-template name="documentArrow">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="direction">forward</xsl:with-param>
+	</xsl:call-template>
+      </xsl:if>
     </div>
     
@@ -615,11 +612,11 @@
     <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
     <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>  
-    <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="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
+      <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="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     </xsl:if> 
   </xsl:template>
 
   <xsl:template name="externalPage">
-     <xsl:param name="external"/>
-     <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
+    <xsl:param name="external"/>
+    <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
     <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
     <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
Index: greenstone3/trunk/web/interfaces/default/transform/gli4gs3.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/gli4gs3.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/gli4gs3.xsl	(revision 18316)
@@ -12,22 +12,22 @@
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
@@ -41,7 +41,7 @@
   <xsl:template match="pageResponse">
     <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-     <xsl:call-template name="standardPageBanner">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>
     
     <xsl:call-template name="navigationBar">
Index: greenstone3/trunk/web/interfaces/default/transform/help.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/help.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/help.xsl	(revision 18316)
@@ -7,27 +7,27 @@
   exclude-result-prefixes="java util">
   
-   <!-- style includes global params interface_name, library_name -->
+  <!-- style includes global params interface_name, library_name -->
   <xsl:include href="style.xsl"/>
 
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
   
@@ -52,4 +52,4 @@
     some help text goes here
   </xsl:template>
- 
+  
 </xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/default/transform/home.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/home.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/home.xsl	(revision 18316)
@@ -12,22 +12,22 @@
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
@@ -49,44 +49,44 @@
   <xsl:template name="pageBanner">
     <div id="banner">
-        <p>
-            <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
-            </img>
-	</p>
+      <p>
+	<img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
+	</img>
+      </p>
     </div>
     <div id="content">
-	<xsl:call-template name="dividerBar">
-            <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 
-        </xsl:call-template>	
-      </div>
+      <xsl:call-template name="dividerBar">
+	<xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 
+      </xsl:call-template>	
+    </div>
   </xsl:template>
 
   <xsl:template match="collectionList">
-   <ul id="collectionlist">
-    <xsl:for-each select="collection"> 
-      <li>
-      
-           <xsl:choose>
-              <xsl:when test="displayItem[@name='icon']">
+    <ul id="collectionlist">
+      <xsl:for-each select="collection"> 
+	<li>
+	  
+	  <xsl:choose>
+	    <xsl:when test="displayItem[@name='icon']">
               <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
                 <img>
-	           <xsl:attribute name="src">
-	             <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
-	           </xsl:attribute>
-	           <xsl:attribute name="alt">
-	                <xsl:value-of select="displayItem[@name='name']"/>
-	           </xsl:attribute>
-	         </img> 
-               </a>  
-	      </xsl:when>
-              <xsl:otherwise>
-               <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">  
-                 <xsl:value-of select="displayItem[@name='name']"/>
-               </a>
-              </xsl:otherwise>
-           </xsl:choose>         
-	 
-       </li>
-    </xsl:for-each> 
-   </ul>
+		  <xsl:attribute name="src">
+		    <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
+		  </xsl:attribute>
+		  <xsl:attribute name="alt">
+		    <xsl:value-of select="displayItem[@name='name']"/>
+		  </xsl:attribute>
+		</img> 
+	      </a>  
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">  
+		<xsl:value-of select="displayItem[@name='name']"/>
+	      </a>
+	    </xsl:otherwise>
+	  </xsl:choose>         
+	  
+	</li>
+      </xsl:for-each> 
+    </ul>
   </xsl:template> 
   
@@ -113,14 +113,14 @@
     <xsl:call-template name="dividerBar"/>
     <ul id="servicelist">
-    <xsl:for-each select="service[@type='query']">
-      <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
+      <xsl:for-each select="service[@type='query']">
+	<li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
       </xsl:for-each>
       <!--uncomment to display an authentication link-->
-       <!--<xsl:for-each select="service[@type='authen']">
+      <!--<xsl:for-each select="service[@type='authen']">
       <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>      </xsl:for-each>-->
       <!--uncomment to display a library interface link-->
       <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
     </ul>
-    </xsl:template>
+  </xsl:template>
 </xsl:stylesheet>  
 
Index: greenstone3/trunk/web/interfaces/default/transform/nav.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/nav.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/nav.xsl	(revision 18316)
@@ -7,5 +7,5 @@
   exclude-result-prefixes="java util">
   
-   <!-- style includes global params interface_name, library_name -->
+  <!-- style includes global params interface_name, library_name -->
   <xsl:include href="style.xsl"/>
 
@@ -34,8 +34,8 @@
     <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     <div align="right">
-    <xsl:call-template name="top-buttons">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>
-      </div>
+      <xsl:call-template name="top-buttons">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:call-template>
+    </div>
     <xsl:call-template name="navigationBar">
       <xsl:with-param name="collName" select="$collName"/>
Index: greenstone3/trunk/web/interfaces/default/transform/pref.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/pref.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/pref.xsl	(revision 18316)
@@ -7,27 +7,27 @@
   exclude-result-prefixes="java util">
   
-   <!-- style includes global params interface_name, library_name -->
+  <!-- style includes global params interface_name, library_name -->
   <xsl:include href="style.xsl"/>
 
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
   
@@ -43,6 +43,6 @@
     <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     
-   <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
-      
+    <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
+    
     <xsl:call-template name="standardPageBanner">
       <xsl:with-param name="collName" select="$collName"/>
@@ -54,28 +54,28 @@
     </xsl:call-template>      
     <div id="qureyform">
-    <form name="PrefForm" method="get" action="{$library_name}">
-      <input type='hidden' name='a' value='p'/>
-      <input type='hidden' name='sa' value='pref'/>
-      <input type='hidden' name='c' value="{$collName}"/>
-      <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div>
-      <ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul>
-      <ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul>
-      
-      <xsl:if test="$tidyoption='tidy'">
-      	<ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul>
-      </xsl:if>
-      
-      <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div>
-      <ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul>
-      <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
-       </form>
-   </div>
+      <form name="PrefForm" method="get" action="{$library_name}">
+	<input type='hidden' name='a' value='p'/>
+	<input type='hidden' name='sa' value='pref'/>
+	<input type='hidden' name='c' value="{$collName}"/>
+	<div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div>
+	<ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul>
+	<ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul>
+	
+	<xsl:if test="$tidyoption='tidy'">
+	  <ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul>
+	</xsl:if>
+	
+	<div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div>
+	<ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul>
+	<input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
+      </form>
+    </div>
   </xsl:template>
   
   <xsl:template name="pres-prefs">
-     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li>
-      <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li>
-    </xsl:template>
- 
+    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li>
+    <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li>
+  </xsl:template>
+  
   <xsl:template name="lang-list">
     <xsl:variable name="current" select="/page/@lang"/>
@@ -90,16 +90,16 @@
     <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 
     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 
-          <select name="hitsPerPage">
-	    <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 
-	    <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
-	    <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
-	    <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
-	  </select>
+      <select name="hitsPerPage">
+	<option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 
+	<option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
+	<option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
+	<option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
+      </select>
     </li>
   </xsl:template>
 
- <xsl:template name="berrybasket-prefs">
-      <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
-     
+  <xsl:template name="berrybasket-prefs">
+    <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+    
     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/> <select name="berrybasket">
         <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
@@ -109,11 +109,11 @@
   </xsl:template>
 
-<xsl:template name="book-prefs">
-      <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
-      
+  <xsl:template name="book-prefs">
+    <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+    
     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book">
-        <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
-	<option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
-      </select>
+      <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
+      <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
+    </select>
     
   </xsl:template>
Index: greenstone3/trunk/web/interfaces/default/transform/process.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/process.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/process.xsl	(revision 18316)
@@ -13,22 +13,22 @@
   <xsl:output method="html"/>  
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
Index: greenstone3/trunk/web/interfaces/default/transform/query.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/query.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/query.xsl	(revision 18316)
@@ -15,25 +15,25 @@
   <xsl:output method="html"/>
   
-    <!-- the main page layout template is here -->
+  <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
 
-   <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 
+  <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 
 
   <xsl:template name="pageTitle">
@@ -43,5 +43,4 @@
   <!-- page specific style goes here -->
   <xsl:template name="pageStyle">     	
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
     <xsl:if test="$berrybasketswitch = 'on'">
       <xsl:call-template name="berryStyleSheet"/>
@@ -61,20 +60,19 @@
     </xsl:call-template> 
     <div id="content">
-    <xsl:apply-templates select="service">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:apply-templates>
-   
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
-    <xsl:if test="$berrybasketswitch = 'on'">
-      <xsl:call-template name="berrybasket"/>
-    </xsl:if>
+      <xsl:apply-templates select="service">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:apply-templates>
+      
+      <xsl:if test="$berrybasketswitch = 'on'">
+	<xsl:call-template name="berrybasket"/>
+      </xsl:if>
       <xsl:if test="contains($requesttype, 'r')">
-      <xsl:call-template name="query-response">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
+	<xsl:call-template name="query-response">
+	  <xsl:with-param name="collName" select="$collName"/>
+	</xsl:call-template>
       </xsl:if>
       
     </div>
-   </xsl:template>
+  </xsl:template>
 
 
@@ -90,16 +88,14 @@
     <xsl:if test="documentNodeList">
 
-     <!-- next and prev links at top of results-->
-   
+      <!-- next and prev links at top of results-->     
       <xsl:call-template name="resultNavigation">
 	<xsl:with-param name="collName" select="$collName"/>
       </xsl:call-template>
-   
-      <!-- Display the matching documents -->  
       
+      <!-- Display the matching documents -->        
       <xsl:call-template name="resultList">
 	<xsl:with-param name="collName" select="$collName"/>
       </xsl:call-template>
-    
+      
       <!-- next and prev links at bottom of page -->
       <xsl:call-template name="resultNavigation">
@@ -114,19 +110,19 @@
     <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
     <div id="queryform">
-    <form name="QueryForm" method="get" action="{$library_name}">
-      <input type="hidden" name="a" value="q"/>
-      <input type="hidden" name="sa" value="{$subaction}"/>
-      <input type="hidden" name="rt" value="rd"/>
-      <input type="hidden" name="s" value="{@name}"/>
-      <input type="hidden" name="c" value="{$collName}"/>
-      <xsl:if test="not(paramList/param[@name='startPage'])">
-	<input type="hidden" name="startPage" value="1"/>
-      </xsl:if>
-      <xsl:apply-templates select="paramList"/>
-      <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
-    </form>
+      <form name="QueryForm" method="get" action="{$library_name}">
+	<input type="hidden" name="a" value="q"/>
+	<input type="hidden" name="sa" value="{$subaction}"/>
+	<input type="hidden" name="rt" value="rd"/>
+	<input type="hidden" name="s" value="{@name}"/>
+	<input type="hidden" name="c" value="{$collName}"/>
+	<xsl:if test="not(paramList/param[@name='startPage'])">
+	  <input type="hidden" name="startPage" value="1"/>
+	</xsl:if>
+	<xsl:apply-templates select="paramList"/>
+	<input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
+      </form>
     </div>
   </xsl:template>
-   
+  
 </xsl:stylesheet>  
 
Index: greenstone3/trunk/web/interfaces/default/transform/querytools.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/querytools.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/querytools.xsl	(revision 18316)
@@ -10,101 +10,101 @@
   <xsl:template name="resultNavigation">
     <xsl:param name="collName"/>
-   <div class="resultnavigation">  
-  <!-- hits type -->
-    <xsl:variable name='ht'>
-      <xsl:choose>
-	<xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when>
-	<xsl:otherwise>i</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    
-    <xsl:variable name="param-list" select="/page/pageRequest/paramList"/>
-    <!-- hits per page -->
-    <xsl:variable name="hpp">
-      <xsl:choose>
-	<xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when>
-	<xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when>
-	<xsl:otherwise>20</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata -->
-    <xsl:variable name="td">
-      <xsl:choose>
-	<xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']">
-	  <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/>
-	</xsl:when>
-	<xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']">
-	  <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/>
-	</xsl:when>
-	<xsl:otherwise> <!-- this is just a fall back - shoudl always have the metadata -->
-	  <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/>
-	</xsl:otherwise>	
-      </xsl:choose>
-    </xsl:variable>
-
-    <!-- only continue if hpp != -1 and td > hpp -->
-    <xsl:if test="not($hpp=-1) and $td &gt; $hpp">
-      <!-- start page -->
-      <xsl:variable name="here">
+    <div class="resultnavigation">  
+      <!-- hits type -->
+      <xsl:variable name='ht'>
 	<xsl:choose>
-	  <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when>
-	  <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when>
-	  <xsl:otherwise>1</xsl:otherwise>
+	  <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when>
+	  <xsl:otherwise>i</xsl:otherwise>
 	</xsl:choose>
       </xsl:variable>
-      <xsl:variable name="sa" select="/page/pageRequest/@subaction"/>
-      <xsl:variable name="service" select="$param-list/param[@name='s']/@value"/>
-      <xsl:variable name="prev" select="$here - 1"/>
-      <xsl:variable name="next" select="$here + 1"/>
-      <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
-     
-      <div>   
+      
+      <xsl:variable name="param-list" select="/page/pageRequest/paramList"/>
+      <!-- hits per page -->
+      <xsl:variable name="hpp">
+	<xsl:choose>
+	  <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when>
+	  <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when>
+	  <xsl:otherwise>20</xsl:otherwise>
+	</xsl:choose>
+      </xsl:variable>
+      <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata -->
+      <xsl:variable name="td">
+	<xsl:choose>
+	  <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']">
+	    <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/>
+	  </xsl:when>
+	  <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']">
+	    <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/>
+	  </xsl:when>
+	  <xsl:otherwise> <!-- this is just a fall back - should always have the metadata -->
+	    <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/>
+	  </xsl:otherwise>	
+	</xsl:choose>
+      </xsl:variable>
+
+      <!-- only continue if hpp != -1 and td > hpp -->
+      <xsl:if test="not($hpp=-1) and $td &gt; $hpp">
+	<!-- start page -->
+	<xsl:variable name="here">
+	  <xsl:choose>
+	    <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when>
+	    <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when>
+	    <xsl:otherwise>1</xsl:otherwise>
+	  </xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="sa" select="/page/pageRequest/@subaction"/>
+	<xsl:variable name="service" select="$param-list/param[@name='s']/@value"/>
+	<xsl:variable name="prev" select="$here - 1"/>
+	<xsl:variable name="next" select="$here + 1"/>
+	<xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
+	
+	<div>   
 	  <div>
-	     <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
-	   
-	   
-	      <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
-		<xsl:variable name='m' select="number($next * $hpp)"/>
-		<xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
-		<a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
+	    <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
+	    
+	    
+	    <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
+	      <xsl:variable name='m' select="number($next * $hpp)"/>
+	      <xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
+	      <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
 	</div>
-     </xsl:if>
-   </div>
+      </xsl:if>
+    </div>
   </xsl:template>
-    
+  
   <xsl:template name="matchDocs">
     <!-- If the number of matching documents is known, display it -->
     <div id="matchdocs">
-    <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
-    <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
-    <xsl:choose>
-      <xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>
-      </xsl:when>
-      <xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>
-      </xsl:when>
-      <xsl:when test="$numDocsMatched">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>
-	<xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>
-      </xsl:when>
-      <xsl:when test="$numDocsReturned">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>
-      </xsl:when>
-    </xsl:choose>
-   </div>
+      <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
+      <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
+      <xsl:choose>
+	<xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>
+	</xsl:when>
+	<xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>
+	</xsl:when>
+	<xsl:when test="$numDocsMatched">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>
+	  <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>
+	</xsl:when>
+	<xsl:when test="$numDocsReturned">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>
+	</xsl:when>
+      </xsl:choose>
+    </div>
   </xsl:template>
 
   <!-- paging is now done by the query action, so here we just print out all the docs that we have -->
   <xsl:template name="resultList">
-     <xsl:param name="collName"/>
+    <xsl:param name="collName"/>
     <ul id="resultlist"> 
-     <xsl:for-each select="documentNodeList/documentNode">
+      <xsl:for-each select="documentNodeList/documentNode">
 	<li><table>
-	  <xsl:call-template name="documentNodeWrapper">
-	    <xsl:with-param name="collName" select="$collName"/>
-	    <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>
-	  </xsl:call-template>
-            </table>
+	    <xsl:call-template name="documentNodeWrapper">
+	      <xsl:with-param name="collName" select="$collName"/>
+	      <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>
+	    </xsl:call-template>
+	  </table>
 	</li>	    
       </xsl:for-each>  
@@ -118,5 +118,5 @@
     <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
     <!--<xsl:if test="$berryBaskets = 'true'">-->
-      <xsl:if test="$berrybasketswitch = 'on'">
+    <xsl:if test="$berrybasketswitch = 'on'">
       <xsl:call-template name="addBerry">
 	<xsl:with-param name="collName" select="$collName"/>
@@ -135,20 +135,20 @@
     <xsl:param name="collName"/>
     <xsl:param name="serviceName"/>
-     <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="@nodeType='leaf'">&amp;sib=1</xsl:if>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
-	<xsl:apply-templates select="." mode="displayNodeIcon"/>
-      </a>
+    <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="@nodeType='leaf'">&amp;sib=1</xsl:if>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
+      <xsl:apply-templates select="." mode="displayNodeIcon"/>
+    </a>
     <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
   </xsl:template>
 
   <xsl:template name="termInfo">
-   <div class="terminfo">
-    <xsl:if test="count(termList/term) > 0">
-     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
+    <div class="terminfo">
+      <xsl:if test="count(termList/term) > 0">
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
 	<xsl:for-each select="termList/term">
 	  <xsl:if test="position() > 1">, </xsl:if>
 	  <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/> 
 	</xsl:for-each>
-    </xsl:if>
-  </div>
+      </xsl:if>
+    </div>
   </xsl:template>
 
Index: greenstone3/trunk/web/interfaces/default/transform/service-params.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/service-params.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/service-params.xsl	(revision 18316)
@@ -5,5 +5,5 @@
   extension-element-prefixes="java">
 
-<!-- handling of the different types of params on a service form 
+  <!-- handling of the different types of params on a service form 
   - these now only output the selection box/text box etc, not the name -->
 
@@ -19,5 +19,5 @@
 	  <xsl:otherwise>
 	    <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
-	      <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
+	    <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
 	  </xsl:otherwise>
 	</xsl:choose>
@@ -25,5 +25,5 @@
     </ul>
   </xsl:template>
- 
+  
   <!-- puts all the params into a=p&p=h type form - need to change this if use 
   multi params  -->
@@ -111,5 +111,5 @@
     </select>
   </xsl:template>
- 
+  
   <!-- string params -->
   <xsl:template match="param[@type='string']">
@@ -131,11 +131,11 @@
     <xsl:variable name="parent" select="@name"/>
     <table>
-        <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
+      <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
       	<xsl:for-each select="param">
-	    <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
+	  <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
 	</xsl:for-each>
-        </tr>
+      </tr>
       
-        <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
+      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
     </table>
   </xsl:template>
@@ -170,19 +170,19 @@
   <!--
   <xsl:template match="paramList">
-  <p/><table width="537">
-  <xsl:choose>
-  <xsl:when test='count(param)>4'>
-  <xsl:for-each select="param[position() mod 2 = 1]"> 
-  <tr><xsl:apply-templates select="."/>
-  <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
-</xsl:for-each>
-</xsl:when>
-  <xsl:otherwise>
-  <xsl:for-each select="param">
-  <tr><xsl:apply-templates select='.'/></tr>
-</xsl:for-each>
-</xsl:otherwise>
-</xsl:choose>
-</table>
-</xsl:template>
+    <p/><table width="537">
+      <xsl:choose>
+        <xsl:when test='count(param)>4'>
+          <xsl:for-each select="param[position() mod 2 = 1]"> 
+            <tr><xsl:apply-templates select="."/>
+              <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
+          </xsl:for-each>
+        </xsl:when>
+	<xsl:otherwise>
+	  <xsl:for-each select="param">
+	    <tr><xsl:apply-templates select='.'/></tr>
+	  </xsl:for-each>
+	</xsl:otherwise>
+      </xsl:choose>
+    </table>
+  </xsl:template>
   -->
Index: greenstone3/trunk/web/interfaces/default/transform/style.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/style.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/style.xsl	(revision 18316)
@@ -10,51 +10,48 @@
   <xsl:param name="interface_name"/>
   <xsl:param name="library_name"/>
-   <!-- global style info goes here  -->
+  <!-- global style info goes here  -->
   <xsl:template name="globalStyle">
     <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
   </xsl:template>
   
-
-
- <xsl:template name="response">
-	  <xsl:apply-templates select="pageResponse"/>
-		  <xsl:if test="descendant::error">
-		    <script language="Javascript">
-		      <xsl:text disable-output-escaping="yes">
-			function removeAllChildren(node) {
-			 while (node.hasChildNodes()) {
-			  node.removeChild(node.firstChild);
-			 }
-			}
-
-		      function toggleHideError(obj) {
-		      if (obj.style.display == "none") {
-			obj.style.display = "";
-			hide_link = document.getElementById("hide");
-			removeAllChildren(hide_link);
-			hide_link.appendChild(document.createTextNode("Hide Error"));
-		      } else {
-			obj.style.display = "none";
-			hide_link = document.getElementById("hide");
-			removeAllChildren(hide_link);
-			hide_link.appendChild(document.createTextNode("Show Error"));
-			
-			}
-		      }
-		      </xsl:text>
-		    </script>
-		    <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p>
-		    <div id="error" style="display: none;">
-		      <xsl:apply-templates select="descendant::error"/>
-		    </div>
-		  </xsl:if>
- </xsl:template>
+  <xsl:template name="response">
+    <xsl:apply-templates select="pageResponse"/>
+    <xsl:if test="descendant::error">
+      <script language="Javascript">
+	<xsl:text disable-output-escaping="yes">
+	  function removeAllChildren(node) {
+	    while (node.hasChildNodes()) {
+	      node.removeChild(node.firstChild);
+	    }
+	  }
+
+	  function toggleHideError(obj) {
+	    if (obj.style.display == "none") {
+	      obj.style.display = "";
+	      hide_link = document.getElementById("hide");
+	      removeAllChildren(hide_link);
+	      hide_link.appendChild(document.createTextNode("Hide Error"));
+	    } else {
+	      obj.style.display = "none";
+	      hide_link = document.getElementById("hide");
+	      removeAllChildren(hide_link);
+	      hide_link.appendChild(document.createTextNode("Show Error"));
+	    } 
+	  }
+	</xsl:text>
+      </script>
+      <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p>
+      <div id="error" style="display: none;">
+	<xsl:apply-templates select="descendant::error"/>
+      </div>
+    </xsl:if>
+  </xsl:template>
 
   <xsl:template name="greenstoneFooter">
-      <div id="footer">
-         <xsl:call-template name="dividerBar">
-            <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 
-        </xsl:call-template>
-      </div>
+    <div id="footer">
+      <xsl:call-template name="dividerBar">
+	<xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 
+      </xsl:call-template>
+    </div>
   </xsl:template>
   
@@ -68,61 +65,61 @@
     <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
     <div  id="banner">    
-     <p>
-	  <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
-	    <xsl:choose>
-	      <xsl:when test="$this-element/displayItem[@name='icon']">
-		<img border="0">
-		  <xsl:attribute name="src">
-		    <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
-		  </xsl:attribute>	
-		  <xsl:attribute name="alt">
-		    <xsl:value-of select="$this-element/displayItem[@name='name']"/>
-		  </xsl:attribute>
-		  <xsl:attribute name="title">
-		    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
-		  </xsl:attribute>
-		</img>
-	      </xsl:when>
-	      <xsl:otherwise>
-		<xsl:value-of select="$this-element/displayItem[@name='name']"/>
-	      </xsl:otherwise>
-	    </xsl:choose>
-	  </a>
-	</p>
-        <ul id="bannerlist"> 
-	  <xsl:call-template name="top-buttons">
-	    <xsl:with-param name="collName" select="$collName"/>
-	    <xsl:with-param name="pageType" select="$pageType"/>
-	  </xsl:call-template>
-       </ul>
+      <p>
+	<a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
+	  <xsl:choose>
+	    <xsl:when test="$this-element/displayItem[@name='icon']">
+	      <img border="0">
+		<xsl:attribute name="src">
+		  <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
+		</xsl:attribute>	
+		<xsl:attribute name="alt">
+		  <xsl:value-of select="$this-element/displayItem[@name='name']"/>
+		</xsl:attribute>
+		<xsl:attribute name="title">
+		  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
+		</xsl:attribute>
+	      </img>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:value-of select="$this-element/displayItem[@name='name']"/>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</a>
+      </p>
+      <ul id="bannerlist"> 
+	<xsl:call-template name="top-buttons">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="pageType" select="$pageType"/>
+	</xsl:call-template>
+      </ul>
     </div>
-   </xsl:template>
+  </xsl:template>
   
   <xsl:template name="top-buttons">
     <xsl:param name="collName"/>
     <xsl:param name="pageType"/>
-    	 <li><a  href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
-	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
+    <li><a  href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
+      </a></li>
+    <xsl:choose>
+      <xsl:when test="$pageType='help'">
+	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
+      </xsl:when>
+      <xsl:otherwise>
+	<li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
+	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
 	  </a></li>
-	<xsl:choose>
-	  <xsl:when test="$pageType='help'">
-	      <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
-		<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
-	      </a></li>
-	    </xsl:otherwise>
-	</xsl:choose>
-	<xsl:choose>
-	  <xsl:when test="$pageType='pref'">
-	     <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
-	   </xsl:when>
-	  <xsl:otherwise>
-	    <li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
-		<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
-	      </a></li>
-	    </xsl:otherwise>
-	</xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="$pageType='pref'">
+	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
+      </xsl:when>
+      <xsl:otherwise>
+	<li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
+	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
+	  </a></li>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
@@ -132,7 +129,7 @@
     <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
     <xsl:choose>
-    <xsl:when test="$this-element/serviceList/service">
-    <div id="navbar">
-        <ul id="navbarlist">
+      <xsl:when test="$this-element/serviceList/service">
+	<div id="navbar">
+	  <ul id="navbarlist">
 	    <xsl:for-each select="$this-element/serviceList/service">
 	      <xsl:variable name="action"><xsl:choose>
@@ -153,10 +150,10 @@
 	      </xsl:choose>
 	    </xsl:for-each>
-           </ul>
-	 </div> 
+	  </ul>
+	</div> 
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="dividerBar">
-            <xsl:with-param name="text" select="'&#160;'"/> 
+	  <xsl:with-param name="text" select="'&#160;'"/> 
         </xsl:call-template>            
       </xsl:otherwise>
@@ -166,11 +163,11 @@
   
   <xsl:template name="dividerBar">
-   <xsl:param name='text'/>
-      <xsl:choose>
+    <xsl:param name='text'/>
+    <xsl:choose>
       <xsl:when test="$text">
-	 <div class="divbar"><xsl:value-of select="$text"/></div>
-      </xsl:when>
-      <xsl:otherwise>
-	 <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
+	<div class="divbar"><xsl:value-of select="$text"/></div>
+      </xsl:when>
+      <xsl:otherwise>
+	<div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
       </xsl:otherwise>
     </xsl:choose> 
@@ -179,5 +176,5 @@
   <!-- Display the appropriate image, depending on the node type -->
   <xsl:template match="documentNode" mode="displayNodeIcon">
-      
+    
     <!-- Root node: book icon (open or closed) -->
     <xsl:choose>
Index: greenstone3/trunk/web/interfaces/default/transform/system.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/default/transform/system.xsl	(revision 18315)
+++ greenstone3/trunk/web/interfaces/default/transform/system.xsl	(revision 18316)
@@ -10,29 +10,29 @@
   <!-- the main page layout template is here -->
   <xsl:template match="page">
-        <html>
-    <head>
-      <title>
-	<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-          <body>
-           <div id="globalwrapper">
-   		  <xsl:call-template name="response" />
-		  <xsl:call-template name="greenstoneFooter"/>
-	   </div>
-          </body>
-        </html>
+    <html>
+      <head>
+	<title>
+	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
+	</title>
+	<xsl:call-template name="globalStyle"/>
+	<xsl:call-template name="pageStyle"/>
+      </head>
+      <body>
+	<div id="globalwrapper">
+	  <xsl:call-template name="response" />
+	  <xsl:call-template name="greenstoneFooter"/>
+	</div>
+      </body>
+    </html>
   </xsl:template>
   
-    <xsl:template name="pageTitle">
+  <xsl:template name="pageTitle">
     <xsl:value-of select="java:org.greenstone.gsdl3.util.XSLTUtil.getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
   </xsl:template>
-
+  
   <!-- page specific style goes here -->
   <xsl:template name="pageStyle"/>
-
+  
   <xsl:template match="pageResponse">
     <xsl:value-of select="status"/>
