Javascript Canvas and DOM Homeworks