refactored out inline javascript.
Merge pull request #19 from stopfstedt/remove_inline_javascript

refactored out inline javascript.