var rollBase={
	dElement:function(){//兼容DTD头
		return	document.documentElement || document.body;
	}
	,rewriteAtt:function(formerObj,newObj){//给对象设置属性
		for(var i in newObj){
			formerObj[i]=newObj[i];
		}
		return formerObj;
	}
};
var newRoll=function(newObj){
	this.base=rollBase;
	this.speed=10;
	this.n=10;
	this.top=100;
	var pro=this;
	pro=this.base.rewriteAtt(pro,newObj);
	this.play();
};
newRoll.prototype={
	loop:null
	,play:function(){
		var space=this.top+this.base.dElement().scrollTop,objTop=this.obj.offsetTop,pro=this;
		this.obj.style.top=objTop+((space-objTop)*0.01)*this.n+'px';
		this.loop=setTimeout(function(){pro.play()},this.speed);
	}
	,clear:function(){
		clearTimeout(this.loop);
	}
};