Register you function in EndRequestHandler which as given below may work for you...
<script type="text/javascript">
try {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
} catch (ex) { }
</script>
function endRequestHandler() {
/// <summary>Raised before processing of an asynchronous postback starts and the postback request is sent to the server.</summary>
try {
//add you function overe here
}
}
catch (exeption) { }
};