title: Function inside prototype not working
body: <p>The onKeyDown function is not called when the keydown event is fired using the following code:</p>
  
  <pre><code>Game.prototype.setEventHandlers = function() {
      // Keyboard events
      window.addEventListener("keydown", onKeyDown, false);
      window.addEventListener("downup", onKeyUp, false);
  
      // Mouse events
      window.addEventListener("mousemove", onMouseMove, false);
      window.addEventListener("click", onMouseClick, false);
  
      // Window events
      window.addEventListener("resize", onWindowResize, false);
  
      var onKeyDown = function(e) {
          alert("HI!");
      };
  }
  </code></pre>
  
  <p>If I replace it with the traditional function syntax it works just fine:</p>
  
  <pre><code>function onKeyDown() {
      alert("HI!");
  }
  </code></pre>
  
  <p>Any ideas as to why the <code>var onKeyDown = function</code> syntax doesn't get the job done? Thanks in advance.</p>