Index: main/trunk/model-cols-dev/peijones/etc/collectionConfig.xml
===================================================================
--- main/trunk/model-cols-dev/peijones/etc/collectionConfig.xml	(revision 24962)
+++ main/trunk/model-cols-dev/peijones/etc/collectionConfig.xml	(revision 24963)
@@ -466,15 +466,11 @@
 			function saveAndBuildCollection(col)
 			{			
-				console.log("BEFORE DELETE LOOP");
 				for(var j = 0; j &lt; gs.toDeleteArray.keys.length; j++)
 				{
-					console.log("IN DELETE LOOP");
 					var current = gs.toDeleteArray[gs.toDeleteArray.keys[j]];
 					if(current == null){continue;}
 					var metaToDelete = ["user", "text", "tags"];
-					console.log("IN DELETE LOOP 1");
 					for(var l = 0; l &lt; metaToDelete.length; l++)
 					{
-					console.log("IN DELETE LOOP 2");
 						var deleteArchivesURL = "cgi-bin/metadata-server.pl?\
 							a=remove-archives-metadata&amp;\
@@ -500,16 +496,15 @@
 							metaname=gstext." + metaToDelete[l] + "&amp;\
 							metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
-							console.log("IN DELETE LOOP 3");
 						var deleteArchivesCallback = 
+						{
+							success:function(){},
+							failed: function(){alert("Failed to save text annotations archives metadata");}
+						}
+						YAHOO.util.Connect.asyncRequest("GET", deleteArchivesURL, deleteArchivesCallback);
+
+						var deleteIndexCallback =
 						{
 							success:function(){},
 							failed: function(){alert("Failed to save text annotations index metadata");}
-						}
-						YAHOO.util.Connect.asyncRequest("GET", deleteArchivesURL, deleteArchivesCallback);
-
-						var deleteIndexCallback =
-						{
-							success:function(){},
-							failed: function(){alert("Failed to save text annotations import metadata");}
 						}
 						YAHOO.util.Connect.asyncRequest("GET", deleteIndexURL, deleteIndexCallback);
@@ -623,85 +618,105 @@
 		</xsl:text>
         </script>
-      </xsl:template>
-      <xsl:template name="documentImage">
+	</xsl:template>
+	<xsl:template name="documentImage">
         <!-- Get the photo notes for this document node -->
         <gsf:variable-struct name="photoNotes">
-          <gsf:metadata multiple="true" name="gsimg.photoNote" separator=", "/>
+			<gsf:metadata multiple="true" name="gsimg.photoNote" separator=", "/>
         </gsf:variable-struct>
         <!-- Get details about the image for zooming -->
         <h3>
-          <gsf:choose-metadata>
-            <gsf:metadata name="dc.Title"/>
-            <gsf:metadata name="ex.Title"/>
-          </gsf:choose-metadata>
+			<gsf:choose-metadata>
+				<gsf:metadata name="dc.Title"/>
+				<gsf:metadata name="ex.Title"/>
+			</gsf:choose-metadata>
         </h3>
         <xsl:variable name="imageWidth">
-          <gsf:choose-metadata>
-            <gsf:metadata name="ImageWidth"/>
-            <gsf:default>-1</gsf:default>
-          </gsf:choose-metadata>
+			<gsf:choose-metadata>
+				<gsf:metadata name="ImageWidth"/>
+				<gsf:default>-1</gsf:default>
+			</gsf:choose-metadata>
         </xsl:variable>
         <xsl:variable name="imageHeight">
-          <gsf:choose-metadata>
-            <gsf:metadata name="ImageHeight"/>
-            <gsf:default>-1</gsf:default>
-          </gsf:choose-metadata>
+			<gsf:choose-metadata>
+				<gsf:metadata name="ImageHeight"/>
+				<gsf:default>-1</gsf:default>
+			</gsf:choose-metadata>
         </xsl:variable>
         <xsl:variable name="screenImageWidth">
-          <gsf:choose-metadata>
-            <gsf:metadata name="ScreenWidth"/>
-            <gsf:default>-1</gsf:default>
-          </gsf:choose-metadata>
+			<gsf:choose-metadata>
+				<gsf:metadata name="ScreenWidth"/>
+				<gsf:default>-1</gsf:default>
+			</gsf:choose-metadata>
         </xsl:variable>
         <xsl:variable name="screenImageHeight">
-          <gsf:choose-metadata>
-            <gsf:metadata name="ScreenHeight"/>
-            <gsf:default>-1</gsf:default>
-          </gsf:choose-metadata>
+			<gsf:choose-metadata>
+				<gsf:metadata name="ScreenHeight"/>
+				<gsf:default>-1</gsf:default>
+			</gsf:choose-metadata>
         </xsl:variable>
         <script type="text/javascript">
-          <xsl:text>largeImageHeight =</xsl:text>
-          <xsl:value-of select="$imageHeight"/>
-          <xsl:text>;</xsl:text>
-          <xsl:text>largeImageWidth =</xsl:text>
-          <xsl:value-of select="$imageWidth"/>
-          <xsl:text>;</xsl:text>
-          <xsl:text>smallImageHeight =</xsl:text>
-          <xsl:value-of select="$screenImageHeight"/>
-          <xsl:text>;</xsl:text>
-          <xsl:text>smallImageWidth =</xsl:text>
-          <xsl:value-of select="$screenImageWidth"/>
-          <xsl:text>;</xsl:text>
+			<xsl:text>largeImageHeight =</xsl:text>
+			<xsl:value-of select="$imageHeight"/>
+			<xsl:text>;</xsl:text>
+			<xsl:text>largeImageWidth =</xsl:text>
+			<xsl:value-of select="$imageWidth"/>
+			<xsl:text>;</xsl:text>
+			<xsl:text>smallImageHeight =</xsl:text>
+			<xsl:value-of select="$screenImageHeight"/>
+			<xsl:text>;</xsl:text>
+			<xsl:text>smallImageWidth =</xsl:text>
+			<xsl:value-of select="$screenImageWidth"/>
+			<xsl:text>;</xsl:text>
         </script>
         <div id="noZoom" style="display:block;">
-          <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
-            <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
-          </img>
-          <!--		
-					<gsf:metadata name="screenicon"/>
-					-->
+			<img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
+				<xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
+			</img>
+			<!--		
+			<gsf:metadata name="screenicon"/>
+			-->
         </div>
         <!--<xsl:if test="$imageHeight != -1">-->
         <div id="wrap" style="display:none; width: {$screenImageWidth}; height: {$screenImageHeight};">
-          <div id="small" style="width: {$screenImageWidth}; height: {$screenImageHeight};">
-            <!--
-							<gsf:metadata name="screenicon"/>
-							-->
-            <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
-              <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
-            </img>
-          </div>
-          <div id="mover">
-            <div id="overlay">
-              <xsl:text> </xsl:text>
-            </div>
-            <div id="large">
-              <img style="width: {$imageWidth}; height: {$imageHeight};">
-                <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="srclinkFile"/></xsl:attribute>
-              </img>
-            </div>
-          </div>
+			<div id="small" style="width: {$screenImageWidth}; height: {$screenImageHeight};">
+				<!--
+				<gsf:metadata name="screenicon"/>
+				-->
+				<img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
+					<xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
+				</img>
+			</div>
+			<div id="mover">
+				<div id="overlay">
+					<xsl:text> </xsl:text>
+				</div>
+				<div id="large">
+					<img style="width: {$imageWidth}; height: {$imageHeight};">
+						<xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="srclinkFile"/></xsl:attribute>
+					</img>
+				</div>
+			</div>
         </div>
-        <input onclick="AddNote();" style="margin-left:30px;" type="button" value="Tag Photo!"/>
+        <input onclick="AddNote();" style="margin-left:30px;" type="button" value="Tag Photo!"/>	
+		
+		<form action="dev" enctype="multipart/form-data" method="post">
+			<input type="hidden" name="fl">
+				<xsl:attribute name="value">
+					<xsl:text>/sites/localsite/collect/</xsl:text>
+					<xsl:value-of select="/page/pageResponse/collection/@name"/>
+					<xsl:text>/index/assoc/</xsl:text>
+					<gsf:metadata name="assocfilepath"/>
+					<xsl:text>/</xsl:text>
+					<gsf:metadata name="SourceFile"/>
+				</xsl:attribute>
+			</input>
+
+			<div>
+				Upload replacement file:<br/>
+				<input type="file" name="datafile" size="40"/><br/>
+				<input type="submit" value="Send"/>	
+			</div>
+		</form>
+
         <!--</xsl:if>-->
       </xsl:template>
