Index: lib/style/skins/sanparks/knp-login.xsl
===================================================================
--- lib/style/skins/sanparks/knp-login.xsl	(revision 4005)
+++ lib/style/skins/sanparks/knp-login.xsl	(revision 4006)
@@ -32,6 +32,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
   <xsl:output method="html"/>
+  <xsl:param name="contextURL"/>
+  <xsl:param name="cgi-prefix"/>
   <xsl:param name="qformat">sanparks</xsl:param>
   <xsl:template match="/">
    <html>
@@ -44,16 +46,18 @@
                 src="{$contextURL}/style/common/branding.js" />
       </head>
 
-      <script language="JavaScript">
-          insertTemplateOpening("{$contextURL}");
-          insertSearchBox("{$contextURL}");
-      </script>
+     <script language="JavaScript">
+       <![CDATA[
+          insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+          insertSearchBox("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+         ]]>
+     </script>
       <xsl:if test="count(login) &gt; 0">
- <script language="JavaScript">
-           <![CDATA[
-		function search(){
-		location.href = "{$contextURL}/style/skins/sanparks";
-        }]]>
+        <script language="JavaScript">
+          <![CDATA[
+            function search(){
+                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA[/register-dataset.cgi?cfg=sanparks";
+            }]]>
         </script>
         <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="timerID=setTimeout('search()',2000)">
           <p class="text_plain">Welcome <xsl:value-of select="login/name"/>. You will be automatically redirected to the homepage</p>
@@ -65,11 +69,13 @@
           <p class="text_plain"><xsl:value-of select="unauth_login/message" /></p>
     	</body>
       </xsl:if>
-      <p class="text_plain">Return to the <a href="{$contextURL}/style/skins/knp" target="_top">homepage</a>.
+      <p class="text_plain">Return to the <a href="{$contextURL}/style/skins/sanparks" target="_top">homepage</a>.
       </p>
-      <script language="JavaScript">
-          insertTemplateClosing("{$contextURL}");
-      </script>
+     <script language="JavaScript">
+       <![CDATA[
+          insertTemplateClosing("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+         ]]>
+     </script>
     </html>
     </xsl:template>
 
Index: lib/style/skins/sanparks/sanparks.css
===================================================================
--- lib/style/skins/sanparks/sanparks.css	(revision 4005)
+++ lib/style/skins/sanparks/sanparks.css	(revision 4006)
@@ -619,12 +619,12 @@
 	font-size: 12px;
 }
 .sectbody {
-	background: #DEF1F1;
+	background: #FFFFFF;
 	font-size: 12px;
         font-weight: bold;}
 
 .sectheader {
-	background: #A3DADA;
+	background: #CFE2CF;
 	font-size: 12px;
         font-weight: bold;}
 
Index: lib/style/skins/kepler/resultset.xsl
===================================================================
--- lib/style/skins/kepler/resultset.xsl	(revision 4005)
+++ lib/style/skins/kepler/resultset.xsl	(revision 4006)
@@ -42,6 +42,8 @@
   <xsl:param name="qformat">default</xsl:param>
   <xsl:param name="enableediting">false</xsl:param>
   <xsl:param name="contextURL"/>
+  <xsl:param name="httpServer"/>
+  
 
   <xsl:template match="/">
     <html xml:lang="en-US">
@@ -112,7 +114,7 @@
 
 .dl
 {
-    background: #eeeeee url({$contextURL}/style/skins/<xsl:value-of select="$qformat"/>/download2.png) 2px center no-repeat;
+    background: #eeeeee url(<xsl:value-of select="contextURL"/>/style/skins/<xsl:value-of select="$qformat"/>/download2.png) 2px center no-repeat;
     border: 1px solid black;
     font-weight: bold;
     text-decoration: none;
@@ -291,7 +293,7 @@
                   <td class="text_plain">
                     <a class="dl">
                       <xsl:attribute name="href">
-                        <xsl:text>http://{$httpServer}/authority/data?lsid=</xsl:text>
+                        <xsl:value-of select="$httpServer"/><xsl:text>/authority/data?lsid=</xsl:text>
                         <xsl:value-of select="./param[@name=concat('entity/property[@name=', $sq, 'karId', $sq, ']/@value')]"/>
                       </xsl:attribute>
 
Index: lib/style/skins/kepler/entity.xsl
===================================================================
--- lib/style/skins/kepler/entity.xsl	(revision 4005)
+++ lib/style/skins/kepler/entity.xsl	(revision 4006)
@@ -41,6 +41,8 @@
   <xsl:param name="sessid"/>
   <xsl:param name="qformat">default</xsl:param>
   <xsl:param name="enableediting">false</xsl:param>
+  <xsl:param name="contextURL"/>
+  <xsl:param name="httpServer"/>
 
   <xsl:template match="/">
     <html xml:lang="en-US">
@@ -158,7 +160,7 @@
 
               <div style="text-align: center;">
                 <a>
-                  <xsl:attribute name="href">http://@httpserver@/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute>
+                  <xsl:attribute name="href"><xsl:value-of select="$httpServer"/>/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute>
                   <xsl:text>Download</xsl:text>
                 </a>
               </div>
Index: lib/style/skins/obfs/spatial/map.jsp
===================================================================
--- lib/style/skins/obfs/spatial/map.jsp	(revision 4005)
+++ lib/style/skins/obfs/spatial/map.jsp	(revision 4006)
@@ -35,16 +35,16 @@
 <head>
 <title>Metacat Spatial Option Demo</title>
 
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/skin/default/button.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/button.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
 
 <script type="text/javascript">
   var mbConfigUrl="config.xml";
 </script>
 
-<script type="text/javascript" src="<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/Mapbuilder.js"></script>
+<script type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/Mapbuilder.js"></script>
 </head>
 <body onload="mbDoLoad()">
 
@@ -54,7 +54,7 @@
               <div id="mainMapPane" style="background-color:#b8d5f5;" />
               <div id="loading">
                <p> Loading Map
-                <img src="<%=STYLE_SKINS_URL%>/obfs/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
+                <img src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
                </p>
              </div>
             </td>
@@ -76,10 +76,10 @@
                                           <!-- <tr><td colspan="2" align="right" id="scalebar"/> </tr> -->
                                           <tr> 
                                            <td colspan="2" align="right" style="font-size:8pt;"> 
-                                             <a style="text-decoration:none;" href="<%=STYLE_SKINS_URL%>/obfs/spatial/kml.jsp">
+                                             <a style="text-decoration:none;" href="<%=SERVER_URL_WITH_CONTEXT%>/spatial/kml.jsp">
                                                <br/> 
                                                Download Google Earth KML
-                                               <img border="0" src="<%=STYLE_SKINS_URL%>/obfs/style/images/kml.gif">
+                                               <img border="0" src="<%=SERVER_URL_WITH_CONTEXT%>/style/images/kml.gif">
                                              </a>
                                            </td>
                                           </tr> 
Index: lib/style/skins/nceas/nceas.css
===================================================================
--- lib/style/skins/nceas/nceas.css	(revision 4005)
+++ lib/style/skins/nceas/nceas.css	(revision 4006)
@@ -385,7 +385,12 @@
     border: solid black 1px;
     border-bottom: none;
 }
-	
+
+/* override default td sizing specified in EML css */
+.regular td {
+    font-size: 87.5%;
+}
+
 .hide {
       display:none;
   }
@@ -416,6 +421,22 @@
        text-align: right;
     }
 
+.rightCol a {
+    border-bottom: none;
+}
+
+.rightCol img {
+    margin: 0px;
+}
+
+
+.centerContentBorder {
+        padding-left: 5px;
+        padding-right: 5px;
+        width: 98%;
+}
+
+
 /**
  *  This is add to overload the p+p function defined in eml.css.
  *  Refer to bug# 1306 for further details. 
Index: lib/style/skins/nceas/index.jsp
===================================================================
--- lib/style/skins/nceas/index.jsp	(revision 4005)
+++ lib/style/skins/nceas/index.jsp	(revision 4006)
@@ -74,7 +74,7 @@
 <p class="intro">A number of the data sets were synthesized from multiple data sources that originated from the efforts of many contributors, while others originated from a single investigator. Credit for the data sets in this repository goes to the investigators who collected the data, as well as to the NCEAS working groups and scientists who compiled the data for synthetic purposes. See each data package for a list of the people and institutions involved. </p>
 <p class="intro"> If you have any questions, comments or problems, please contact the repository administrator at <a href="mailto:help@nceas.ucsb.edu">help@nceas.ucsb.edu</a> </p>
 <br>
-<table class="tables" cellpadding="8" cellspacing="0">
+<table class="tables regular" cellpadding="8" cellspacing="0">
   <tr class="sectheader">
     <td class="borderbottom"><a name="search" ></a>
         <p align="center" class="largetext"> Search for Data Sets </p></td>
@@ -119,7 +119,7 @@
 <a href="<%=STYLE_SKINS_URL%>/nceas/map.jsp"> View Interactive Map </a> </div>
 </td></tr></table>
 <br><br>
-<table class="tables" cellpadding="8" cellspacing="0">
+<table class="tables regular" cellpadding="8" cellspacing="0">
   <tr class="sectheader">
     <td class="borderbottom" colspan="2" align="left"><span class="label"> </span>
         <p align="center" class="largetext"> Register information about a new NCEAS data set </p></td>
Index: lib/style/skins/nceas/nceas-login.xsl
===================================================================
--- lib/style/skins/nceas/nceas-login.xsl	(revision 4005)
+++ lib/style/skins/nceas/nceas-login.xsl	(revision 4006)
@@ -47,7 +47,7 @@
          <script language="JavaScript">
          <![CDATA[
             function search(){
-                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA["/register-dataset.cgi?cfg=nceas";
+                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA[/register-dataset.cgi?cfg=nceas";
             }]]>
          </script>
       </head>
Index: lib/style/skins/nceas/nceas.js
===================================================================
--- lib/style/skins/nceas/nceas.js	(revision 4005)
+++ lib/style/skins/nceas/nceas.js	(revision 4006)
@@ -1,4 +1,4 @@
- /*
+/*
   *   '$RCSfile$'
   *     Purpose: Default style sheet for KNB project web pages 
   *              Using this stylesheet rather than placing styles directly in 
Index: lib/style/skins/nrs/spatial/map.jsp
===================================================================
--- lib/style/skins/nrs/spatial/map.jsp	(revision 4005)
+++ lib/style/skins/nrs/spatial/map.jsp	(revision 4006)
@@ -35,16 +35,16 @@
 <head>
 <title>Metacat Spatial Option Demo</title>
 
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/skin/default/button.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/button.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
 
 <script type="text/javascript">
   var mbConfigUrl="config.xml";
 </script>
 
-<script type="text/javascript" src="<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/Mapbuilder.js"></script>
+<script type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/Mapbuilder.js"></script>
 </head>
 <body onload="mbDoLoad()">
 
@@ -54,7 +54,7 @@
               <div id="mainMapPane" style="background-color:#b8d5f5;" />
               <div id="loading">
                <p> Loading Map
-                <img src="<%=STYLE_SKINS_URL%>/nrs/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
+                <img src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
                </p>
              </div>
             </td>
@@ -76,10 +76,10 @@
                                           <!-- <tr><td colspan="2" align="right" id="scalebar"/> </tr> -->
                                           <tr> 
                                            <td colspan="2" align="right" style="font-size:8pt;"> 
-                                             <a style="text-decoration:none;" href="<%=STYLE_SKINS_URL%>/nrs/spatial/kml.jsp">
+                                             <a style="text-decoration:none;" href="<%=SERVER_URL_WITH_CONTEXT%>/spatial/kml.jsp">
                                                <br/> 
                                                Download Google Earth KML
-                                               <img border="0" src="<%=STYLE_SKINS_URL%>/nrs/style/images/kml.gif">
+                                               <img border="0" src="<%=SERVER_URL_WITH_CONTEXT%>/style/images/kml.gif">
                                              </a>
                                            </td>
                                           </tr> 
Index: lib/style/skins/saeon/saeon-login.xsl
===================================================================
--- lib/style/skins/saeon/saeon-login.xsl	(revision 4005)
+++ lib/style/skins/saeon/saeon-login.xsl	(revision 4006)
@@ -32,6 +32,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
   <xsl:output method="html"/>
+  <xsl:param name="contextURL"/>
+  <xsl:param name="cgi-prefix"/>
   <xsl:param name="qformat">saeon</xsl:param>
   <xsl:template match="/">
    <html>
@@ -45,15 +47,17 @@
       </head>
 
       <script language="JavaScript">
-          insertTemplateOpening("{$contextURL}");
-          insertSearchBox("{$contextURL}");
-      </script>
+		<![CDATA[
+		   insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+		   insertSearchBox("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+		  ]]>
+     </script>
       <xsl:if test="count(login) &gt; 0">
- <script language="JavaScript">
-           <![CDATA[
-		function search(){
-		location.href = "{$contextURL}/style/skins/saeon";
-        }]]>
+      	<script language="JavaScript">
+          <![CDATA[
+            function search(){
+                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA[/register-dataset.cgi?cfg=saeon";
+            }]]>
         </script>
         <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="timerID=setTimeout('search()',2000)">
           <p class="text_plain">Welcome <xsl:value-of select="login/name"/>. You will be automatically redirected to the homepage</p>
@@ -65,11 +69,13 @@
           <p class="text_plain"><xsl:value-of select="unauth_login/message" /></p>
     	</body>
       </xsl:if>
-      <p class="text_plain">Return to the <a href="{$contextURL}/style/skins/knp" target="_top">homepage</a>.
+      <p class="text_plain">Return to the <a href="{$contextURL}/style/skins/saeon" target="_top">homepage</a>.
       </p>
       <script language="JavaScript">
-          insertTemplateClosing("{$contextURL}");
-      </script>
+       <![CDATA[
+          insertTemplateClosing("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+         ]]>
+     </script>
     </html>
     </xsl:template>
 
Index: lib/style/skins/saeon/saeon.css
===================================================================
--- lib/style/skins/saeon/saeon.css	(revision 4005)
+++ lib/style/skins/saeon/saeon.css	(revision 4006)
@@ -454,12 +454,12 @@
 	font-size: 12px;
 }
 .sectbody {
-	background: #DEF1F1;
+	background: #FFFFFF;
 	font-size: 12px;
         font-weight: bold;}
 
 .sectheader {
-	background: #A3DADA;
+	background: #A6C2A5;
 	font-size: 12px;
         font-weight: bold;}
 
Index: lib/style/skins/esa/esa-login.xsl
===================================================================
--- lib/style/skins/esa/esa-login.xsl	(revision 4005)
+++ lib/style/skins/esa/esa-login.xsl	(revision 4006)
@@ -33,6 +33,7 @@
 
   <xsl:output method="html"/>
   <xsl:param name="qformat">default</xsl:param>
+  <xsl:param name="contextURL"/>
   <xsl:template match="/">
    <html>
       <head>
@@ -44,15 +45,18 @@
                 src="./style/common/branding.js" />
       </head>
 
-      <script language="JavaScript">
-          insertTemplateOpening("{$contextURL}");
-          insertSearchBox("{$contextURL}");
-      </script>
+     <script language="JavaScript">
+       <![CDATA[
+          insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+          insertSearchBox("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+         ]]>
+     </script>
       <xsl:if test="count(login) &gt; 0">
       <xsl:choose>
       <xsl:when test="count(login/isModerator) &gt; 0">
            <script language="JavaScript">
-	   <![CDATA[function search(){
+           <![CDATA[
+	   function search(){
 		var searchForm = document.getElementById("search-form");
 		var queryInput = document.createElement("input");
         	queryInput.setAttribute("type", "hidden");
@@ -60,7 +64,8 @@
         	queryInput.setAttribute("value", "<pathquery version=\"1.2\"><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator=\"INTERSECT\"><queryterm searchmode=\"not-contains\" casesensitive=\"false\"><value>public</value><pathexpr>dataset/access/allow/principal</pathexpr></queryterm><queryterm searchmode=\"not-contains\" casesensitive=\"false\"><value>Revision Requested</value><pathexpr>additionalMetadata/moderatorComment</pathexpr></queryterm></querygroup></pathquery>");
 		searchForm.appendChild(queryInput);	
 		searchForm.submit();
-	}]]>
+    };
+    ]]>
         </script>
       	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="timerID=setTimeout('search()',20)">
           <p class="text_plain">Welcome <xsl:value-of select="login/name"/>. You are now logged in as moderator.</p>
@@ -69,6 +74,7 @@
 		<input type="hidden" name="qformat" value="esa"/>
 		<input type="hidden" name="enableediting" value="true"/>
 		<input type="hidden" name="message" value="You are now logged in as moderator."/>
+    <input type="submit" name="submit query"/>
 	</form>
     	</body>
       </xsl:when>
@@ -94,8 +100,11 @@
       <p class="text_plain">Return to the <a href="./style/skins/esa/" target="_top">Registry home</a>.
       </p>
       <script language="JavaScript">
-          insertTemplateClosing("{$contextURL}");
+       <![CDATA[
+          insertTemplateClosing("]]<xsl:value-of select="$contextURL" /><![CDATA[");
+          ]]>
       </script>
+
     </html>
     </xsl:template>
 
Index: lib/style/skins/esa/spatial/map.jsp
===================================================================
--- lib/style/skins/esa/spatial/map.jsp	(revision 4005)
+++ lib/style/skins/esa/spatial/map.jsp	(revision 4006)
@@ -35,16 +35,16 @@
 <head>
 <title>Metacat Spatial Option Demo</title>
 
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/skin/default/button.css'>
-<link rel='StyleSheet' type='text/css' href='<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/docsStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/mapStyle.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/button.css'>
+<link rel='StyleSheet' type='text/css' href='<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/scalebar-fat.css'>
 
 <script type="text/javascript">
   var mbConfigUrl="config.xml";
 </script>
 
-<script type="text/javascript" src="<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/Mapbuilder.js"></script>
+<script type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/Mapbuilder.js"></script>
 </head>
 <body onload="mbDoLoad()">
 
@@ -54,7 +54,7 @@
               <div id="mainMapPane" style="background-color:#b8d5f5;" />
               <div id="loading">
                <p> Loading Map
-                <img src="<%=STYLE_SKINS_URL%>/esa/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
+                <img src="<%=SERVER_URL_WITH_CONTEXT%>/spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
                </p>
              </div>
             </td>
@@ -76,10 +76,10 @@
                                           <!-- <tr><td colspan="2" align="right" id="scalebar"/> </tr> -->
                                           <tr> 
                                            <td colspan="2" align="right" style="font-size:8pt;"> 
-                                             <a style="text-decoration:none;" href="<%=STYLE_SKINS_URL%>/esa/spatial/kml.jsp">
+                                             <a style="text-decoration:none;" href="<%=SERVER_URL_WITH_CONTEXT%>/spatial/kml.jsp">
                                                <br/> 
                                                Download Google Earth KML
-                                               <img border="0" src="<%=STYLE_SKINS_URL%>/esa/style/images/kml.gif">
+                                               <img border="0" src="<%=SERVER_URL_WITH_CONTEXT%>/style/images/kml.gif">
                                              </a>
                                            </td>
                                           </tr> 
Index: lib/style/skins/esa/esa-resultset.xsl
===================================================================
--- lib/style/skins/esa/esa-resultset.xsl	(revision 4005)
+++ lib/style/skins/esa/esa-resultset.xsl	(revision 4006)
@@ -33,6 +33,7 @@
   <xsl:output method="html"/>
   <xsl:param name="cgi-url" select='string("")'/>
   <xsl:param name="sessid"/>
+  <xsl:param name="contextURL"/>
   <xsl:param name="qformat">default</xsl:param>
   <xsl:param name="enableediting">false</xsl:param>
   <xsl:param name="isModerator">false</xsl:param>
@@ -64,12 +65,12 @@
       </head>
 
       <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-      <script language="JavaScript">
+        <script language="JavaScript">
           <![CDATA[
-          insertTemplateOpening("{$contextURL}");
-          insertSearchBox("{$contextURL}");
-          ]]>
-      </script>
+          insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+          insertSearchBox("]]><xsl:value-of select="$contextURL" /><![CDATA[");
+         ]]>
+        </script>
         <table width="100%" align="center" border="0" cellpadding="2" cellspacing="0">
            <tr>
              <td align="left"><br></br><p class="emphasis"><xsl:value-of select="$message"/><br></br><xsl:number value="count(resultset/document)" /> data set(s) found <xsl:if test="$enableediting ='true' and $isModerator = 'true'">for moderation</xsl:if></p></td>
@@ -140,7 +141,7 @@
                </form>
 	      </xsl:when>
 	      <xsl:otherwise>
-		 <form action="{$servletURL}" method="POST">
+		 <form action="{$contextURL}/metacat" method="POST">
                  <xsl:attribute name="name">
                    <xsl:value-of select="translate(./docid, '()-.', '____')" />
                  </xsl:attribute>
