Javascript and HTML 5 canvas experiment