Initial Commit

Added the JS code as used in the original app.