در مورد کد زیر که در تمام صفحات استفاده شده توضیح میدید که چه کاری انجام میده ؟



<script type="text/javascript">

function onUpdating(){
// get the update progress div
var pnlPopup = $get('<%= this.pnlPopup.ClientID %>');

// get the gridview element
var gridView = $get('<%= this.Main.ClientID %>');

// make it visible
pnlPopup.style.display = '';

// get the bounds of both the gridview and the progress div
var gridViewBounds = Sys.UI.DomElement.getBounds(gridView);
var pnlPopupBounds = Sys.UI.DomElement.getBounds(pnlPopup);

// center of gridview
var x = gridViewBounds.x + Math.round(gridViewBounds.width / 2) - Math.round(pnlPopupBounds.width / 2);
var y = gridViewBounds.y + Math.round(gridViewBounds.height / 2) - Math.round(pnlPopupBounds.height / 2);

// set the progress element to this position
Sys.UI.DomElement.setLocation(pnlPopup, x, y);
}

function onUpdated() {
// get the update progress div
var pnlPopup = $get('<%= this.pnlPopup.ClientID %>');
// make it invisible
pnlPopup.style.display = 'none';
}
</script>