If you want JavaScript to fire when the page loads, try using the ASP.NET AJAX pageLoad event handler, like this:
function pageLoad(){
//Your code here
}
That event will get automatically fired by ASPNET AJAX when the page is ready to go. You can use this in your UserControl and it should fire correctly.
Let me know if that helps.
-Todd