function MsgBox() {
	
	this.Buttons = MsgBox.BUTTON_OKCANCEL;
	this.Icon = null;
	this.Title = null;
	this.Prompt = null;
	this.DefaultButton = 1;
	this.BaseUrl = null;
	this.Param = "?p=msgbox&";
	this.Width = 300;
	this.Height = 160;
	this.CloseAfter = 0;
	
	this.ID = MsgBox.Elements.length;
	MsgBox.Elements[MsgBox.Elements.length] = this;
	
	this.Show = function (callback) {
		
		var cUrl = "msgbox=" + escape(
			"ID=" + this.ID + 
			"&buttons=" + this.Buttons + 
			"&icon=" + this.Icon + 
			"&prompt=" + this.Prompt + 
			"&defaultbutton=" + this.DefaultButton +
			"&closeafter=" + this.CloseAfter
			);
		
		GB_showCenter(this.Title, this.BaseUrl + this.Param + cUrl, this.Height, this.Width, callback);
	}
	
	this.Hide = function () {
		GB_hide();
	}
}

// Constantes
MsgBox.BUTTON_OKONLY					= 1;
MsgBox.BUTTON_OKCANCEL				= 2;
MsgBox.BUTTON_YESNO					= 3;
MsgBox.BUTTON_YESNOCANCEL			= 4;
MsgBox.BUTTON_ABORTRETRYIGNORE	= 5;
MsgBox.BUTTON_RETRYCANCEL			= 6;
MsgBox.BUTTON_CANCEL					= 7;
MsgBox.ICON_CRITICAL					= 'critical';
MsgBox.ICON_QUESTION					= 'question';
MsgBox.ICON_EXCLAMATION				= 'exclamation';
MsgBox.ICON_INFORMATION				= 'information';
MsgBox.Elements						= new Array();
