Index: /greenstone3/trunk/web/interfaces/classic/style/classic.css
===================================================================
--- /greenstone3/trunk/web/interfaces/classic/style/classic.css	(revision 14418)
+++ /greenstone3/trunk/web/interfaces/classic/style/classic.css	(revision 14419)
@@ -251,2 +251,12 @@
   border:none; 
 }
+
+img.lessarrowrtl{
+  float:right;
+  border: none;  
+}
+
+img.morearrowrtl{
+  float:left;
+  border:none; 
+}
Index: /greenstone3/trunk/web/interfaces/classic/transform/document.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/classic/transform/document.xsl	(revision 14418)
+++ /greenstone3/trunk/web/interfaces/classic/transform/document.xsl	(revision 14419)
@@ -18,4 +18,5 @@
       <xsl:call-template name="pageHead"/>
       <body>
+        <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
         <div id="page">
            <xsl:apply-templates select="pageResponse"/>
@@ -81,12 +82,18 @@
   <xsl:template name="documentArrows">
     <xsl:param name="collName"/>
+    <xsl:variable name="dir"><xsl:call-template name="direction"/></xsl:variable>    
+    <xsl:variable name="firstDir"><xsl:choose><xsl:when test="$dir='rtl'">forward</xsl:when><xsl:otherwise>back</xsl:otherwise></xsl:choose></xsl:variable>
+    <xsl:variable name="secondDir"><xsl:choose><xsl:when test="$dir='rtl'">back</xsl:when><xsl:otherwise>forward</xsl:otherwise></xsl:choose></xsl:variable>
+    
     <div class="documentarrows">
        <xsl:call-template name="documentArrow">
         <xsl:with-param name="collName" select="$collName"/>
-       <xsl:with-param name="direction">back</xsl:with-param>
+        <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">forward</xsl:with-param>
+      <xsl:with-param name="direction" select="$secondDir"/>
+      <xsl:with-param name="pageDir" select="$dir"/>
     </xsl:call-template>
     </div>    
@@ -96,8 +103,11 @@
     <xsl:param name="collName"/>
     <xsl:param name="direction"/>
+    <xsl:param name="pageDir"/>
+            
     <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
     <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>  
-    <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
-    </xsl:if> 
+    <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>
          
Index: /greenstone3/trunk/web/interfaces/classic/transform/style.xsl
===================================================================
--- /greenstone3/trunk/web/interfaces/classic/transform/style.xsl	(revision 14418)
+++ /greenstone3/trunk/web/interfaces/classic/transform/style.xsl	(revision 14419)
@@ -16,4 +16,5 @@
       <xsl:call-template name="pageHead"/>
       <body class="bgimage">
+	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
 	<div id="page">
 	   <xsl:apply-templates select="pageResponse"/>
@@ -23,5 +24,4 @@
     </html>
   </xsl:template>
-
   
   <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
@@ -165,11 +165,26 @@
     <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
     <xsl:variable name="classifiers" select="$this-element/serviceList/service[@name='ClassifierBrowse']/classifierList[1]"/>
-     <div class="navbar">
+
+    <!-- display order, for Arabic etc. languages, display right to left -->
+    <xsl:variable name="dir"><xsl:call-template name="direction"/></xsl:variable>
+    <xsl:variable name="sort_order"><xsl:choose><xsl:when test="$dir='rtl'">descending</xsl:when><xsl:otherwise>ascending</xsl:otherwise></xsl:choose></xsl:variable>	    
+
+    <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>
+	</xsl:choose>
+
 	<xsl:for-each select="$classifiers/classifier">
+	  <xsl:sort order="{$sort_order}" select="position()" />
 	  <xsl:apply-templates select="." mode="navbar">
 	    <xsl:with-param name="collName" select="$collName"/>
@@ -177,8 +192,17 @@
 	  </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:choose>
        </p>
       </div> 
@@ -366,3 +390,7 @@
   </xsl:template>
 
+  <xsl:template name="direction">
+    <xsl:if test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:if>
+  </xsl:template>
+
 </xsl:stylesheet>  
