
function UISButton_OnClick(theBtnCtrl, btnList, msg)
{
    var idx;
    var wasFound = false;
    if (theBtnCtrl != null) 
    {
        for (idx = 0; idx < btnList.length; ++idx) 
        {
            var otherBtn = document.getElementById(btnList[idx]);
            if (otherBtn != null && otherBtn.StopRepost == true)
                wasFound = true;
        }
        if (wasFound) 
            alert(msg);
        else 
            theBtnCtrl.IWasClicked = true;
    }
}

function UISButton_OnSubmitOperation(btnList)
{
    var idx;
    var alowThePost = true;
    for (idx = 0; idx < btnList.length; ++idx) 
    {
        var theCtrl = document.getElementById(btnList[idx]);
        if (theCtrl != null)
        {
            if (theCtrl.StopRepost == true)
                alowThePost = false;
            else 
            {
                if (theCtrl.IWasClicked == true) 
                    theCtrl.StopRepost = true;
            }
            theCtrl.IWasClicked = false;
        }
    }
    return alowThePost;
}
