Index: /greenstone3/trunk/web/interfaces/gs2/transform/about.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/about.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/about.xsl	(revision 18318)
@@ -14,20 +14,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -45,5 +45,5 @@
   <xsl:template match="pageResponse">
     <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
-      <xsl:apply-templates select="collection"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
+    <xsl:apply-templates select="collection"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
 
   </xsl:template>
@@ -59,16 +59,16 @@
     </xsl:call-template>
     <div class="document">
-    <xsl:if test="/page/pageRequest/paramList/param[@name='ct']/@value = 0">
-    <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
-      <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
-    <xsl:call-template name="dividerBar"/>
-    </xsl:if>
+      <xsl:if test="/page/pageRequest/paramList/param[@name='ct']/@value = 0">
+	<xsl:apply-templates select="serviceList/service[@name='TextQuery']">
+	  <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
+	<xsl:call-template name="dividerBar"/>
+      </xsl:if>
     </div>
     <div>
-    <xsl:if test="displayItem[@name='description']">
-    <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.aboutcoll')"/></h3>
-    <p><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/></p>
-    </xsl:if>
-    <xsl:apply-templates select="." mode="simplehelp"/>
+      <xsl:if test="displayItem[@name='description']">
+	<h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.aboutcoll')"/></h3>
+	<p><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/></p>
+      </xsl:if>
+      <xsl:apply-templates select="." mode="simplehelp"/>
     </div>	
   </xsl:template>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/applet.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/applet.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/applet.xsl	(revision 18318)
@@ -12,20 +12,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -48,10 +48,10 @@
       </xsl:call-template>
       <p/>
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-<!--      <xsl:call-template name="dividerBar">
-	<xsl:with-param name="text" select="service/displayItem[@name='name']"/>
-      </xsl:call-template>-->
+      <xsl:call-template name="navigationBar">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:call-template>      
+      <!--      <xsl:call-template name="dividerBar">
+      <xsl:with-param name="text" select="service/displayItem[@name='name']"/>
+    </xsl:call-template>-->
       <p/>
       <xsl:copy-of select="service/applet"/>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/authen.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/authen.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/authen.xsl	(revision 18318)
@@ -13,20 +13,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -40,5 +40,5 @@
   </xsl:template>
 
- <xsl:template name="pageStyle"/>
+  <xsl:template name="pageStyle"/>
 
   <xsl:template match="page">
@@ -67,5 +67,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>
@@ -75,5 +75,5 @@
 
 	  <div id="navbar">
-	     
+	    
 	    <ul id="navbarlist">
 	      <!--greenstone home-->
@@ -85,9 +85,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-->
@@ -102,5 +102,5 @@
 		</xsl:choose>
 	      </li>
-	     
+	      
 	      <!-- change password-->
 	      <li>
@@ -140,23 +140,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>
 
@@ -181,5 +181,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>
 
@@ -187,5 +187,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>
@@ -206,5 +206,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>
@@ -308,5 +308,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>
@@ -346,5 +346,5 @@
   </xsl:template>
   
- <!--template name="login"-->
+  <!--template name="login"-->
   <xsl:template name="login">
     <xsl:param name="sub_action"/>
@@ -376,12 +376,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%" >
@@ -394,21 +394,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">";
@@ -416,12 +416,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'/>
@@ -439,12 +439,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"/>
@@ -466,18 +466,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"/>
@@ -504,5 +504,5 @@
   </xsl:template>
   
-<!--template name="edituser"-->
+  <!--template name="edituser"-->
   <xsl:template name="edituser" >
     <xsl:param name="sub_action"/>
@@ -556,5 +556,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;
@@ -562,18 +562,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>
@@ -592,17 +592,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>
@@ -612,12 +612,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>
@@ -627,35 +627,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/gs2/transform/classifier.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/classifier.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/classifier.xsl	(revision 18318)
@@ -16,17 +16,17 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -53,19 +53,19 @@
       </xsl:choose>
     </xsl:variable>
-      <xsl:call-template name="standardPageBanner">
-	<xsl:with-param name="collName" select="$collName"/>
-	<xsl:with-param name="pageType">browse</xsl:with-param>
-	<xsl:with-param name="clTop" select="$clTop"/>
-      </xsl:call-template>
-      <xsl:call-template name="navigationBar">
-	<xsl:with-param name="collName" select="$collName"/>
-	<xsl:with-param name="clTop" select="$clTop"/>
-      </xsl:call-template>      
-      <div class="document">
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+      <xsl:with-param name="pageType">browse</xsl:with-param>
+      <xsl:with-param name="clTop" select="$clTop"/>
+    </xsl:call-template>
+    <xsl:call-template name="navigationBar">
+      <xsl:with-param name="collName" select="$collName"/>
+      <xsl:with-param name="clTop" select="$clTop"/>
+    </xsl:call-template>      
+    <div class="document">
       <xsl:apply-templates select="classifier">
 	<xsl:with-param name="collName" select="$collName"/>
 	<xsl:with-param name="serviceName" select="$serviceName"/>
       </xsl:apply-templates>
