﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("WebControls");

WebControls.ModalDialog = function(element) {
    WebControls.ModalDialog.initializeBase(this, [element]);
}

WebControls.ModalDialog.prototype = {
    initialize: function() {
        WebControls.ModalDialog.callBaseMethod(this, 'initialize');

        var that = this;

        // this._modalDialogDiv.jqm({ modal: true, toTop: true });
        $('#' + this._modalDialogDiv.id).jqm({ modal: true, toTop: true });

    },
    dispose: function() {
        //Add custom dispose actions here
        WebControls.ModalDialog.callBaseMethod(this, 'dispose');
    },

    show: function() {
        $('#' + this._modalDialogDiv.id).jqmShow();
    },

    hide: function() {
        $('#' + this._modalDialogDiv.id).jqmHide();
    }
}
WebControls.ModalDialog.createProperty("modalDialogDiv");

WebControls.ModalDialog.registerClass('WebControls.ModalDialog', Sys.UI.Control);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();