﻿/**
 *  Изменение курсора и отключение/включение элемента на время обновления по ajax.
 */

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_initializeRequest(InitializeRequest)
prm.add_endRequest(EndRequest);
 
function InitializeRequest(sender, args) 
{
    $get('MasterContainer').style.cursor = 'wait'; 

    // Get a reference to the element that raised the postback,
    //   and disables it.
    //$get(args._postBackElement.id).disabled = true;
}
 
function EndRequest(sender, args) 
{
    $get('MasterContainer').style.cursor = 'auto';
 
    // Get a reference to the element that raised the postback
    //   which is completing, and enable it.
    //$get(sender._postBackSettings.sourceElement.id).disabled = false;
}