-      </div>
+    </div>
   </xsl:template>
   
Index: /greenstone3/trunk/web/interfaces/gs2/transform/document.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/document.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/document.xsl	(revision 18318)
@@ -13,25 +13,23 @@
   <xsl:output method="html"/>
   
-  
-
   <!-- the main page layout template is here -->
   <!-- override the one in style so we can display the doc over the whole page and get rid of the green bar down the side --> 
   <xsl:template match="page" priority='2'>
     <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>
         <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
         <div id="page">
-           <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>
 	</div>  
-       </body>
+      </body>
     </html>
   </xsl:template>
@@ -64,36 +62,36 @@
     </xsl:call-template>
     <div class="document">     
-    <!-- display the document -->
-    <xsl:apply-templates select="document">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:apply-templates>
-   </div>
-  </xsl:template>
+      <!-- display the document -->
+      <xsl:apply-templates select="document">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:apply-templates>
+    </div>
+  </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:choose><xsl:when test="$external != ''">
+	<xsl:call-template name="externalPage">
+	  <xsl:with-param name="external" select="$external"/>
+	</xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
 	
-  <xsl:template match="document">
-    <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:when>
-	  <xsl:otherwise>
-	    
 	<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> 
-    <br/>
+	  <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> 
+	<br/>
       </xsl:otherwise></xsl:choose>
   </xsl:template>
@@ -107,16 +105,16 @@
     
     <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" select="$firstDir"/>
-        <xsl:with-param name="pageDir" select="$dir"/>
-     </xsl:call-template>
-    <xsl:call-template name="documentArrow">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="direction" select="$secondDir"/>
-      <xsl:with-param name="pageDir" select="$dir"/>
-    </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" select="$firstDir"/>
+	  <xsl:with-param name="pageDir" select="$dir"/>
+	</xsl:call-template>
+	<xsl:call-template name="documentArrow">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="direction" select="$secondDir"/>
+	  <xsl:with-param name="pageDir" select="$dir"/>
+	</xsl:call-template>
+      </xsl:if>
     </div>    
   </xsl:template>
@@ -126,20 +124,20 @@
     <xsl:param name="direction"/>
     <xsl:param name="pageDir"/>
-        
+    
     <xsl:variable name="disp">
-    	<xsl:choose>
-		    <xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
-		    <xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>		    
-		    <xsl:otherwise>y</xsl:otherwise>
-		</xsl:choose>
+      <xsl:choose>
+	<xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
+	<xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>		    
+	<xsl:otherwise>y</xsl:otherwise>
+      </xsl:choose>
     </xsl:variable>
 
     <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
     <xsl:if test='$request-params/param[@name="dt"]/@value != "simple" and $disp = "y"'>  
