Index: /main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/transform/pages/document.xsl
===================================================================
--- /main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/transform/pages/document.xsl	(revision 30458)
+++ /main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/transform/pages/document.xsl	(revision 30459)
@@ -142,22 +142,32 @@
 
 							
-							<div class="editable-menu" id="pagemenu" onmouseout="javascript:return musicStand.hidePageMenu(this,event);" style="position: absolute; right: 4px; bottom: 2px;        z-index: 10; visibility: hidden;">
-								<font size="-1">
-									<div class="pagemenu" id="pagemenu1">Cancel turn</div>
-									<div class="pagemenu" id="pagemenu2">Next page</div>
-									<div class="pagemenu" id="pagemenu3">Previous page</div>
-								</font>
-							</div>
-							<div id="annotateCanvas" style="position: absolute;             left: 0px; top: 0px;             visibility: visible;             z-index: 2;"/>
-						</td>
-						<td>
-							<div id="slidercontainer" style="background: white; position: relative; left: 0px; top: 0px; width: 40px; height: {$cgiParamPageHeight}px;">
-								<div id="sliderbg">
-									<div id="slidertrackabove" style="position: absolute; left: 8px; top: 0px; width: 4px; height: 500px; z-index:4; background-color:#606060;">									</div>									<div id="slidertrackbelow" style="position: absolute;                         left: 10px; top: 500px;                        width: 1px; height: 100px;          z-index:4;           background-color:#606060;">									</div>								</div>
-								<div id="sliderpos" style="width:30px; height:11px;">
-									<img height="11" src="{$httpCollection}/images/brown2-slider.png" width="30"/>
-								</div>
-								<script language="javascript" type="text/javascript">
-									<xsl:text disable-output-escaping="yes">var username = musicStand.getUsername();
+              <div class="editable-menu" id="pagemenu" onmouseout="javascript:return musicStand.hidePageMenu(this,event);" style="position: absolute; right: 4px; bottom: 2px;        z-index: 10; visibility: hidden;">
+		<font size="-1">
+		  <div class="pagemenu" id="pagemenu1">Cancel turn</div>
+		  <div class="pagemenu" id="pagemenu2">Next page</div>
+		  <div class="pagemenu" id="pagemenu3">Previous page</div>
+		</font>
+	      </div>
+	      
+	      <div id="annotateCanvas" style="position: absolute; left: 0px; top: 0px; visibility: visible; z-index: 2;" >
+		<!-- filler -->
+	      </div>
+	    </td>
+	    <td>
+	      <div id="slidercontainer" style="background: white; position: relative; left: 0px; top: 0px; width: 40px; height: {$cgiParamPageHeight}px;">
+		<div id="sliderbg">
+		  <div id="slidertrackabove" style="position: absolute; left: 8px; top: 0px; width: 4px; height: 500px; z-index:4; background-color:#606060;">
+		    <!-- filler -->
+		  </div>
+		  <div id="slidertrackbelow" style="position: absolute; left: 10px; top: 500px; width: 1px; height: 100px; z-index:4; background-color:#606060;">
+		    <!-- filler -->
+		  </div>
+		</div>
+		
+		<div id="sliderpos" style="width:30px; height:11px;">
+		  <img height="11" src="{$httpCollection}/images/brown2-slider.png" width="30"/>
+		</div>
+		<script language="javascript" type="text/javascript">
+		  <xsl:text disable-output-escaping="yes">var username = musicStand.getUsername();
 	  var metaval;
 
@@ -198,20 +208,15 @@
 	  var trackbelow = document.getElementById('slidertrackbelow');
 	  trackbelow.style.top = speedBreak + "px";
-	  trackbelow.style.height = (gs.cgiParams["pageHeight"] - speedBreak) + "px";</xsl:text>
-								</script>
-							</div>
-						</td>
-					</tr>
-				      </table>
-<!--				      
-				<script type="text/javascript">bodyLoaded();</script>
--->
+	  trackbelow.style.height = (gs.cgiParams["pageHeight"] - speedBreak) + "px";
+		  </xsl:text>
+		</script>
+	      </div>
+	    </td>
+         </tr>
+        </table>
 					  
