<!--
var Scroll = new Class({
	Implements: Options,
	options:{
		name : 'scroll',
		direction : 'horizontal',
		speed:10,
		scrollStop:false,
		tagId:''
	},
	initialize: function(element,name,options){
		var _this=this;
		_this.options.tagId=element;
		_this.options.name=name;
		_this.setOptions(options);
		$(_this.options.tagId).onmouseover=function(){
			_this.mouseover();
		};
		$(_this.options.tagId).onmouseout=function(){
			_this.mouseout();
		};
		if(_this.options.direction!='horizontal'){
			$(_this.options.tagId).innerHTML+=$(_this.options.tagId).innerHTML;
			_this.options.direction='verticality';
		}
		//*  setInterval的对象传递有问题，不知道如何解决，这里只是一个临时的解决办法  *//
		setInterval(_this.options.name+'.'+_this.options.direction+'()',_this.options.speed);
	},
	mouseover:function(){
		this.options.scrollStop=true;
	},
	mouseout:function(){
		this.options.scrollStop=false;
	},
	verticality:function(){
		if(this.options.scrollStop)return;
		if($(this.options.tagId).scrollTop+$(this.options.tagId).offsetHeight >= $(this.options.tagId).scrollHeight){
			$(this.options.tagId).scrollTop=$(this.options.tagId).scrollTop-$(this.options.tagId).scrollHeight/2;
		}else{
			$(this.options.tagId).scrollTop++;
		}
	},
	horizontal:function(){
		if(this.options.scrollStop)return;
		if($(this.options.tagId).scrollLeft+$(this.options.tagId).offsetWidth >= $(this.options.tagId).scrollWidth){
			$(this.options.tagId).scrollLeft=$(this.options.tagId).scrollLeft-($(this.options.tagId).scrollWidth/2);
		}else{
			$(this.options.tagId).scrollLeft++;
		}
	}
});
//-->