-    <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{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" 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{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     </xsl:if>
   </xsl:template>
-         
+  
 
   <xsl:template name="documentHeading">
@@ -152,37 +150,37 @@
     <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">
+      <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">
     	<xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
        	  <div id="headingimage">
-             <xsl:call-template name="coverImage"/> 
+	    <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>
-  </div>
-    
+	  <xsl:call-template name="documentButtons">
+	    <xsl:with-param name="collName" select="$collName"/>
+	  </xsl:call-template>
+	</ul>
+      </div>
+      
       <!--<div><xsl:call-template name="enrichServices">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template></div>-->
+      
+      <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 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:call-template>
+	</div>
+      </xsl:if>
     </div>
-   </xsl:template>
+  </xsl:template>
 
   <xsl:template name="coverImage">
@@ -202,34 +200,31 @@
     <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
     <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
-      
-      <!-- expand document -->
-      <!-- this doesn't work with MG so comment it out for now -->      
-      <!--<xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">-->
-      <!-- shouldn't appear for paged document -->
-      <xsl:if test="@docType = 'hierarchy'">
+    
+    <!-- expand document -->
+    <xsl:if test="@docType = 'hierarchy'">
       <div class="button">
         <span class="button">
 	  <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&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><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')"/>
+		<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&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><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 href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><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>
-         </span>
-	</div>
-      </xsl:if> 
-      
-      <!-- expand contents -->
-      <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
+	</span>
+      </div>
+    </xsl:if> 
+    
+    <!-- expand contents -->
+    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
       <div class="button">
         <span class="button">
 	  <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&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><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')"/>
+		<xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
 	      </a>
 	    </xsl:when>
@@ -240,17 +235,17 @@
 	    </xsl:otherwise>
 	  </xsl:choose>
-	 </span>
-	</div>
-      </xsl:if>
-      <!-- detach page -->
-      <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
-      <div class="button">
-        <span class="button">
-	  <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>
-         </span>
+	</span>
       </div>
-   </xsl:template>
+    </xsl:if>
+    <!-- detach page -->
+    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
+    <div class="button">
+      <span class="button">
+	<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>
+      </span>
+    </div>
+  </xsl:template>
 
   <xsl:template name="TOC">
@@ -269,5 +264,5 @@
     </xsl:choose>
   </xsl:template>
-    
+  
   <xsl:template name="hierarchicalContents">
     <xsl:param name="collName"/>
@@ -284,15 +279,15 @@
     
     <xsl:if test="documentNode[@nodeID]">
-	<ul id="tocnodes">
+      <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: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: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"/>
 		  
@@ -304,8 +299,8 @@
 		  
 		</xsl:apply-templates>
-		</xsl:for-each>
-	     </ul>
+	      </xsl:for-each>
+	    </ul>
 	  </xsl:if>
- </li> 
+	</li> 
       </ul>
     </xsl:if>
@@ -323,37 +318,37 @@
     <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><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
-	-->	
+    
+    <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><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
+      -->	
+      
+      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
 	
-	<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>
+	<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"/>
-	      
-	      <!-- added parameters -->
-	      <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
-	      <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
-	    </xsl:apply-templates>
-	   </ul>
+      <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"/>
+	    
+	    <!-- added parameters -->
+	    <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
+	    <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
+	  </xsl:apply-templates>
+	</ul>
       </xsl:if>
     </li>
@@ -380,5 +375,5 @@
       </xsl:if>
       <xsl:apply-templates select="nodeContent"/>
-      </xsl:if>
+    </xsl:if>
     
   </xsl:template>
@@ -422,5 +417,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>
@@ -439,64 +434,64 @@
     <!-- parameters for the bookicon to work properly -->
     <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
-   	<xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
-   	<xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
-   	<xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
+    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
+    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
+    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
 
     <xsl:choose>
-	<xsl:when test="$pos=-1"><!-- a doc -->
-	  <tr valign="top">
-	    <td align="left">
-	    </td>
-	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
-	      </center></td>
-	    <td align="right">
-	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
-	    </td>
-	  </tr>
-	</xsl:when>
-	
-	<xsl:otherwise> <!-- an internal node -->	  
-	  <tr valign="top">
-	    <td align="left">
-	      <xsl:if test=" not ( $pos = 1 )">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
-	      </xsl:if>
-	    </td>
-	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
-	      </center></td>
-	    <td align="right">
-	      <xsl:if test=" not($pos = $length)">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
-	      </xsl:if>
-	    </td>
-	  </tr>
-	</xsl:otherwise>
-      </xsl:choose>
-      <tr valign="middle">
-	<td align='center' valign='top' colspan='3'>
-	  <form name="GotoForm" method="get" action="{$library_name}">
-	    <input type='hidden' name='a' value='d'/>
-	    <input type='hidden' name='c' value='{$collName}'/>
-	    <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
-	    <input type='hidden' name='d'>
-	    	<xsl:attribute name='value'>
-	    		<xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
-	    		<xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
-	    	</xsl:attribute>
-	    </input>    	    	
-	    
-    	<input type='hidden' name='p.s' value='{$p.s}'/>
-    	<input type='hidden' name='p.sa' value='{$p.sa}'/>
-    	<input type='hidden' name='p.a' value='{$p.a}'/>
-    	<input type='hidden' name='p.c' value='{$p.c}'/>    
-    	
-	    <input type="text" name="gp" size="3" maxlength="4"/>
-	    <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
-	  </form>
-	</td>
-      </tr>
-   </xsl:template>
+      <xsl:when test="$pos=-1"><!-- a doc -->
+	<tr valign="top">
+	  <td align="left">
+	  </td>
+	  <td align="center"><center>
+	      <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
+	    </center></td>
+	  <td align="right">
+	    <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
+	  </td>
+	</tr>
+      </xsl:when>
+      
+      <xsl:otherwise> <!-- an internal node -->	  
+	<tr valign="top">
+	  <td align="left">
+	    <xsl:if test=" not ( $pos = 1 )">
+	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
+	    </xsl:if>
+	  </td>
+	  <td align="center"><center>
+	      <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
+	    </center></td>
+	  <td align="right">
+	    <xsl:if test=" not($pos = $length)">
+	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
+	    </xsl:if>
+	  </td>
+	</tr>
+      </xsl:otherwise>
+    </xsl:choose>
+    <tr valign="middle">
+      <td align='center' valign='top' colspan='3'>
+	<form name="GotoForm" method="get" action="{$library_name}">
+	  <input type='hidden' name='a' value='d'/>
+	  <input type='hidden' name='c' value='{$collName}'/>
+	  <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
+	  <input type='hidden' name='d'>
+	    <xsl:attribute name='value'>
+	      <xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
+	      <xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
+	    </xsl:attribute>
+	  </input>    	    	
+	  
+	  <input type='hidden' name='p.s' value='{$p.s}'/>
+	  <input type='hidden' name='p.sa' value='{$p.sa}'/>
+	  <input type='hidden' name='p.a' value='{$p.a}'/>
+	  <input type='hidden' name='p.c' value='{$p.c}'/>    
+	  
+	  <input type="text" name="gp" size="3" maxlength="4"/>
+	  <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
+	</form>
+      </td>
+    </tr>
+  </xsl:template>
   
   <xsl:template name="enrichServices">
@@ -535,6 +530,6 @@
 
   <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/gs2/transform/gli4gs3.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/gli4gs3.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/gli4gs3.xsl	(revision 18318)
@@ -12,20 +12,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -43,7 +43,7 @@
     <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
     
-   <!-- <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>-->      
+    <!-- <xsl:call-template name="navigationBar">
+    <xsl:with-param name="collName" select="$collName"/>
+  </xsl:call-template>-->      
     <div >
       <xsl:copy-of select="Applet"/>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/help-common.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/help-common.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/help-common.xsl	(revision 18318)
@@ -15,31 +15,31 @@
     <xsl:variable name="numoptions" select="count(serviceList/service[@name='ClassifierBrowse']/classifierList[position() mod 2 = 1]/classifier)"/>
     <div class="simplehelp">
-    <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.simplehelpheading', $longCollName)"/></h3>
-    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.numbrowseoptions', $numoptions+$has_search+$has_phrase)"/>
-    <ul>
+      <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.simplehelpheading', $longCollName)"/></h3>
+      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.numbrowseoptions', $numoptions+$has_search+$has_phrase)"/>
+      <ul>
+	<xsl:if test="$has_search =1">
+	  <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchshort')" disable-output-escaping='yes'/></li>
+	</xsl:if>
+	<xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
+	  <xsl:variable name="title">help.<xsl:value-of select="@content"/>short</xsl:variable>
+	  <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/></li>
+	</xsl:for-each>
+	<xsl:if test="$has_phrase =1">
+	  <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraseshort')" disable-output-escaping='yes'/></li>
+	</xsl:if>
+      </ul>
       <xsl:if test="$has_search =1">
-	<li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchshort')" disable-output-escaping='yes'/></li>
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchlong')" disable-output-escaping='yes'/>
       </xsl:if>
       <xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
-	<xsl:variable name="title">help.<xsl:value-of select="@content"/>short</xsl:variable>
-	<li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/></li>
+	<xsl:variable name="title">help.<xsl:value-of select="@content"/>long</xsl:variable>
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/>
       </xsl:for-each>
       <xsl:if test="$has_phrase =1">
-	<li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraseshort')" disable-output-escaping='yes'/></li>
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraselong')" disable-output-escaping='yes'/>
       </xsl:if>
-    </ul>
-    <xsl:if test="$has_search =1">
-      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchlong')" disable-output-escaping='yes'/>
-    </xsl:if>
-    <xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
-      <xsl:variable name="title">help.<xsl:value-of select="@content"/>long</xsl:variable>
-      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/>
-    </xsl:for-each>
-    <xsl:if test="$has_phrase =1">
-      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraselong')" disable-output-escaping='yes'/>
-    </xsl:if>
     </div>
   </xsl:template>
   
-   
+  
 </xsl:stylesheet>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/help.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/help.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/help.xsl	(revision 18318)
@@ -14,20 +14,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/home.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/home.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/home.xsl	(revision 18318)
@@ -12,20 +12,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -47,17 +47,17 @@
 
   <xsl:template name="pageBanner">
-     <div id="banner">
-        <div class="collectimage">
-            <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>
-	  </div>
+    <div id="banner">
+      <div class="collectimage">
+	<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>
       </div>
-      <div class="bannerextra"></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:template>
+    </div>
+    <div class="bannerextra"></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:template>
 
   <xsl:template match="collectionList">
@@ -66,5 +66,5 @@
 
       <p>
-      <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
+	<a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
 	  <img width="150" border="1">
 	    <xsl:attribute name="src">
@@ -86,8 +86,8 @@
       <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')"/>
     </div>	
-   </xsl:template>
+  </xsl:template>
 
-<xsl:template match="serviceList">
-   <!--<xsl:call-template name="dividerBar"/>-->
+  <xsl:template match="serviceList">
+    <!--<xsl:call-template name="dividerBar"/>-->
     <ul id="servicelist">
       <!--uncomment to display an authentication link-->
@@ -95,7 +95,7 @@
       <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> <br/>     </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>-->
+      <!--<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/gs2/transform/nav.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/nav.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/nav.xsl	(revision 18318)
@@ -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"/>
 
@@ -40,8 +40,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/gs2/transform/pref.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/pref.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/pref.xsl	(revision 18318)
@@ -11,20 +11,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -95,5 +95,5 @@
     <xsl:param name="formstatus"/>
     <xsl:param name="advancedstatus"/>
-	    
+    
     <!-- search type : 0(default, simple); 1(form) -->
     <xsl:variable name="qt"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='qt']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='qt']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>    
