var CFloat = new Class({
	Implements:Options,
	options:{
		y:0,
		interval:0.01,
		step:0.1
	},
	initialize:function(id,options){
		this.setOptions(options);
		this.obj = $(id);
		this.isActive = true;
		this.scrollFunc.periodical(this.options.interval*1000,this);
	},
	scrollFunc:function(){
		if(this.isActive){
			var posNow = parseInt(this.obj.getStyle('top'));
			var offset = (window.getScroll().y+this.options.y-posNow)*this.options.step;
			offset = offset > 0 ? Math.ceil(offset) : Math.floor(offset);
			this.obj.setStyle('top',posNow+offset);
		}
	},
	toggleActive:function(){
		this.isActive = this.isActive ? false:true;
	},
	close:function(){
		this.obj.setStyle('display','none');
	}
});