function calculagraph(){
	this._id=null;
	this._sT=null;
	this._cT=null;
	this._eT=null;
	//this._xT=null;//剩余天数
	this._lT=null;
	this._flag=true;
	this._gT=function(){
		if (this._lT==null){
		    if(this._flag){
		        this._sT=new Date(this._sT.replace(/-/g,"/"));
		        this._cT=new Date(this._cT.replace(/-/g,"/"));
		        this._eT=new Date(this._eT.replace(/-/g,"/"));
		    }
		    if(this._sT>this._cT)
		    {
		        this._lT=this._sT-this._cT;
		    }
		    else
		    {
		        this._lT=this._eT-this._cT;
		    }
		    this._lT=this._lT/1000;
		}
		if (this._lT>=0){
		    var _H=Math.floor(this._lT/3600);
		    var _M=Math.floor((this._lT-_H*3600)/60);
		    var _S=(this._lT-_H*3600)%60;
		    if(this._sT>this._cT)
			{
			    document.getElementById(this._id).innerHTML="<span class='qgwords'>倒计时</span><span>"+ _H +"</span>小时<span>"+ _M +"</span>分<span>"+ _S +"</span>秒";
			}
			else
			{
			    $("#"+this._id).siblings("input").removeClass("wait").addClass("start");
			    document.getElementById(this._id).innerHTML="<span class='qgwords'>剩余</span><span>"+ _H +"</span>小时<span>"+ _M +"</span>分<span>"+ _S +"</span>秒";
			}
			this._lT=this._lT-1;
			if(this._lT==0 && this._sT>this._cT)
			{
			    this._cT=this._sT;
			    this._lT=null;
			    this._flag=false;
			}
		}
		else
		{
			document.getElementById(this._id).innerHTML="<span class='qgwords'>已结束</span>";
			clearInterval(this._interval);
		}
	}
	this._interval=function(){
		var o = this;
		this._interval = setInterval(function(){o._gT()},1000);
	}
}