function WebMessageBox() {
	
	var thisobj = this;
	
	/** 背景元素ID **/
	this.backid;
	
	/** 窗体元素ID **/
	this.winid;
	
	/** 背景元素对象 **/
	this.backel;
	
	/** 窗体元素对象 **/
	this.winel;
	
	/** 当前msgbox类型 **/
	this.option;
	
	/** 当前输入文本框 **/
	this.inputText;
	
	/** 当前输入文本域 **/
	this.inputArea;
	
	
	
	/**
	 * 窗口关闭时所执行的方法
	 * @param {} result: ok || yes || no || cancel || close
	 */
	this.callback = function(result, func) {
		if(JU.isFunction(func)) {
			var b = func(result);
		}
		thisobj.hide();
	}
	
	
	/**
	 * 弹出窗口
	 * @param {} config
	 * title: 
	 * msg: 
	 * option: -1=OK  0=YESNO  1=YESNOCANCEL  2=OKCANCEL  3=INPUT  4=TEXTAREA  5=Wait
	 * width: 对话框宽度  <=0 时表示自由缩放
	 * inputText: option=3||4时，初始文本
	 * areaHeight: TextArea的高度    option=4才会起作用  缺少为100;
	 */
	this.show = function(config) {
		
		
		if(JU.isEmpty(config.title)) config.title = '';
		
		if(JU.isEmpty(config.msg)) config.msg = '';
		
		ScreenConvert();
		
		var msgHTML = '<div id=\"Dialog\">';
		msgHTML = msgHTML + '<div class="DialogTitle">';
		
		//复杂操作 弹出等待页面
		if(config.option==5)
		{
			msgHTML = msgHTML + '<a href="#a" onclick="return DialogHide();"></a>'+config.title+'</div>';
			msgHTML = msgHTML + '<div class="DialogContent">';
			msgHTML = msgHTML + '<p>'+config.msg+'</p>';
			msgHTML = msgHTML + '<p class="button"></p>';
			scroll(0,0);
			DialogShow(msgHTML,250,120,320,90);
		}
		else
		{
			msgHTML = msgHTML + '<a href="#a" onclick="return DialogHide();"></a>'+config.title+'</div>';
			msgHTML = msgHTML + '<div class="DialogContent">';
			msgHTML = msgHTML + '<p>'+config.msg+'</p>';
			msgHTML = msgHTML + '<p class="button"><input id="closeMsgBox" type="button" onclick="return DialogHide();" value="关闭"/></p>';
			msgHTML = msgHTML + '</div>';
			msgHTML = msgHTML + '</div>';
			DialogShow(msgHTML,250,180,320,135);
		}
	}
	
	/**
	 * 关闭窗口
	 */
	this.hide = function() {
		DialogHide();
	}
	
	/**
	 * 等待窗口
	 * @param {} msg
	 * @param {} title
	 * @param {} callback
	 */
	this.wait = function(msg, title) {
		thisobj.show({title:title,msg:msg,option:5});
	}
	
	this.getBackId = function() {
		return thisobj.backid;
	}
	this.getWinId = function() {
		return thisobj.winid;
	}
	this.getBackEl = function() {
		return thisobj.backel;
	}
	this.getWinEl = function() {
		return thisobj.winel;
	}
	this.getOption = function() {
		return thisobj.option;
	}
	this.getInputTextEl = function() {
		return thisobj.inputText;
	}
	this.getInputAreaEl = function() {
		return thisobj.inputArea;
	}
	
	
}




