Index: main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js	(revision 25462)
@@ -91,10 +91,9 @@
 				if(sectionsStart == 0 || sectionsEnd == -1 || sectionsEnd <= sectionsStart)
 				{
-					callback("");
+					callback(" ");
+					return;
 				}
 				
 				var sections = response.substring(sectionsStart, sectionsEnd);
-				sections = sections.replace(/href=".*?#top"/g, "href=\"" + gs.requestInformation.fullURL + "#top\"");
-				
 				callback(sections);
 			}
@@ -138,10 +137,15 @@
 				if(text)
 				{	
+					var nodeID = sectionID.replace(/\./g, "_");
+					if(text.search("wrap" + nodeID) != -1)
+					{
+						document.getElementById("zoomOptions").style.display = "table-row";
+					}
 					getSubSectionsForSection(sectionID, function(sections)
-					{
+					{					
 						if(sections)
 						{
 							var textElem = document.getElementById("doc" + sectionID);
-							textElem.innerHTML = text + sections;
+							$(textElem).html(text + sections);
 							
 							docElem.setAttribute("class", docElem.getAttribute("class").replace(/\bnoText\b/g, ""));
@@ -282,5 +286,5 @@
 				}
 				startCounter++;
-				
+
 				var toggleFunction = function(tid)
 				{
Index: main/trunk/greenstone3/web/interfaces/oran/js/map-scripts.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/map-scripts.js	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/js/map-scripts.js	(revision 25462)
@@ -36,5 +36,5 @@
 		else
 		{
-			document.getElementById("map_canvas").style.display = "none";
+			document.getElementById("map_canvas").style.visibility = "hidden";
 		}
 	}
@@ -149,5 +149,5 @@
 	
 	var ajax = new gs.functions.ajaxRequest();
-	ajax.open("GET", _baseURL + "a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=jsonNodes", true);
+	ajax.open("GET", gs.xsltParams.library_name + "?a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=jsonNodes", true);
 	ajax.onreadystatechange = function()
 	{
@@ -323,5 +323,5 @@
 	google.maps.event.addListener(marker, 'click', function()
 	{
-		document.location.href = _baseURL + "a=d&ed=1&c=" + gs.cgiParams.c + "&d=" + nodeID + "&dt=hierarchy&p.a=b&p.sa=&p.s=ClassifierBrowse";
+		document.location.href = gs.xsltParams.library_name + "?a=d&ed=1&c=" + gs.cgiParams.c + "&d=" + nodeID + "&dt=hierarchy&p.a=b&p.sa=&p.s=ClassifierBrowse";
 	});
 }
@@ -400,5 +400,5 @@
 {
 	var ajax = new gs.functions.ajaxRequest();
-	ajax.open("GET", _baseURL + "a=b&rt=s&s=ClassifierBrowse&c=" + gs.cgiParams.c + "&cl=" + sectionID + "&excerptid=jsonNodes", true);		
+	ajax.open("GET", gs.xsltParams.library_name + "?a=b&rt=s&s=ClassifierBrowse&c=" + gs.cgiParams.c + "&cl=" + sectionID + "&excerptid=jsonNodes", true);		
 	ajax.onreadystatechange = function()
 	{
@@ -420,5 +420,5 @@
 				}
 				
-				document.getElementById("map_canvas").style.display = "block";
+				document.getElementById("map_canvas").style.visibility = "visible";
 			}
 			
@@ -482,5 +482,5 @@
 	
 	var ajax = new gs.functions.ajaxRequest();
-	ajax.open("GET", _baseURL + "a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=nearbyDocs&ilt=" + inlineTemplate.replace(/ /, "%20"), true);		
+	ajax.open("GET", gs.xsltParams.library_name + "?a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=nearbyDocs&ilt=" + inlineTemplate.replace(/ /, "%20"), true);		
 	ajax.onreadystatechange = function()
 	{
@@ -650,6 +650,5 @@
 			sectionToggle.setAttribute("src", gs.imageURLs.loading);
 
-			var url = document.URL;
-			url = url.replace(/(&|\?)cl=[a-z\.0-9]+/gi, "$1cl=" + sectionID + "&excerptid=div" + sectionID);
+			var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/browse/" + sectionID.replace(/\./g, "/") + "?excerptid=div" + sectionID;
 
 			if(gs.cgiParams.berryBasket == "on")
Index: main/trunk/greenstone3/web/interfaces/oran/style/core.css
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/style/core.css	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/style/core.css	(revision 25462)
@@ -667,8 +667,10 @@
 /* -------- SEARCH ------- */
 .paramLabel {
+	margin: 2px;
 	float: left;
 	min-width: 250px;
 }
 .paramValue {
+	margin: 2px;
 	float: left;
 }
@@ -755,7 +757,13 @@
 }
 
-#map_canvas{
+.map_canvas_full{
 	margin:0px auto;
 	width:900px; 
+	height:500px;
+}
+
+.map_canvas_half{
+	float: right;
+	width:450px; 
 	height:500px;
 }
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 25462)
@@ -173,5 +173,5 @@
 	
 	<xsl:template name="mapFeaturesMap">
-		<div id="map_canvas" style="margin:0px auto; width:450px; height:500px; float:right;"><xsl:text> </xsl:text></div>
+		<div id="map_canvas" class="map_canvas_half"><xsl:text> </xsl:text></div>
 	</xsl:template>
 </xsl:stylesheet>
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25462)
@@ -191,4 +191,15 @@
 			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
 			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
+			<script type="text/javascript">
+				<xsl:text disable-output-escaping="yes">
+					$(window).load(function()
+					{
+						if(gs.cgiParams.docEdit == "1")
+						{
+							readyPageForEditing();
+						}
+					});
+				</xsl:text>
+			</script>
 			<gsf:metadata name="all"/>
 		</xsl:if>
@@ -302,5 +313,24 @@
 					</div>
 					<div style="margin:5px;" class="ui-state-default ui-corner-all">
-						<a id="editContentButton" style="padding: 3px; text-decoration:none;" href="javascript:readyPageForEditing();"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.edit_content')"/></a>
+						<a id="editContentButton" style="padding: 3px; text-decoration:none;">
+							<xsl:attribute name="href">
+								<xsl:value-of select="$library_name"/>
+								<xsl:text>/collection/</xsl:text>
+								<xsl:value-of select="$collName"/>
+								<xsl:text>/document/</xsl:text>
+								<xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
+								<xsl:if test="not(/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1')">
+									<xsl:text>?ed=1&amp;docEdit=1</xsl:text>
+								</xsl:if>
+							</xsl:attribute>
+							<xsl:choose>
+								<xsl:when test="/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1'">
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.hide_editor')"/>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.edit_content')"/>
+								</xsl:otherwise>
+							</xsl:choose>
+						</a>
 					</div>
 				</div>
@@ -320,14 +350,20 @@
 					<gslib:berryBasket/>
 
-					<!-- the book's cover image -->
-					<div id="coverImage">
-						<xsl:attribute name="class">
-							<xsl:choose>
-								<xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='coverImage']) or /page/pageResponse/format[@type='display']/gsf:option[@name='coverImage']/@value='true'">visible</xsl:when>
-								<xsl:otherwise>hidden</xsl:otherwise>    
-							</xsl:choose>
-						</xsl:attribute>
-						<gslib:coverImage/><xsl:text> </xsl:text>
-					</div>
+					<!-- Need to be in the context of the top-level documentNode rather than the document for the gsf:metadata call to work -->
+					<xsl:for-each select="documentNode">
+						<xsl:variable name="hasCover"><gsf:metadata name="hascover"/></xsl:variable>
+						<xsl:if test="$hasCover = '1'">
+							<!-- the book's cover image -->
+							<div id="coverImage">
+								<xsl:attribute name="class">
+									<xsl:choose>
+										<xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='coverImage']) or /page/pageResponse/format[@type='display']/gsf:option[@name='coverImage']/@value='true'">visible</xsl:when>
+										<xsl:otherwise>hidden</xsl:otherwise>    
+									</xsl:choose>
+								</xsl:attribute>
+								<gslib:coverImage/><xsl:text> </xsl:text>
+							</div>
+						</xsl:if>
+					</xsl:for-each>
 
 					<!-- the contents (if enabled) -->
