 				function (r) {
 					if (r.toString().substring(0,5)=='ERROR'){
 						setStatus(r,'err');
+					} else if (r.length==0){
+						setStatus('Search found nothing','err');
 					} else {
 						//console.log(r);
 						//myTree.parse(r, "jsarray");

			$( "#srchBtn" ).click(function() {
				performSearch();
			});
		});
		// end ready function

	</script>
	<input id="tttest">
	<p>
		<strong>Doubleclick</strong> terms to expand.
		<br><strong>Check</strong> the box to edit.
		<br><strong>Drag</strong> to re-order.
		<br><strong>Rightclick</strong> to close a node.
		<br>All edits propagate to all children.
	</p>
	<p style="width:70%">
		IMPORTANT: This form cannot deal with homonyms of any form. You will most likely find these by the presence of weird higher taxonomy.
		If you simply "fix" these, they (and their children!) are exceedingly likely to be subsequently "fixed" by collections using the
		homonym in different ways. Coordinate updates, which may require splitting classifications.
	</p>
	<p style="width:70%">
		Search is case-sensitive contains;
		<br>"<strong>Mus</strong>" finds "<strong>Mus</strong>" and "<strong>Mus</strong>tela";
		<br>"<strong>mus</strong>" finds "Microtus oecono<strong>mus</strong>, NOT "Mustela" (but will find "Mustela <strong>mus</strong>tela").
		 <br>Large searches may be slow, and possibly cause local memory problem (but "mus" in Insecta
		 returned 20K usable results in 30s on test).
		 <br>Re-searching while a previous search is still "working" can cause strange behavior.
	</p>
	<label for="srch">search <cfoutput>#dataset_name#</cfoutput></label>
	<input id="srch">
	<input type="button" value="search" id="srchBtn">

				</li>
			</ul>
		</p>
		<table border>
			<tr>
				<th>Status</th>
				<th>Term</th>
				<th>Arctos Taxonomy</th>
				<th>Tree</th>
			</tr>
			<cfloop query="d">
				<tr>
					<td>#status#</td>
					<td>#scientific_name#</td>
					<td><a href="/name/#scientific_name#" target="_blank">Arctos Taxonomy (new tab)</a></td>
					<td><a href="/tools/taxonomyTree.cfm?action=manageLocalTree&dataset_name=#dataset_name#&autosearch=#scientific_name#" target="_blank">tree (new tab)</a></td>
				</tr>
			</cfloop>
		</table>
	</cfoutput>
</cfif>
<!------------------------------------------------------------------------------------------------->

<cfif action is "deleteDataset">
	<cfoutput>
		<p>
			Are you sure you want to DELETE dataset #dataset_name#? This cannot be undone!
		</p>
		<p>
			<a href="taxonomyTree.cfm?action=srslydeleteDataset&dataset_name=#dataset_name#">Yes, continue to delete #dataset_name#</a>
		</p>

	</cfoutput>

</cfif><!------------------------------------------------------------------------------------------------->

<cfif action is "srslydeleteDataset">
	<cfoutput>
	<cfquery name="d" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		select * from htax_dataset where dataset_name='#dataset_name#'