@@ -102,5 +102,5 @@
     <!-- search mode: text, form, advanced -->
     <xsl:variable name="mode"><xsl:choose><xsl:when test="$qt=0">text</xsl:when><xsl:when test="$queryfmode=0">form</xsl:when><xsl:when test="$queryfmode=1">advanced</xsl:when><xsl:otherwise>text</xsl:otherwise></xsl:choose></xsl:variable>
-            
+    
     <table>
       <tr><td> </td><td> </td><td align='right'><input type='submit' name="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input></td></tr>
@@ -110,9 +110,9 @@
       
       <tr><td valign='baseline' class='col1'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type')"/></td><td class='col2'><input type='radio' name='qfm' value='2' onclick="javascript:changePref(2)"><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="checked"/></xsl:if></input></td><td class='col3'> <font><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_text')"/></font> 
-      
-      <xsl:if test="$formstatus='y'"><input name="qfm" onclick="javascript:changePref(0)" type="radio" value="0"><xsl:if test="$mode='form'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='form'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_simple_form')"/></font></xsl:if>
-       
-      <xsl:if test="$advancedstatus='y'"><input name="qfm" onclick="javascript:changePref(1)" type="radio" value="1" ><xsl:if test="$mode='advanced'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='advanced'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_advanced_form')"/></font></xsl:if>
-      </td></tr>
+	  
+	  <xsl:if test="$formstatus='y'"><input name="qfm" onclick="javascript:changePref(0)" type="radio" value="0"><xsl:if test="$mode='form'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='form'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_simple_form')"/></font></xsl:if>
+	  
+	  <xsl:if test="$advancedstatus='y'"><input name="qfm" onclick="javascript:changePref(1)" type="radio" value="1" ><xsl:if test="$mode='advanced'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='advanced'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_advanced_form')"/></font></xsl:if>
+	</td></tr>
       
       <!-- search options -->
