Functions in the Javascript for Uploading. Added AJAX file upload functionality.