CTools is a widely used Drupal API module which provides functional frameworks for modules such as Views, Panels, Context and more. In addition to its many uses, it has great JavaScript capabilities. Tutorials on the web only tend to describe how to fire off a CTools AJAX call when clicking on a link. What we will show you is how to fire off a CTools call on other events, such as on page load. To do this, you will need to create a custom module; our code assumes you've called your module 'mymodule'...