 </cfif>
 <cfif action is "getFile">
 <cfoutput>
-
 	<cfset outfilename=form.fileName>
 	<cfset inExt=listlast(outfilename,".")>
 	<cfset outfilename=replace(outfilename,inExt,"wkt")>
-
 	<cffile action="READ" file="#FiletoUpload#" variable="fileContent">
-	<cfdump var=#form#>
-
-<hr>
-
 	<cfset fileContent=replace(fileContent,",","|","all")>
 	<cfset fileContent=replace(fileContent," ","!","all")>
 	<cfset fileContent=replace(fileContent,"<Polygon><outerBoundaryIs><LinearRing><coordinates>","POLYGON((","all")>

<cfinclude template="/includes/_header.cfm">
<cfif action is "nothing">


<script type="text/javascript">
function PassFileName()
{
document.getElementById("fileName").value=document.getElementById("FiletoUpload").value;
}
</script>




	upload Fusion Tables KML
	<form name="atts" method="post" enctype="multipart/form-data">
		<input type="hidden" name="Action" value="getFile">

	<cfset fileContent=replace(fileContent," 0.0))","))","all")>


	<cffile action = "write"
	    file = "#Application.webDirectory#/download/#outfilename#"
    	output = "#fileContent#"
    	addNewLine = "no">
	<cflocation url="/download.cfm?file=#outfilename#" addtoken="false">
</cfoutput>
</cfif>
<cfinclude template="/includes/_footer.cfm">