var kInitialized = false;

function InitializeKankeiBase()
{
    if(!kInitialized)
    {
        Type.registerNamespace("KankeiWebUI");

        KankeiWebUI.WebControlBase = function(element) {

            KankeiWebUI.WebControlBase.initializeBase(this, [element]);

        }
        
        KankeiWebUI.WebControlBase.prototype = {

            invoke: function( args, onComplete$delegate, context, onError$delegate ,async){
              
                var callbackId = this.get_element().id;
                callbackId = callbackId.replace(/_/g, "$");

                if(!async)
                {
                    __doPostBack(callbackId, args);
                }else
                {
                    WebForm_DoCallback(callbackId, args, onComplete$delegate, context, onError$delegate, async);
                }
            },
            
            dispose: function()
            {
                $clearHandlers(this.get_element());
                KankeiWebUI.WebControlBase.callBaseMethod(this,'dispose');
            }

        }

        KankeiWebUI.WebControlBase.registerClass('KankeiWebUI.WebControlBase',Sys.UI.Control);
        if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
        
        kInitialized = true;
    }
}