﻿function Initialize_AjaxWaitCursorIndicator() {
//    var prm = Sys.WebForms.PageRequestManager.getInstance();

//    prm.add_initializeRequest( InitializeRequest );
//    prm.add_endRequest( EndRequest );
}
 
function InitializeRequest( sender, args ) {
    var bodyElement = $get( 'body' );
    if( bodyElement != null ) bodyElement.style.cursor = 'wait';
 
    if( args._postBackElement.id )
        $get( args._postBackElement.id ).disabled = true;
}
 
function EndRequest( sender, args ) {
    var bodyElement = $get( 'body' );
    if( bodyElement != null ) bodyElement.style.cursor = 'auto';
 
    if( sender._postBackSettings.sourceElement.id && $get( sender._postBackSettings.sourceElement.id ) != null ) {
        $get( sender._postBackSettings.sourceElement.id ).disabled = false;
    }
}

//Added to satisfy new notifyScriptLoaded() requirement
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
