Added getCanvasContext utility function that allows specifying the host element as either a textual ID or DOM element object.  Replaced all getElementById calls with this function.