Index: /main/trunk/greenstone3/web/interfaces/default/transform/classifiertools.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/classifiertools.xsl	(revision 31549)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/classifiertools.xsl	(revision 31550)
@@ -8,5 +8,7 @@
 	exclude-result-prefixes="java util gsf">
 
-  
+  <xsl:import href="map-tools.xsl"/>
+  <xsl:import href="panorama-viewer-tools.xsl"/>
+
 	<xsl:template match="classifier">
 		<xsl:param name="collName"/>
@@ -50,4 +52,5 @@
 
 
+	<!-- is this ever used either??? -->
 	<xsl:template match="documentNode">
 		<xsl:param name="collName"/>
@@ -58,4 +61,5 @@
   
 	<!-- icon + title template-->
+	<!-- is this ever used??? -->
 	<xsl:template match="classifierNode">
 		<xsl:param name="collName"/>
@@ -206,18 +210,3 @@
 	</xsl:template>
 
-	<xsl:template name="mapFeaturesIcon">
-		<td style="padding-left:5px; padding-right:5px;" valign="top">
-			<a href="javascript:focusDocument('{@nodeID}');"><img src="interfaces/{$interface_name}/images/map_marker.png"/></a>
-		</td>
-	</xsl:template>
-
-
-	<xsl:template name="panoramaViewerFeaturesIcon">
-                <td style="padding-left:5px; padding-right:5px;" valign="top">
-                        <a href="javascript:switchPanorama('{@nodeID}');">
-                                <img src="interfaces/default/images/map_marker.png"/>
-                        </a>
-                </td>
-        </xsl:template>
-
 </xsl:stylesheet>
Index: /main/trunk/greenstone3/web/interfaces/default/transform/map-tools.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/map-tools.xsl	(revision 31549)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/map-tools.xsl	(revision 31550)
@@ -8,4 +8,58 @@
 	exclude-result-prefixes="java util gsf">
 
+
+  <xsl:template name="mapFeaturesIcon">
+    <td style="padding-left:5px; padding-right:5px;" valign="top">
+      <a href="javascript:focusDocument('{@nodeID}');">
+	<img src="interfaces/default/images/map_marker.png"/>
+      </a>
+    </td>
+  </xsl:template>
+  
+  <xsl:template name="mapFeaturesJSONNodes">
+    <div id="jsonNodes" style="display:none;">
+      <xsl:text>[</xsl:text>
+      <xsl:for-each select="//documentNode">
+	<xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
+	  <xsl:text>{</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text>
+	  <xsl:value-of select="@nodeID"/>
+	  <xsl:text disable-output-escaping="yes">",</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"title":"</xsl:text>
+	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
+	  <xsl:text disable-output-escaping="yes">",</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"lat":</xsl:text>
+	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/>
+	  <xsl:text>,</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"lng":</xsl:text>
+	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
+	  <xsl:text>}</xsl:text>
+	  <xsl:if test="not(position() = count(//documentNode))">
+	    <xsl:text>,</xsl:text>
+	  </xsl:if>
+				</xsl:if>
+      </xsl:for-each>
+      <xsl:text>]</xsl:text>
+    </div>
+   
+    <!-- Although these aren't visible, they are necessary because it forces Greenstone to include this metadata in the page xml -->
+    <gsf:metadata name="Latitude" hidden="true"/>
+    <gsf:metadata name="Longitude" hidden="true"/>
+<!--  these were included in version in query. don't think we need them...
+    <gsf:metadata name="Image" hidden="true"/>
+    <gsf:metadata name="SourceFile" hidden="true"/>
+    <gsf:metadata name="assocfilepath" hidden="true"/>
+    <gsf:metadata name="PhotoType" hidden="true"/>
+    <gsf:metadata name="cv.rotation" hidden="true"/>
+    <gsf:metadata name="Angle" hidden="true"/> -->
+    
+    
+  </xsl:template>
+
+  <xsl:template name="mapFeaturesMap">
+    <div id="map_canvas" class="map_canvas_half"><xsl:text> </xsl:text></div>
+  </xsl:template>
+
+
 </xsl:stylesheet>
 
