﻿function ConfirmationOverlay(Id, ClientId, CloseId, ShowClose, ShowMask, Width, Height, MaxWidth, MaxHeight, ContentId, AutoShow, ClientHandlerId, SetFocusId) {
    this.base = new Overlay(Id, ClientId, CloseId, ShowClose, ShowMask, Width, Height, MaxWidth, MaxHeight, ContentId, AutoShow, ClientHandlerId, SetFocusId);
    this.Confirm = new Event();
    this.Cancel = new Event();
    return this;
}
ConfirmationOverlay.prototype.Init = function() {
    try {
        var clientVar = eval(GetOverallBase(this).ClientHandlerId);
        clientVar.AddHandlers(this);
    } catch (e) { } 
}

ConfirmationOverlay.prototype.OnConfirm = function() {
    this.base.OnHide(false);
    this.Confirm.Execute(this);
}
ConfirmationOverlay.prototype.OnCancel = function() {
    this.base.OnHide(false);
    this.Cancel.Execute(this);
}

ConfirmationOverlay.prototype.OnHide = function(RaiseCloseEvent) {
    this.base.OnHide(RaiseCloseEvent);
}
