     	output = "#csv#"
     	addNewLine = "no">
 	<cflocation url="/download.cfm?file=LocalityResults.csv" addtoken="false">
-
 </cfif>
 <!---------------------------------------------------------------------------------------------------->
 <cfif action is "findLocality">
-
 	<script>
 		jQuery(document).ready(function() {
 			$.each($("div[id^='mapgohere-']"), function() {

		<cflocation url="Locality.cfm?Action=findCollEvent&locality_id=#locality_id#" addtoken="false">
	</cfoutput>
</cfif>
<cfif action is "csv">
	<cfdump var=#url#>
	<cf_findLocality type="locality">


	<cfset  util = CreateObject("component","component.utilities")>
	<cfset csv = util.QueryToCSV2(Query=localityResults,Fields=localityResults.columnlist)>
	<cffile action = "write"

	</script>

<cfoutput>
	<form name="csv" method="post" action="Locality.cfm">
		<input type="hidden" name="action" value="csv">
		<cfloop list="#StructKeyList(form)#" index="key">
			<cfif len(form[key]) gt 0 and key is not "action">
				<input type="hidden" name="#key#" value ="#form[key]#">
			</cfif>
		</cfloop>
		<input type="submit" value="getCSV">
	</form>
	<cf_findLocality type="locality">
	<cfset title="Locality Search Results">
	<cfif localityResults.recordcount lt 1000>