-					  
-					</div>
-				</div>
-
-			
-			</xsl:template>
+      </div>
+    </div>
+  </xsl:template>
 
 
@@ -221,29 +226,29 @@
 
   
-	<xsl:template name="wrappedDocumentXXX">
-		<xsl:choose>
-			<!-- NOTE: alb = ajax load bypass -->
-			<!-- 
-				If the docType is hierarchy and we want to bypass the ajax load then do this 
-				OR If the docType is hierarchy and we have asked for the expanded document OR we have asked for the top level document then do this 
-			-->
-			<xsl:when test="/page/pageResponse/document/@docType = 'hierarchy' and (/page/pageRequest/paramList/param[@name = 'alb']/@value = '1' or (string-length(/page/pageRequest/paramList/param[@name = 'd']/@value) > 0 and (/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or not(util:contains(/page/pageResponse/document/@selectedNode, '.')))))">
-				<div id="gs-document">
-					<xsl:call-template name="documentPre"/>
-					<div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
-						<xsl:for-each select="documentNode">
-							<xsl:call-template name="wrapDocumentNodes"/>
-						</xsl:for-each>
-					</div>
-				</div>
-			</xsl:when>
-			<xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'">
-				<div id="gs-document">							
-					<div id="tocLoadingImage" style="text-align:center;">
-						<img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
-					</div>
-				</div>
-				<script type="text/javascript">
-					<xsl:text disable-output-escaping="yes">
+  <xsl:template name="wrappedDocumentXXX">
+    <xsl:choose>
+      <!-- NOTE: alb = ajax load bypass -->
+      <!-- 
+	   If the docType is hierarchy and we want to bypass the ajax load then do this 
+	   OR If the docType is hierarchy and we have asked for the expanded document OR we have asked for the top level document then do this 
+      -->
+      <xsl:when test="/page/pageResponse/document/@docType = 'hierarchy' and (/page/pageRequest/paramList/param[@name = 'alb']/@value = '1' or (string-length(/page/pageRequest/paramList/param[@name = 'd']/@value) > 0 and (/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or not(util:contains(/page/pageResponse/document/@selectedNode, '.')))))">
+	<div id="gs-document">
+	  <xsl:call-template name="documentPre"/>
+	  <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
+	    <xsl:for-each select="documentNode">
+	      <xsl:call-template name="wrapDocumentNodes"/>
+	    </xsl:for-each>
+	  </div>
+	</div>
+      </xsl:when>
+      <xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'">
+	<div id="gs-document">							
+	  <div id="tocLoadingImage" style="text-align:center;">
+	    <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
+	  </div>
+	</div>
+	<script type="text/javascript">
+	  <xsl:text disable-output-escaping="yes">
 						$(window).load(function()
 						{
@@ -262,15 +267,15 @@
 							loadTopLevelPage(callbackFunction, url);
 						});
-					</xsl:text>
-				</script>
-			</xsl:when>
-			<xsl:otherwise>
-				<div id="gs-document">							
-					<div id="tocLoadingImage" style="text-align:center;">
-						<img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
-					</div>
-				</div>
-				<script type="text/javascript">
-					<xsl:text disable-output-escaping="yes">
+	  </xsl:text>
+	</script>
+      </xsl:when>
+      <xsl:otherwise>
+	<div id="gs-document">							
+	  <div id="tocLoadingImage" style="text-align:center;">
+	    <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
+	  </div>
+	</div>
+	<script type="text/javascript">
+	  <xsl:text disable-output-escaping="yes">
 						$(window).load(function()
 						{
@@ -292,13 +297,11 @@
 							});
 						});
-					</xsl:text>
-				</script>
-			</xsl:otherwise>
-		</xsl:choose>
+	  </xsl:text>
+	</script>
+      </xsl:otherwise>
+    </xsl:choose>
 		
-		<div class="clear"><xsl:text> </xsl:text></div>
-	</xsl:template>
-
-
+    <div class="clear"><xsl:text> </xsl:text></div>
+  </xsl:template>
 	
 </xsl:stylesheet>
