Use === (triple equals)
Use dot notation rather than ["foo"]
Use !== to compare with null
parseInt should always be given a radix.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt
Make conditionals more readable.
Merge pull request #3 from mathias/javascript_style

Javascript style fixes