function RJ1K1()
{
	this.constructor 	= function()
	{
		this.member = new Array();
		this.inte = null;
	};
	this.start = function()
	{
		if(this.inte==null)
		{
			this.stop();
			this.inte = setInterval(root.delegate.create(this,'execute'),10);
		}
	};
	this.stop = function()
	{
		clearInterval(this.inte);
		this.inte = null;
	};
	this.execute = function()
	{
		var o = this.member;
		for(var i in o)
		{
			var e = o[i];
			if(e.count>e.duration)
			{
				this.remove(e.id);
				if(typeof(e.onFinished)=='function') e.onFinished.apply(null,e.args);
			}else{
				var n = this.calculate1(e.count,e.start,e.end-e.start,e.duration);
				this.set(e.id,n);
				e.current = n;
				e.count++;
			}
		}
	};
	this.register = function(o)
	{
		if(typeof(this.member[o.id])!='undefined') this.remove(o.id);
		this.member[o.id] = o;
		this.start();
	};
	this.remove = function(s)
	{
		delete this.member[s];
		if(this.getLength()==0) this.stop();
	};
	this.getLength = function()
	{
		var n = 0;
		for(var i in this.member) n++;
		return n;
	};
	this.set = function(s,n)
	{
		var e = this.getObj(s).style;
		e.opacity = (n/100);
		e.MozOpacity = (n/100);
		e.KhtmlOpacity = (n/100);
		e.filter = 'alpha(opacity='+n+')';
	};
	this.get = function(s,n)
	{
		var r = n;
		var o = this.member[s];
		if(typeof(o)!='undefined'){if(typeof(o.current)!='undefined') r = o.current;}
		return r;
	};	
	this.anim = function(s,n1,n2,n3,f,a)
	{
		var r = root.alpha.get(s,n1);
		root.alpha.register({id:s,start:r,end:n2,duration:n3,count:0,current:r,onFinished:f,args:a});
	};
	this.calculate1 = function(t,b,c,d){return c*t/d + b;}
};
root.addClass('alpha',RJ1K1,'Alpha class');