@@ -135,5 +135,5 @@
     <!-- <xsl:if test="$mode='form'"><xsl:apply-templates select="/page/pageResponse//service[@name='FieldQuery']"/></xsl:if> -->    
     <xsl:call-template name="advanced-search-prefs"><xsl:with-param name="display"><xsl:if test="$mode='advanced'">y</xsl:if><xsl:if test="$mode='text' or $mode='form'">n</xsl:if></xsl:with-param></xsl:call-template>
-      
+    
     <!-- search type specific options -->
     <xsl:apply-templates select="/page/pageResponse//service[@name='TextQuery']">
@@ -157,5 +157,5 @@
       
       <tr><td rowspan='2' valign='baseline'><xsl:value-of select="$sortparam/displayItem"/></td><td><input type='radio' name='{$sortvar}' value='{$optionVal}'><xsl:choose><xsl:when test="$cachedValue=$optionVal"><xsl:attribute name="checked"/></xsl:when><xsl:when test="normalize-space($cachedValue)='' and $optionVal=$defaultValue"><xsl:attribute name="checked"/></xsl:when></xsl:choose></input></td>
-      <td><xsl:value-of select="$sortparam/option[1]/displayItem"/></td></tr>
+	<td><xsl:value-of select="$sortparam/option[1]/displayItem"/></td></tr>
       
       <xsl:variable name="optionVal" select="$sortparam/option[2]/@name"/>
@@ -170,20 +170,20 @@
       <xsl:variable name="maxdocs"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name=$maxvar]"><xsl:value-of select="/page/pageRequest/paramList/param[@name=$maxvar]/@value"/></xsl:when><xsl:otherwise>50</xsl:otherwise></xsl:choose></xsl:variable>
       <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>
-	<xsl:variable name="maxdocs_param"><select name="{$ns}maxDocs">
-            <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
-            <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
-            <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option>
-            <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
-          </select></xsl:variable>
-	<xsl:variable name="hits_param"><select name="hitsPerPage">
-            <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option> 
-            <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="-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></xsl:variable>
-	<tr><td colspan='3'><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'pref.hits', $maxdocs_param, $hits_param)" disable-output-escaping="yes"/></td></tr>
+      <xsl:variable name="maxdocs_param"><select name="{$ns}maxDocs">
+	  <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
+	  <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
+	  <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option>
+	  <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
+	</select></xsl:variable>
+      <xsl:variable name="hits_param"><select name="hitsPerPage">
+	  <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option> 
+	  <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="-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></xsl:variable>
+      <tr><td colspan='3'><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'pref.hits', $maxdocs_param, $hits_param)" disable-output-escaping="yes"/></td></tr>
     </xsl:if>
   </xsl:template>
-    
+  
   <xsl:template name="advanced-search-prefs">
     <xsl:param name="display">n</xsl:param>    
@@ -191,9 +191,9 @@
     <tr id="adv-qnb"><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if>
       <td colspan='2'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.num_fields')"/></td><td><select name="qfn">
