Embed these lines on your javascript tag
function foo()
{
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
}
function endRequestHandler(sender, args)
{
// Do your stuff
alert('Update Panel routine is now complete');
}
Then, put this on you body tag
<body onload="foo()">