Index: /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl	(revision 31549)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl	(revision 31550)
@@ -121,5 +121,5 @@
 			</td>
 		</tr></tbody></table>
-		
+	
 		<!-- Show any documents or sub-groups in this group -->
 		<xsl:if test="documentNode|classifierNode">
@@ -156,125 +156,6 @@
 	</xsl:template>
 	
-	<xsl:template name="mapFeaturesJSONNodes">
-		<div id="jsonNodes" style="display:none;">
-			<xsl:text>[</xsl:text>
-			<xsl:for-each select="//documentNode">
-				<xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
-					<xsl:text>{</xsl:text>
-					<xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text>
-					<xsl:value-of select="@nodeID"/>
-					<xsl:text disable-output-escaping="yes">",</xsl:text>
+	
 
-					<xsl:text disable-output-escaping="yes">"title":"</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
-					<xsl:text disable-output-escaping="yes">",</xsl:text> 
-
-					<xsl:text disable-output-escaping="yes">"lat":</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/>
-					<xsl:text>,</xsl:text> 
-
-					<xsl:text disable-output-escaping="yes">"lng":</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/> 
-
-
-					<xsl:text>}</xsl:text>
-					<xsl:if test="not(position() = count(//documentNode))">
-						<xsl:text>,</xsl:text>
-					</xsl:if>
-				</xsl:if>
-			</xsl:for-each>
-			<xsl:text>]</xsl:text>
-		</div>
-		
-		<!-- Although these aren't visible, they are necessary because it forces Greenstone to include this metadata in the page xml -->
-		<gsf:metadata name="Latitude" hidden="true"/>
-		<gsf:metadata name="Longitude" hidden="true"/>
-	</xsl:template>
-	
-	<xsl:template name="mapFeaturesMap">
-	  <div id="map_canvas" class="map_canvas_half"><xsl:text> </xsl:text></div>
-	</xsl:template>
-
-	<xsl:template name="panoramaViewerFeaturesJSONNodes">
-                <div id="jsonPanoNodes" style="display:none;">
-                        <xsl:text>[</xsl:text>
-                        <xsl:for-each select="//documentNode">
-                                <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude'] and metadataList/metadata[@name = 'PhotoType']='Panorama'">
-                                        <xsl:text>{</xsl:text>
-                                        <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
-                                        <xsl:text disable-output-escaping="yes">"source":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Source']"/>"<xsl:text>,</xsl:text>
-                                        <xsl:text disable-output-escaping="yes">"lat":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/><xsl:text>,</xsl:text>
-                                        <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
-                                        <xsl:text>}</xsl:text>
-                                        <xsl:if test="not(position() = count(//documentNode))">
-                                                <xsl:text>,</xsl:text>
-                                        </xsl:if>
-                                </xsl:if>
-                        </xsl:for-each>
-                        <xsl:text>]</xsl:text>
-                </div>
-                <!-- Although these aren't visible, they are necessary because it forces Greenstone to include this metadata in the page xml -->
-                <gsf:metadata name="Latitude" hidden="true"/>
-                <gsf:metadata name="Longitude" hidden="true"/>
-                <gsf:metadata name="Image" hidden="true"/>
-                <gsf:metadata name="SourceFile" hidden="true"/>
-                <gsf:metadata name="assocfilepath" hidden="true"/>
-		<gsf:metadata name="PhotoType" hidden="true"/>
-		<gsf:metadata name="cv.rotation" hidden="true"/>
-		<gsf:metadata name="ex.Angle" hidden="true"/>
-		<gsf:metadata name="Angle" hidden="true"/>
-        
-	</xsl:template>
-	
-	<xsl:template name="panoramaViewerFeatures">
-
-
-	  <div id="asdf">
-	    <div id="pano-container" class="pano_canvas_half" style="position: relative">
-  	      <div style="position: absolute; top: 0px; right: 0px;"><a id="gofullscreen" style="background-color: #008000;" href="">Go Fullscreen</a></div>
-	      <xsl:text> </xsl:text>
-	    </div>
-	  </div>
-
-
-
-
-	  <gsf:script>
-<![CDATA[
-	    var cgiargs = '<xsl:template name="mainTemplate"> \
-		<html> \
-			<head> \
-				<xsl:call-template name="create-html-header"/> \
-			</head> \
-			\
-			<body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/> \
-				<div id="container"> \
-					<div id="gs_content"> \
-						<xsl:apply-templates select="/page"/> \
-					</div> \
-				</div> \
-			</body> \
-		</html> \
-	      </xsl:template> \
-	      \
-   	      <xsl:template match="/page/pageResponse"> \
-		<xsl:call-template name="panoramaViewerFeaturesJSONNodes"/> \
-		<div id="asdf"> \
-	          <div id="pano-container" class="pano_canvas_fullscreen"> \
-	            <xsl:text> </xsl:text> \
-	         </div> \
-	       </div> \
-	      </xsl:template>';
-
-	      // encodeURIComponent(cgiargs);
-	      // cgiargs.replace(/ /g,"%20")
-
-	      var full_url = document.location + "?ilt=" + escape(cgiargs);
-	      $('#gofullscreen').attr('href',full_url);
-]]>
-	  </gsf:script>
-
-
-	</xsl:template>
 
 	<xsl:template match="/page/xsltparams">
