JavaScript and HTML 5 horse racing game