﻿// Progress indicator related functions
Type.registerNamespace('IAPA.eBis.Web.UpdateProgress');

IAPA.eBis.Web.UpdateProgress.onUpdating = function IAPA$eBis$Web$UpdateProgress$onUpdating(modalPopup, updateProgressMessageLabelId, message)
{
    this.setMessage(updateProgressMessageLabelId, message);
    $find(modalPopup).show();
}

IAPA.eBis.Web.UpdateProgress.onUpdated = function IAPA$eBis$Web$UpdateProgress$onUpdated(modalPopup)
{
    $find(modalPopup).hide();
}

IAPA.eBis.Web.UpdateProgress.setMessage = function IAPA$eBis$Web$UpdateProgress$setMessage(updateProgressMessageLabelId, message)
{
    // get the label to hold the message
    var updateMessageLabel = $get(updateProgressMessageLabelId);
    // update the message
    updateMessageLabel.innerHTML = message;
}

// Since this script is not loaded by System.Web.Handlers.ScriptResourceHandler
// invoke Sys.Application.notifyScriptLoaded to notify ScriptManager 
// that this is the end of the script.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

