Use document.getElementById
Fix spacing and indentation
Use # instead of javascript:void(0)
Add semicolons and fix spacing
Simplify switch
Merge pull request #724 from mc10/minor-fixes

Minor fixes