why can't this javascript function be found
<p>i have some javascript code that is supposed to run on document.ready but i keep getting an error in firebug saying the onLoad() method can't be found.</p>

<p>here is the code (which clearly shows that method there):</p>

<pre><code>&lt;script type="text/javascript"&gt;

    var tl;
    function onLoad1() {

        debugger;

        var eventSource = new Timeline.DefaultEventSource(0);

        // Example of changing the theme from the defaults
        // The default theme is defined in 
        // http://simile-widgets.googlecode.com/svn/timeline/tags/latest/src/webapp/api/scripts/themes.js
        var theme = Timeline.ClassicTheme.create();
        theme.event.bubble.width = 350;
        theme.event.bubble.height = 300;

        var d = Timeline.DateTime.parseGregorianDateTime("1900")
        var bandInfos = [
            Timeline.createBandInfo({
                width: "80%",
                intervalUnit: Timeline.DateTime.DECADE,
                intervalPixels: 200,
                eventSource: eventSource,
                date: d,
                theme: theme,
                layout: 'original'  // original, overview, detailed
            }),
            Timeline.createBandInfo({
                width: "20%",
                intervalUnit: Timeline.DateTime.CENTURY,
                intervalPixels: 200,
                eventSource: eventSource,
                date: d,
                theme: theme,
                layout: 'overview'  // original, overview, detailed
            })
        ];
        bandInfos[1].syncWith = 0;
        bandInfos[1].highlight = true;

        debugger;

        tl = Timeline.create(document.getElementById("tl"), bandInfos, Timeline.HORIZONTAL);
        // Adding the date to the url stops browser caching of data during testing or if
        // the data source is a dynamic query...
        var jsonFile = "&lt;%= Url.Content("~/scripts/Views/Business/")%&gt;test.js?"+ (new Date().getTime());

        tl.loadJSON(jsonFile), function(json, url) {
            eventSource.loadJSON(json, url);
        });
    }
    var resizeTimerID = null;
    function onResize() {
        if (resizeTimerID == null) {
            resizeTimerID = window.setTimeout(function() {
                resizeTimerID = null;
                tl.layout();
            }, 500);
        }
    }
&lt;/script&gt;

&lt;script type="text/javascript"&gt;

    $(document).ready(function() {
        debugger;
        onLoad1();
    });
    &lt;/script&gt;
</code></pre>

<p>any idea why it can't "find" that method.</p>

<h2>EDIT</h2>

<ul>
<li>I put all of the javascript above (removed the image)</li>
<li>I renamed it onLoad1() but i still got the same issue</li>
<li>I moved the first code below the function but i still get the same issue.</li>
</ul>
