Allow external scripts to access the function for setting error messages.
Added brief documentation in the HTML.
Added minified version of the JS file.