<script language="javascript" type="text/javascript">
var loadingPanel = "";
var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
var postBackElement = "";
pageRequestManager.add_initializeRequest(initializeRequest);
pageRequestManager.add_endRequest(endRequest);
function initializeRequest(sender, eventArgs) {
loadingPanel = $("#<%=LoadingPanel.ClientID%>");
postBackElement = eventArgs.get_postBackElement().id;
loadingPanel.show(postBackElement);
}
function endRequest(sender, eventArgs) {
loadingPanel = $("#<%=LoadingPanel.ClientID%>");
loadingPanel.hide(postBackElement);
}
</script>