As a professional programmer, you'll wind up dealing with some very hairy JavaScript. This challenge asks you to take some rather nasty procedural code and refactor it to object oriented JavaScript.
Feel free to use ruby-esque pseudocode to help you break down the problems.
Refactor the pile-O Javascript using either Object Literals or Prototypical Inheritance. Put as little as possible into the global scope!
- Provide good names for all anonymous functions.
- Move the anonymous functions to objects.
Each callback or event handler is only 1 or 2 lines, and you have a clear seperation of concerns.