function TestGPSFileType() {
	var fileName = $('gps_data_gps').getValue().toLowerCase();
	var fileTypes = new Array();
	fileTypes.push(".gpx")

	if (!fileName) return;

	dots = fileName.split(".")
	//get the part AFTER the LAST period.
	fileType = "." + dots[dots.length-1];

	if (fileTypes.join(".").indexOf(fileType) == -1){
		alert("Please only upload files that end in types: \n\n" + (fileTypes.join(" .")) + "\n\nPlease select a new file and try again.");
	}
}

function TestScanToolFileType() {
	var fileName = $('scan_tool_data_scan_tool').getValue().toLowerCase();
	var fileTypes = new Array();
	fileTypes.push(".txt")

	if (!fileName) return;

	dots = fileName.split(".")
	//get the part AFTER the LAST period.
	fileType = "." + dots[dots.length-1];

	if (fileTypes.join(".").indexOf(fileType) == -1){
		alert("Please only upload files that end in types: \n\n" + (fileTypes.join(" .")) + "\n\nPlease select a new file and try again.");
	}
}
