﻿

// ---------------------------------------------------
// Wires up Ajax event handlers.
// ---------------------------------------------------
function initEvents()
{
    Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initializeRequestHandler);
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
}


// ---------------------------------------------------
// Ajax initialize request handler.
// ---------------------------------------------------
function initializeRequestHandler(sender, args)
{
    // Let the user know that the system is busy.
    var postBackElement = args.get_postBackElement();
    postBackElement.style.cursor = 'wait';
    document.body.style.cursor = 'wait';
}


// ---------------------------------------------------
// Ajax end request handler.
// ---------------------------------------------------
function endRequestHandler(sender, args)
{
    document.body.style.cursor = 'auto';
}