Index: /main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl	(revision 31549)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl	(revision 31550)
@@ -12,4 +12,6 @@
 	<!-- use the 'main' layout -->
 	<xsl:import href="layouts/main.xsl"/>
+	<xsl:import href="map-tools.xsl"/>
+	<xsl:import href="panorama-viewer-tools.xsl"/>
 
 	<xsl:include href="query-common.xsl"/>
@@ -619,4 +621,5 @@
 		<xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
 			<xsl:call-template name="mapFeaturesJSONNodes"/>
+			<xsl:call-template name="mapFeaturesMap"/>
 		</xsl:if>
 	</xsl:template>
@@ -644,61 +647,5 @@
 	</xsl:template>
 
-	<xsl:template name="mapFeaturesJSONNodes">
-		<div id="jsonNodes" style="display:none;">
-			<xsl:text>[</xsl:text>
-			<xsl:for-each select="//documentNode">
-				<xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
-					<xsl:text>{</xsl:text>
-					<xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text>
-					<xsl:value-of select="@nodeID"/>
-					<xsl:text disable-output-escaping="yes">",</xsl:text>
-					<xsl:text disable-output-escaping="yes">"title":"</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
-					<xsl:text disable-output-escaping="yes">",</xsl:text>
-					<xsl:text disable-output-escaping="yes">"lat":</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/>
-					<xsl:text>,</xsl:text>
-					<xsl:text disable-output-escaping="yes">"lng":</xsl:text>
-					<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
-					<xsl:text>}</xsl:text>
-					<xsl:if test="not(position() = count(//documentNode))">
-						<xsl:text>,</xsl:text>
-					</xsl:if>
-				</xsl:if>
-			</xsl:for-each>
-			<xsl:text>]</xsl:text>
-		</div>
-
-		<div id="map_canvas" style="margin:0px auto; width:450px; height:500px; float:right;">
-			<xsl:text> </xsl:text>
-		</div>
-
-		<!-- Although these aren't visible, they are necessary because it forces Greenstone to include this metadata in the page xml -->
-		<gsf:metadata name="Latitude" hidden="true"/>
-		<gsf:metadata name="Longitude" hidden="true"/>
-		<gsf:metadata name="Image" hidden="true"/>
-		<gsf:metadata name="SourceFile" hidden="true"/>
-                <gsf:metadata name="assocfilepath" hidden="true"/>
-		<gsf:metadata name="PhotoType" hidden="true"/>
-		<gsf:metadata name="cv.rotation" hidden="true"/>
-		<gsf:metadata name="Angle" hidden="true"/>
-
-
-	</xsl:template>
-
-	<xsl:template name="mapFeaturesIcon">
-		<td style="padding-left:5px; padding-right:5px;" valign="top">
-			<a href="javascript:focusDocument('{@nodeID}');">
-				<img src="interfaces/default/images/map_marker.png"/>
-			</a>
-		</td>
-	</xsl:template>
-
-	<xsl:template name="panoramaViewerFeaturesIcon">
-                <td style="padding-left:5px; padding-right:5px;" valign="top">
-                        <a href="javascript:switchPanorama('{@nodeID}');">
-                                <img src="interfaces/default/images/map_marker.png"/>
-                        </a>
-                </td>
-        </xsl:template>
+
+
 </xsl:stylesheet>
