/*+++++++++++++++++++++++++++++++++++++
+ 功能:时限控制，每页加载，时限判断（定时器）弹出层
+ 研发:宗帝
+ 时间:2011-06-10
+ 更新:2011-12-05
+ 停留时间:20分钟
+++++++++++++++++++++++++++++++++++++*/
Namespace.register("Wisdom.CheckOnLine");
Wisdom.CheckOnLine = function(){
	this.__cookieName = "UserOnLine";this.timer = null;
	this.init=function(){var _this = this;Common.setCookie(this.__cookieName,1,10*60*1000);this.Running();};
	this.check=function(){var n = Common.getCookie(this.__cookieName);if(n!=1){this.AddDialogBox();return 0;}/*不存在了*/else{ return 1;}};
	this.Running = function(){var _this = this;var n = this.check();if(n==1) this.timer = setTimeout(function(){_this.Running();},10000);};//10秒.
	this.AddDialogBox = function(){/*不存在，则弹出层	//Common.EditDialg("CheckOnLineBox",false,msg);*/
		var _this = this;var msg = '<img src="/images/youleave.gif" />';art.dialog({id: 'CheckOnLineBox',title:false,background:'#000',lock:true,opacity:0.50,content: msg });	
	};this.CloseWindow = function(){window.opener = null;window.close();return true;};this.init();//this.AddDialogBox();
};jQuery(function(){new Wisdom.CheckOnLine();});