-      <option value="2"><xsl:if test="$numbox=2"><xsl:attribute name="selected"></xsl:attribute></xsl:if>2</option> 
-      <option value="4"><xsl:if test="$numbox=4"><xsl:attribute name="selected"></xsl:attribute></xsl:if>4</option>
-      <option value="6"><xsl:if test="$numbox=6"><xsl:attribute name="selected"></xsl:attribute></xsl:if>6</option>
-      <option value="8"><xsl:if test="$numbox=8"><xsl:attribute name="selected"></xsl:attribute></xsl:if>8</option>
-    </select></td><td/></tr>
+	  <option value="2"><xsl:if test="$numbox=2"><xsl:attribute name="selected"></xsl:attribute></xsl:if>2</option> 
+	  <option value="4"><xsl:if test="$numbox=4"><xsl:attribute name="selected"></xsl:attribute></xsl:if>4</option>
+	  <option value="6"><xsl:if test="$numbox=6"><xsl:attribute name="selected"></xsl:attribute></xsl:if>6</option>
+	  <option value="8"><xsl:if test="$numbox=8"><xsl:attribute name="selected"></xsl:attribute></xsl:if>8</option>
+	</select></td><td/></tr>
   </xsl:template>
 
@@ -242,10 +242,10 @@
       <xsl:variable name="value" select="@name"/>
       <tr><xsl:attribute name="id"><xsl:value-of select="concat($prefix, '-', $paramIdx, '-', position())"/></xsl:attribute><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if>
-      <xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if>
-      <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td>
-      <td><xsl:value-of select="displayItem"/></td>
+	<xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if>
+	<td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td>
+	<td><xsl:value-of select="displayItem"/></td>
       </tr>
     </xsl:for-each>
   </xsl:template>
- 
+  
 </xsl:stylesheet>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/query-common.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/query-common.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/query-common.xsl	(revision 18318)
@@ -12,15 +12,15 @@
     <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
     <div class="queryform">
-     <p> 
-      <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}"/>
-        <input type="hidden" name="startPage" value="1"/>
-      <xsl:apply-templates select="paramList"/>
-      </form>
-     </p> 
+      <p> 
+	<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}"/>
+	  <input type="hidden" name="startPage" value="1"/>
+	  <xsl:apply-templates select="paramList"/>
+	</form>
+      </p> 
     </div>
   </xsl:template>
@@ -28,9 +28,9 @@
   <!-- a special handling of the param list - we override the one in service-params -->
   <xsl:template match="paramList" priority='2'>    	
-	<span class="textselect">
-		Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='indexSubcollection']"> of <xsl:apply-templates select="param[@name='indexSubcollection']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexSubcollection']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='indexLanguage']"> in <xsl:apply-templates select="param[@name='indexLanguage']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexLanguage']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='level' and not(@type='invisible')]"> at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
+    <span class="textselect">
+      Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='indexSubcollection']"> of <xsl:apply-templates select="param[@name='indexSubcollection']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexSubcollection']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='indexLanguage']"> in <xsl:apply-templates select="param[@name='indexLanguage']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexLanguage']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='level' and not(@type='invisible')]"> at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
     </span>	
     <span class="querybox"> 
-     <xsl:call-template name="query-and-submit"/>
+      <xsl:call-template name="query-and-submit"/>
     </span>
   </xsl:template>
@@ -68,7 +68,7 @@
     </xsl:choose>
   </xsl:template>
-   
+  
   <xsl:template match="param[@name='matchMode']" mode='query1'>
-   <xsl:param name='default'/>
+    <xsl:param name='default'/>
     <xsl:variable name="qfm" select="/page/pageRequest/paramList/param[@name='qfm']/@value"/>
     <xsl:choose>
@@ -89,26 +89,26 @@
 	<xsl:choose>
 	  <xsl:when test="$qfm=1">
-	     <xsl:apply-templates select="param[@name='complexField']"/>
+	    <xsl:apply-templates select="param[@name='complexField']"/>
 	  </xsl:when>
 	  <xsl:otherwise>
-	     <xsl:apply-templates select="param[@name='simpleField']"/>
+	    <xsl:apply-templates select="param[@name='simpleField']"/>
 	  </xsl:otherwise>
 	</xsl:choose>
-	    <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
-	 
+	<input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
+	
       </xsl:when>
       <xsl:otherwise> <!-- doing text query -->
-    <xsl:variable name="qb" select="/page/pageRequest/paramList/param[@name='qb']/@value"/>
+	<xsl:variable name="qb" select="/page/pageRequest/paramList/param[@name='qb']/@value"/>
 	<xsl:choose>
 	  <xsl:when test="$qb=1"><!-- large query box -->
-	       <textarea name="s1.query" cols='63' rows='10'>
-		  <xsl:apply-templates select="param[@name='query']" mode="calculate-default"/><xsl:text> </xsl:text><!-- put a space here just in case there is no value- mozilla craps out if have a <textarea /> element -->
-		</textarea>
-	   <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
-	   </xsl:when>
+	    <textarea name="s1.query" cols='63' rows='10'>
+	      <xsl:apply-templates select="param[@name='query']" mode="calculate-default"/><xsl:text> </xsl:text><!-- put a space here just in case there is no value- mozilla craps out if have a <textarea /> element -->
+	    </textarea>
+	    <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
+	  </xsl:when>
 	  <xsl:otherwise>