@@ -439,11 +475,11 @@
 				<script type="text/javascript">
 					<xsl:text disable-output-escaping="yes">
-						$(window).load(function()
 						{
 							var nodeID = "</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">";
+							nodeID = nodeID.replace(/\./g, "_");
+
 							var bigHeight = </xsl:text><xsl:value-of select="$imageHeight"/><xsl:text disable-output-escaping="yes">;
 							var smallHeight = </xsl:text><xsl:value-of select="$screenImageHeight"/><xsl:text disable-output-escaping="yes">;
-							
-							nodeID = nodeID.replace(/\./g, "_");
+
 							var multiplier = bigHeight / smallHeight;
 
@@ -456,5 +492,5 @@
 								speedMultiplier:multiplier   
 							}); 
-						});
+						}
 					</xsl:text>
 				</script>
@@ -720,49 +756,55 @@
 			</td>
 		</tr>
-		<xsl:if test="count(//documentNode/metadataList/metadata[@name = 'Screen']) > 0 and count(//documentNode/metadataList/metadata[@name = 'Source']) > 0">
-			<tr>
-				<td style="width:40%;">
-					<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoom')"/><input id="zoomToggle" type="checkbox"/>
+		<tr id="zoomOptions">
+			<xsl:attribute name="style">
+				<xsl:choose>
+					<xsl:when test="count(//documentNode/metadataList/metadata[@name = 'Screen']) > 0 and count(//documentNode/metadataList/metadata[@name = 'Source']) > 0">
+						<xsl:text>display: table-row;</xsl:text>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:text>display: none;</xsl:text>
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:attribute>
+			<td style="width:40%;">
+				<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoom')"/><input id="zoomToggle" type="checkbox"/>
+				<script type="text/javascript">
+					<xsl:text disable-output-escaping="yes">
+						$("#zoomToggle").change(function()
+						{
+							_imageZoomEnabled = !_imageZoomEnabled;
+						});
+					</xsl:text>
+				</script>
+			</td>
+			<td style="width:60%;">
+				<div>
+					<div style="float:left; width:30%;"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoom_size')"/><xsl:text>:</xsl:text></div>
+					<div id="zoomSlider" style="float:right; width:65%; height:5px; margin-top:6px;"><xsl:text> </xsl:text></div>
 					<script type="text/javascript">
 						<xsl:text disable-output-escaping="yes">
