<script>
	function getFileExtension(filename) {
		return ((/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined).toString().toLowerCase();
	}
</script>