-	 	<xsl:variable name="qs"><xsl:apply-templates select="param[@name='query']" mode="calculate-default"/></xsl:variable>
-		<nobr><xsl:apply-templates select="param[@name='query']"><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs)"/></xsl:apply-templates><input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input></nobr>
-	   </xsl:otherwise>
+	    <xsl:variable name="qs"><xsl:apply-templates select="param[@name='query']" mode="calculate-default"/></xsl:variable>
+	    <nobr><xsl:apply-templates select="param[@name='query']"><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs)"/></xsl:apply-templates><input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input></nobr>
+	  </xsl:otherwise>
 	</xsl:choose>
       </xsl:otherwise>
@@ -136,5 +136,5 @@
     <xsl:param name="ns">s1.</xsl:param>
     <xsl:param name="pos"/>
- <!--   <xsl:variable name="pos" select="@occurs - $occurs"/>-->
+    <!--   <xsl:variable name="pos" select="@occurs - $occurs"/>-->
     <tr><xsl:for-each select="param">
 	<xsl:variable name="pname" select="@name"/>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/query.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/query.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/query.xsl	(revision 18318)
@@ -14,20 +14,20 @@
   <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>
+      <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 class="bgimage">
 	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
-	   <xsl:apply-templates select="pageResponse"/>
-	   <xsl:call-template name="greenstoneFooter"/>                	   
+	  <xsl:apply-templates select="pageResponse"/>
+	  <xsl:call-template name="greenstoneFooter"/>                	   
 	</div>
       </body>
@@ -46,21 +46,21 @@
     <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
 
-      <xsl:call-template name="standardPageBanner">
-	<xsl:with-param name="collName" select="$collName"/>
-	<xsl:with-param name="pageType">search</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="navigationBar">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>      
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+      <xsl:with-param name="pageType">search</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="navigationBar">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>      
     <div class="document">
-     <xsl:apply-templates select="service">
+      <xsl:apply-templates select="service">
 	<xsl:with-param name="collName" select="$collName"/>
       </xsl:apply-templates>
-    <xsl:if test="documentNodeList">
-      <xsl:call-template name="query-response">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
-    </xsl:if>
-   </div>
+      <xsl:if test="documentNodeList">
+	<xsl:call-template name="query-response">
+	  <xsl:with-param name="collName" select="$collName"/>
+	</xsl:call-template>
+      </xsl:if>
+    </div>
   </xsl:template>
   
@@ -81,5 +81,5 @@
     <!-- next and prev links at bottom of page -->
     <xsl:call-template name="resultNavigation">
-    	<xsl:with-param name="collName" select="$collName"/>
+      <xsl:with-param name="collName" select="$collName"/>
     </xsl:call-template>	
   </xsl:template>
Index: /greenstone3/trunk/web/interfaces/gs2/transform/style.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/gs2/transform/style.xsl	(revision 18317)
+++ /greenstone3/trunk/web/interfaces/gs2/transform/style.xsl	(revision 18318)
@@ -14,5 +14,5 @@
   <xsl:template name="globalStyle">
     <link rel="stylesheet" href="interfaces/gs2/style/classic.css" type="text/css"/>
-     <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
+    <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
   </xsl:template>
   
@@ -42,50 +42,50 @@
     <xsl:param name="clTop"/>
     <xsl:variable name="this-element" select="/page/pageResponse/collection"/>
-     <div id="bannar">
+    <div id="bannar">
       <div class="pageinfo"> 
-          <xsl:call-template name="top-buttons">
-	    <xsl:with-param name="collName" select="$collName"/>
-	    <xsl:with-param name="pageType" select="$pageType"/>
-	  </xsl:call-template>
-          <xsl:if test="not(/page/pageRequest/@action='d')">
-  	<xsl:variable name="text">
+	<xsl:call-template name="top-buttons">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="pageType" select="$pageType"/>
+	</xsl:call-template>
+	<xsl:if test="not(/page/pageRequest/@action='d')">
+	  <xsl:variable name="text">
+	    <xsl:choose>
+	      <xsl:when test="$pageType='browse'">
+		<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
+	      </xsl:when>
+	      <xsl:otherwise>
+		<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </xsl:variable>
+	  <xsl:if test="$text != '__t_'">
+	    <p class="bannertitle"><xsl:value-of select="$text"/></p>
+	  </xsl:if>
+	</xsl:if>
+      </div>
+
+      <div class="collectimage">
+	<a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
 	  <xsl:choose>
-	    <xsl:when test="$pageType='browse'">
-	      <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
+	    <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="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
+	      <b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
 	    </xsl:otherwise>
 	  </xsl:choose>
-	</xsl:variable>
-			<xsl:if test="$text != '__t_'">
-        <p class="bannertitle"><xsl:value-of select="$text"/></p>
-			</xsl:if>
-      </xsl:if>
-     </div>
-
-     <div class="collectimage">
-       <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>
-		<b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
-	      </xsl:otherwise>
-	    </xsl:choose>
-	  </a>
-       </div>
+	</a>
       </div>
