JavaScript and HTML5 Canvas experiment