-							$("#zoomToggle").change(function()
+							$("#zoomSlider").slider(
 							{
-								_imageZoomEnabled = !_imageZoomEnabled;
+								change: function(event, ui)
+								{
+									var sliderValue = ui.value;
+									var divs = document.getElementsByTagName("DIV");
+									for(var i = 0; i &lt; divs.length; i++)
+									{
+										if(divs[i].getAttribute("id") &amp;&amp; divs[i].getAttribute("id").search(/^mover.*/) != -1)
+										{
+											divs[i].style.height = 200 + (2 * sliderValue) + "px";
+											divs[i].style.width = 200 + (2 * sliderValue) + "px";
+										}
+									}
+								}
 							});
 						</xsl:text>
 					</script>
-				</td>
-				<td style="width:60%;">
-					<div>
-						<div style="float:left; width:30%;"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoom_size')"/><xsl:text>:</xsl:text></div>
-						<div id="zoomSlider" style="float:right; width:65%; height:5px; margin-top:6px;"><xsl:text> </xsl:text></div>
-						<script type="text/javascript">
-							<xsl:text disable-output-escaping="yes">
-								$("#zoomSlider").slider(
-								{
-									change: function(event, ui)
-									{
-										var sliderValue = ui.value;
-										var divs = document.getElementsByTagName("DIV");
-										for(var i = 0; i &lt; divs.length; i++)
-										{
-											if(divs[i].getAttribute("id") &amp;&amp; divs[i].getAttribute("id").search(/^mover.*/) != -1)
-											{
-												divs[i].style.height = 200 + (2 * sliderValue) + "px";
-												divs[i].style.width = 200 + (2 * sliderValue) + "px";
-											}
-										}
-									}
-								});
-							</xsl:text>
-						</script>
-						<style>
-							.ui-slider .ui-slider-handle{height:0.8em; width:1.0em;}
-						</style>
-						<div style="float:clear;"><xsl:text> </xsl:text></div>
-					</div>
-				</td>
-			</tr>
-		</xsl:if>
+					<style>.ui-slider .ui-slider-handle{height:0.8em; width:1.0em;}</style>
+					<div style="float:clear;"><xsl:text> </xsl:text></div>
+				</div>
+			</td>
+		</tr>
 		</table>	
 	</xsl:template>
@@ -775,5 +817,5 @@
 	
 	<xsl:template name="mapFeatures">
-		<div id="map_canvas"><xsl:text> </xsl:text></div>
+		<div id="map_canvas" class="map_canvas_full"><xsl:text> </xsl:text></div>
 
 		<xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
@@ -814,3 +856,2 @@
 	</xsl:template>
 </xsl:stylesheet>
-
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 25461)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 25462)
@@ -216,20 +216,24 @@
 				<!-- Theme Changer -->
 				<xsl:if test="/page/pageRequest/userInformation and util:contains(/page/pageRequest/userInformation/@groups, 'administrator')">
