help: when calling a javascript functions, it's interrupted by jquery's onready method!
<p>wow! i just noticed something, every time i try to call a function, no matter what function, in javascript, somehow jquery and ms ajax framework javascript captures it and checks if the document is ready (document.onready or other) and never returns the control back to the function im calling, or whatever it does, my function never ends up getting called! why on earth is it doing this? i've never asked for it to!!!</p>

<p>all i have is references to these libraries, script/link references as you do on the top of your master page.</p>

<p>thsi is ridiculous, anyone have any ideas?</p>

<p>here is the code breaks when calling UpdateGlobalVariables</p>

<pre><code>&lt;script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/jquery.superload.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="~/Views/Shared/JScript.js" type="text/javascript"&gt;&lt;/script&gt;

&lt;script type="text/javascript" language="javascript"&gt;
        var RatePicPanelRunCount = 0;

        function ChangeMainPic(newSrc) {
        $get("imgPic").src = newSrc;
        alert($get("imgPic").src + '\n' + newSrc);
        RatePicPanelRunCount++;
        }


        function UpdateGlobalVariables() {
        // Update variables...
        ShownPicID = &lt;%=Model.CurShownPicID%&gt;;
        ShownUserID = &lt;%= Model.CurShownUserID %&gt;;
            CurrentUserID = &lt;%= UserID %&gt;;
            alert('CurUserID is ' + CurrentUserID);
            alert('From cookie its ' + getCookie('UserID'));
        }

        debugger;

    if (RatePicPanelRunCount == 0) {
            ChangeMainPic('&lt;%= Model.CurPicURL%&gt;');
            UpdateGlobalVariables;
    };

&lt;/script&gt;
</code></pre>
