function POPMSG(id,left,top,right,bottom,title,message,linkurl){
	this.id = id;
	this.title = title;
	this.message= message;
	this.width = 230;
	this.height = 150;
	this.left=left;
	this.top=top;
	this.right=right;
	this.bottom=bottom;
	this.url=linkurl;
	this.timeout= 60*1000;
	this.speed = 1;
	this.step = 5;
	this.timer = 0;
	this.close = false;
	this.autoHide = true;
	this.documentBody= ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
	this.Pop= window.document.createElement("div");
	this.Pop.id=this.id;
	this.Pop.style.display="none";
	this.Pop.style.position="absolute";
	this.Pop.style.overflow="hidden";
	window.document.body.appendChild(this.Pop);
	this.setloc();
};
POPMSG.prototype.oncommand = function(){
	window.open(this.url);
	this.close = true;
	this.hide();
};
POPMSG.prototype.setloc = function(){
	var docBody =this.documentBody;
	this.Pop.style.width=this.width+"px";
	this.Pop.style.height=(this.height+2)+"px";
	if(this.left!=null&&this.top!=null){
		this.Pop.style.left = this.left+"px";
		this.Pop.style.top = this.top+"px";
	}
	if(this.right!=null&&this.bottom!=null){
		this.Pop.style.top =(docBody.scrollTop + docBody.clientHeight-this.height-this.bottom)+"px";
		this.Pop.style.left =(docBody.scrollLeft + docBody.clientWidth-this.width-this.right)+"px";
	}
};
POPMSG.prototype.hide = function(){
	var me = this;
	if(this.timer>0){
		window.clearInterval(me.timer);
	}
	me.Pop.style.display="none";
};
POPMSG.prototype.fadeHide=function(){
	var me=this;
	var fun=function(){
		if(me.bottom!=null&&me.bottom>0){
			me.bottom=me.bottom-me.step;
		}else	if(me.height>me.step){
			me.height=me.height-me.step;
			me.setloc();
		}else{
			window.clearInterval(me.fadeTimer);
			me.hide();
		}
	};
	me.fadeTimer=window.setInterval(fun,me.speed);
};
POPMSG.prototype.show = function(){
	var w = this.width;
	var h = this.height;
	var oPopup =this.Pop;

	var str  = '<div style="z-index:99999;top:0px;height:'+h+'px; background: url(http://www.nmg.xinhuanet.com/sy/2009/sy/ggtc/mrdx/wz.png)">'
						+'	<div style="height:'+ (h-28)+'px;">'
						+'		<table cellspacing=0 cellpadding=0 width="100%" height="28px" border="0">'
						+'			<tr>'
						+'			<td width="100%" valign=center align=right>'
						+'				<span title="¹Ø±Õ" style="display:block;width:11px;height:11px;text-indent:-200px;font-size: 0px; cursor: pointer;margin-right: 15px;margin-top:8px;;background: url(http://www.nmg.xinhuanet.com/sy/2009/sy/ggtc/mrdx/close.gif)" id="btSysClose" >¡Á</span></td>'
						+'			</tr>'
						+'		</table>'
						+'		<div style="position:relative;margin:20px;">'
						+'			<div style="align:center;font-size: 14px;color:red;font-weight:bold;">'+ this.title +'</div>'
						+'			<div style="font-size: 12px;word-break: break-all;text-indent:2em;margin-top:10px;" align=left>'+ this.message+'</div>'
						+'			<div id="btCommand" style="position:absolute;cursor: pointer;top:60px;left:110px;"><img src="http://www.nmg.xinhuanet.com/sy/2009/sy/ggtc/mrdx/dj.jpg" /></div>'
						+'		</div>'
						+'	</div>'
						+'</div>';
	oPopup.innerHTML = str;
	var me=this;
	if(me.autoHide)window.setTimeout(function(){me.fadeHide()},this.timeout);
	me.timer=window.setInterval(function(){me.setloc()},1);
	var btClose = document.getElementById("btSysClose");
	btClose.onclick = function(){
		me.close = true;
		me.fadeHide();
	};
	var btCommand = document.getElementById("btCommand");
	btCommand.onclick = function(){
		me.oncommand();
	};
	this.fadeShow();
};
POPMSG.prototype.fadeShow = function(){
	var me=this;
	var orignalHeight=me.height;
	var orignalBottom=me.bottom;
	me.height=0;
	if(me.bottom!=null)me.bottom=0;
	me.setloc();
	me.Pop.style.display="block";
	var fun=function(){
		if(me.height+me.step<orignalHeight){
			me.height=me.height+me.step;
		}else if(me.bottom!=null&&(me.bottom+me.step)<orignalBottom){
			me.bottom=me.bottom+me.step;
		}else{
			me.height=orignalHeight;
			me.bottom=orignalBottom;
			window.clearInterval(me.fadeTimer);
		}
		me.setloc();
	};
	me.fadeTimer=window.setInterval(fun,me.speed);
};