 					}
 				});
 			}
+			*/
+			function refreshWorms(tid,aid){
+				$("##RefreshWormsSpan").html('<img src="/images/indicator.gif">fetching....');
+				$.ajax({
+					url: "/component/taxonomy.cfc?queryformat=column&&=#name#",
+					type: "GET",
+					dataType: "json",
+					data: {
+						method:  "updateWormsArctosByAphiaID",
+						taxon_name_id : tid,
+						aphiaid : aid,
+						returnformat : "json"
+					},
+					success: function(r) {
+						if (r.STATUS=='success'){
+							var theLink='<span class="likeLink" onclick="reloadHash(\'WoRMSviaArctos\')">Success! click to reload</span>';
+							$("##RefreshWormsSpan").html(theLink);
+						} else {
+							var m="The request to WoRMS failed";
+							if (r.hasOwnProperty("MSG")){
+								m+=": " + r.MSG;
+							}
+							$("##RefreshWormsSpan").html(m);
+						}
+					},
+					error: function (xhr, textStatus, errorThrown){
+					    alert('Validator Error: ' + errorThrown + ': ' + textStatus + ': ' + xhr);
+					}
+				});
+			}
+
+
+
+
 			function reloadHash(a){
 				//var x=location.href.replace(location.hash,"");
 				//var x2=x+'##' + a;

					</cfif>
					<p>
						<cfloop query="notclass">
							<br>#term_type#: #term#
						</cfloop>
					</p>
					<cfif thisone.recordcount gt 0>

	<ul>
		<cfif len(taxon_name) gt 0>
			<cfif left(taxon_name,1) is "=">
				<cfset whr=whr & " and upper(taxon_name.scientific_name) = '#escapeQuotes(ucase(right(taxon_name,len(taxon_name)-1)))#'">
				<li>scientific_name IS #right(taxon_name,len(taxon_name)-1)#</li>
			<cfelseif left(taxon_name,1) is "%">
				<cfset whr=whr & " and upper(taxon_name.scientific_name) like '%#ucase(escapeQuotes(right(taxon_name,len(taxon_name)-1)))#%'">
				<li>scientific_name CONTAINS #taxon_term#</li>
			<cfelse>
				<cfset whr=whr & " and upper(taxon_name.scientific_name) like '#ucase(escapeQuotes(taxon_name))#%'">
				<li>scientific_name STARTS WITH #taxon_name#</li>
			</cfif>
		</cfif>