+    </div>
     <div class="bannerextra"></div>	
   </xsl:template>
@@ -95,27 +95,27 @@
     <xsl:param name="pageType"/>
     <p class="bannerlinks">
-      	  <a class="navlink" 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>
-	<!-- <xsl:choose>
-	<xsl:when test="$pageType='help'">
-             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
-        </xsl:when>
+      <a class="navlink" 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>
+      <!--<xsl:choose>
+        <xsl:when test="$pageType='help'">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
+	</xsl:when>
 	<xsl:otherwise>
 	  <a class="navlink" 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>
-       </xsl:otherwise>
+	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
+	  </a>
+	</xsl:otherwise>
       </xsl:choose> -->
-       <xsl:choose>
-	  <xsl:when test="$pageType='pref'">
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
-	   </xsl:when>
-	  <xsl:otherwise>
-	    <a class="navlink" 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>
-	   </xsl:otherwise>
-	</xsl:choose>      
+      <xsl:choose>
+	<xsl:when test="$pageType='pref'">
+	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
+	</xsl:when>
+	<xsl:otherwise>
+	  <a class="navlink" 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>
+	</xsl:otherwise>
+      </xsl:choose>      
     </p>
   </xsl:template>
@@ -133,16 +133,16 @@
 
     <div class="navbar">
-       <p class="navbar">
-	 <xsl:choose>
-	 <xsl:when test="not($dir='rtl')">
-	 <xsl:if test="$this-element/serviceList/service[@type='query']">
-	   <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
-	 </xsl:if>
-	 </xsl:when>
-	 <xsl:otherwise>
-	  <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
-	  <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
-	  </xsl:if>
-	 </xsl:otherwise>
+      <p class="navbar">
+	<xsl:choose>
+	  <xsl:when test="not($dir='rtl')">
+	    <xsl:if test="$this-element/serviceList/service[@type='query']">
+	      <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
+	    </xsl:if>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
+	      <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
+	    </xsl:if>
+	  </xsl:otherwise>
 	</xsl:choose>
 
@@ -154,19 +154,19 @@
 	  </xsl:apply-templates>
 	</xsl:for-each>
-		
+	
 	<xsl:choose>	
-	<xsl:when test="$dir='rtl'">
-	<xsl:if test="$this-element/serviceList/service[@type='query']">
-	   <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
-	</xsl:if>
-	</xsl:when>
-	<xsl:otherwise>
-	<xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
-	  <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
-	</xsl:if>
-	</xsl:otherwise>
+	  <xsl:when test="$dir='rtl'">
+	    <xsl:if test="$this-element/serviceList/service[@type='query']">
+	      <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
+	    </xsl:if>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
+	      <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
+	    </xsl:if>
+	  </xsl:otherwise>
 	</xsl:choose>
-       </p>
-      </div> 
+      </p>
+    </div> 
   </xsl:template>
 
@@ -175,5 +175,5 @@
     <xsl:choose>
       <xsl:when test="/page/pageRequest/@action='q'">	  
-	   <span class="narspace">search</span>
+	<span class="narspace">search</span>
       </xsl:when>
       <xsl:otherwise>
@@ -195,8 +195,8 @@
     <xsl:choose>
       <xsl:when test="/page/pageRequest/paramList/param[@name='s']/@value='PhindApplet'">
-	    <span class="narspace">phrases</span>
-      </xsl:when>
-      <xsl:otherwise>
-	 <a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
+	<span class="narspace">phrases</span>
+      </xsl:when>
+      <xsl:otherwise>
+	<a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
       </xsl:otherwise>
     </xsl:choose>
@@ -208,5 +208,5 @@
     <xsl:choose>
       <xsl:when test="/page/pageRequest/@action='b' and $clTop=@name">
-	 <span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
+	<span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
       </xsl:when>
       <xsl:otherwise>
@@ -218,10 +218,10 @@
   <xsl:template name="dividerBar">   
     <xsl:param name='text'/>
-      <xsl:choose>
+    <xsl:choose>
       <xsl:when test="$text">
-	 <div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
-      </xsl:when>
-      <xsl:otherwise>
-	 <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
+	<div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
+      </xsl:when>
+      <xsl:otherwise>
+	<div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
       </xsl:otherwise>
     </xsl:choose> 
@@ -229,6 +229,6 @@
   
   <xsl:template name="nzdlPageBanner">
-       <div><img src="interfaces/nzdl/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></xsl:attribute></img></div>
-       <!-- end of page banner -->  
+    <div><img src="interfaces/nzdl/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></xsl:attribute></img></div>
+    <!-- end of page banner -->  
   </xsl:template>
 
@@ -343,5 +343,5 @@
       alt='{$alt}' title='{$title}'/>
   </xsl:template>
-    
+  
   <xsl:template name="icondoc">
     <xsl:param name="alt">Word</xsl:param>
