A minor note: this is the first time I've seen an svg embedded in a canvas purely for it's onload event. Within this context the canvas is referred to by its (bare) id. How strange and wonderful!
It is possible to save a little more space by putting it in the canvas onclick event.