Rendering a module's template contents in the page body
The best way to add the JavaScript in Drupal is to have an external JS file like helloworld.js in your module/theme and include it using the function,

  drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', 'inline');
  drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });',
    array('type' =&gt; 'inline', 'scope' =&gt; 'footer', 'weight' =&gt; 5)
   );
  drupal_add_js('http://example.com/example.js', 'external');
  drupal_add_js(array('myModule' =&gt; array('key' =&gt; 'value')), 'setting');


For more info see drupal_add_js() 


  How can I get the onLoad() function to fire once my Drupal page is loaded. I a normal HTML page, I could use the body onload= callback


jQuery(document).ready is similar to your onload function that you are trying to call in your HTML body.

UPDATE:

Add the "template" instead of file in your  hook_theme for using templates like,

 function hello_theme($existing, $type, $theme, $path){
    return array(
      'timeline' =&gt; array(
        'variables' =&gt; array('content' =&gt; NULL),
        'template' =&gt; 'timeline',
        'path' =&gt; drupal_get_path('module', 'hello')
      )
    );
  }