-					<script type="text/javascript">
-						<xsl:text disable-output-escaping="yes">
-							$(document).ready(function(){
-								$("#switcher").themeswitcher({
-									imgpath: "interfaces/" + gs.xsltParams.interface_name + "/style/images/",
-									additionalThemes: [
-										{title:"Greenstone Default", name:"custom-theme0", icon:"theme_90_greenstone.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/main/jquery-ui-1.8.16.custom.css"},
-										{title:"Greenstone Custom 1", name:"custom-theme1", icon:"theme_90_start_menu.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_1/jquery-ui-1.8.16.custom.css"},
-										{title:"Greenstone Custom 2", name:"custom-theme2", icon:"theme_90_mint_choco.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_2/jquery-ui-1.8.16.custom.css"},
-										{title:"Greenstone Custom 3", name:"custom-theme3", icon:"theme_90_trontastic.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_3/jquery-ui-1.8.16.custom.css"}
-									]
+					<div>
+						<div class="paramLabel"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.theme')"/></div>
+						<script type="text/javascript">
+							<xsl:text disable-output-escaping="yes">
+								$(document).ready(function(){
+									$("#switcher").themeswitcher({
+										imgpath: "interfaces/" + gs.xsltParams.interface_name + "/style/images/",
+										additionalThemes: [
+											{title:"Greenstone Default", name:"custom-theme0", icon:"theme_90_greenstone.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/main/jquery-ui-1.8.16.custom.css"},
+											{title:"Greenstone Custom 1", name:"custom-theme1", icon:"theme_90_start_menu.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_1/jquery-ui-1.8.16.custom.css"},
+											{title:"Greenstone Custom 2", name:"custom-theme2", icon:"theme_90_mint_choco.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_2/jquery-ui-1.8.16.custom.css"},
+											{title:"Greenstone Custom 3", name:"custom-theme3", icon:"theme_90_trontastic.png", url:"interfaces/" + gs.xsltParams.interface_name + "/style/themes/alt_theme_3/jquery-ui-1.8.16.custom.css"}
+										]
+									});
 								});
-							});
-						</xsl:text>
-					</script>
-					<div id="switcher"><xsl:text> </xsl:text></div>
+							</xsl:text>
+						</script>
+						<div class="paramValue" id="switcher"><xsl:text> </xsl:text></div>
+					</div>
+					<br class="clear"/>
 				</xsl:if>
 
