function Dialog() {
    var win;
}

function CustomDialog() {
    var win;
}

function DialogOK() {
    var win;
}


Dialog.prototype.Show = function(msg, handleOk) {

    var handleOkDialog = function() {
        this.hide();
        handleOk();
    };

    var handleCancel = function() {
        this.hide();
    };

    this.win = new YAHOO.widget.SimpleDialog("win",
			    { width: "400px",
			        fixedcenter: true,
			        visible: false,
			        draggable: true,
			        close: true,
			        text: msg,
			        icon: YAHOO.widget.SimpleDialog.ICON_HELP,
			        constraintoviewport: true,
			        buttons: [{ text: "Ok", handler: handleOkDialog, isDefault: true },
						      { text: "Cancelar", handler: handleCancel}],
				    modal: true,
				    underlay: "none",
				    zIndex: 2000
			    });

    this.win.setHeader("Atenção");
    this.win.render(document.body);
    this.win.show();
}

CustomDialog.prototype.Show = function(title, msg, handleOk, captionOk, handleCancel, captionCancel) {

    var handleOkDialog = function() {
        this.hide();
        handleOk();
    };

    var handleCancelDialog = function() {
        this.hide();
        handleCancel();
    };

    this.win = new YAHOO.widget.SimpleDialog("win",
			    { width: "300px",
			        fixedcenter: true,
			        visible: false,
			        draggable: false,
			        close: true,
			        text: msg,
			        icon: YAHOO.widget.SimpleDialog.ICON_HELP,
			        constraintoviewport: true,
			        buttons: [{ text: captionOk, handler: handleOkDialog, isDefault: true },
						      { text: captionCancel, handler: handleCancelDialog}],
			        modal: true,
			        underlay: "shadow",
			        zIndex: 2000
			    });

    this.win.setHeader(title);
    this.win.render(document.body);
    this.win.show();
}

DialogOK.prototype.Show = function(title, msg, handleOk) {

    var handleOkDialog = function() {
        this.hide();
        handleOk();
    };

    var handleCancelDialog = function() {
        this.hide();
    };

    this.win = new YAHOO.widget.SimpleDialog("win",
			    { width: "300px",
			        fixedcenter: true,
			        visible: false,
			        draggable: false,
			        close: true,
			        text: msg,
			        icon: YAHOO.widget.SimpleDialog.ICON_HELP,
			        constraintoviewport: true,
			        buttons: [{ text: "OK", handler: handleOkDialog, isDefault: true }],
			        modal: true,
			        underlay: "shadow",
			        zIndex: 2000
			    });

    this.win.setHeader(title);
    this.win.render(document.body);
    this.win.show();
}

