difficulty referencing functions, using prototype
<p>I am working on HTML 5 Canvas game, with a gameloop.  </p>

<p>Here is my code so far.  It doesn't do anything and that is fine, but I am getting an error</p>

<p>TypeError: Object [object DOMWindow] has no method 'Update' [http://localhost:2516/scripts/lib/Game.js:47]   </p>

<p>Edit:  This code works, it no longer reflects the problem, it reflects the solution</p>

<pre><code>  var game;
    var Game = function () {
    }


   Game.prototype.Update = function () {

}

Game.prototype.Draw = function () {

}

function GameLoop () {


    game.Update(); //this is line 47
    //context.save();
    game.Draw();
   // context.restore();
    setTimeout(GameLoop, 10);
}
function Start() {
    game = new Game();
   GameLoop();
}
</code></pre>

<p>Edit: I think the "this" is looking at the document instead of the Game object, which I don't understand why or how to fix it</p>