Index: /main/trunk/greenstone3/web/interfaces/default/transform/panorama-viewer-tools.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/panorama-viewer-tools.xsl	(revision 31549)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/panorama-viewer-tools.xsl	(revision 31550)
@@ -8,4 +8,94 @@
 	exclude-result-prefixes="java util gsf">
 
+  <xsl:template name="panoramaViewerFeaturesJSONNodes">
+    <div id="jsonPanoNodes" style="display:none;">
+      <xsl:text>[</xsl:text>
+      <xsl:for-each select="//documentNode">
+	<xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude'] and metadataList/metadata[@name = 'PhotoType']='Panorama'">
+	  <xsl:text>{</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"source":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Source']"/>"<xsl:text>,</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"lat":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/><xsl:text>,</xsl:text>
+	  <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
+	  <xsl:text>}</xsl:text>
+	  <xsl:if test="not(position() = count(//documentNode))">
+	    <xsl:text>,</xsl:text>
+	  </xsl:if>
+	</xsl:if>
+      </xsl:for-each>
+      <xsl:text>]</xsl:text>
+    </div>
+    <!-- Although these aren't visible, they are necessary because it forces Greenstone to include this metadata in the page xml -->
+    <gsf:metadata name="Latitude" hidden="true"/>
+    <gsf:metadata name="Longitude" hidden="true"/>
+    <gsf:metadata name="Image" hidden="true"/>
+    <gsf:metadata name="SourceFile" hidden="true"/>
+    <gsf:metadata name="assocfilepath" hidden="true"/>
+    <gsf:metadata name="PhotoType" hidden="true"/>
+    <gsf:metadata name="cv.rotation" hidden="true"/>
+    <gsf:metadata name="ex.Angle" hidden="true"/>
+    <gsf:metadata name="Angle" hidden="true"/>
+    
+  </xsl:template>
+  
+  <xsl:template name="panoramaViewerFeatures">
+
+    <div id="asdf">
+      <div id="pano-container" class="pano_canvas_half" style="position: relative">
+	<div style="position: absolute; top: 0px; right: 0px;"><a id="gofullscreen" style="background-color: #008000;" href="">Go Fullscreen</a></div>
+	<xsl:text> </xsl:text>
+      </div>
+    </div>
+    
+
+
+
+    <gsf:script>
+<![CDATA[
+	    var cgiargs = '<xsl:template name="mainTemplate"> \
+		<html> \
+			<head> \
+				<xsl:call-template name="create-html-header"/> \
+			</head> \
+			\
+			<body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/> \
+				<div id="container"> \
+					<div id="gs_content"> \
+						<xsl:apply-templates select="/page"/> \
+					</div> \
+				</div> \
+			</body> \
+		</html> \
+	      </xsl:template> \
+	      \
+   	      <xsl:template match="/page/pageResponse"> \
+		<xsl:call-template name="panoramaViewerFeaturesJSONNodes"/> \
+		<div id="asdf"> \
+	          <div id="pano-container" class="pano_canvas_fullscreen"> \
+	            <xsl:text> </xsl:text> \
+	         </div> \
+	       </div> \
+	      </xsl:template>';
+
+	      // encodeURIComponent(cgiargs);
+	      // cgiargs.replace(/ /g,"%20")
+
+	      var full_url = document.location + "?ilt=" + escape(cgiargs);
+	      $('#gofullscreen').attr('href',full_url);
+]]>
+    </gsf:script>
+    
+
+  </xsl:template>
+	
+
+  <xsl:template name="panoramaViewerFeaturesIcon">
+    <td style="padding-left:5px; padding-right:5px;" valign="top">
+      <a href="javascript:switchPanorama('{@nodeID}');">
+	<img src="interfaces/default/images/map_marker.png"/>
+      </a>
+    </td>
+  </xsl:template>
+
 </xsl:stylesheet>
 
