Here is a good article on executing JavaScript on page load: addLoadEvent