

function Ticker(el,alphaOver,idPrefix,enableGrow) {
	this.El=el;
	this.AlphaOver=alphaOver;
	this.IdPrefix=idPrefix;
	this.EnableGrow=enableGrow;
}
Ticker.Index=0;
Ticker.prototype.Curr=-1;
Ticker.prototype.Start=function () {
	if (!this.Items.length) return;
	this.El=document.getElementById(this.El);

	this.AlphaOver=document.getElementById(this.AlphaOver);
	this.AlphaOver.className+=" ticker";
	var t=this;
	this.Next();
	setTimeout(
		function () {
			t.Interval=setInterval(
				function () {
					t.Next();
				},
				t.Time
			)
		},
		t.OffsetTime
	);
};
Ticker.prototype.Next=function () {
	var t=this;
	if (this.AlphaOver.filters) {
		DOM.Classes.Remove(t.AlphaOver,"hidden");
		this.AlphaOver.filters[0].apply();
		this.AlphaOver.filters[0].play();

		setTimeout(
			function () {
				DOM.Classes.Add(t.AlphaOver,"hidden");
			},
			500
		);
	}
	this.HideCurrent();
	this.Curr++;
	if (this.Curr==this.Items.length) this.Curr=0;
	this.Print();
}
Ticker.prototype.HideCurrent=function () {
	if (this.Curr>-1){
	var o = $(this.IdPrefix+this.Items[this.Curr].id);
	if(o)o.className="off";
	}
}

Ticker.prototype.Print=function () {
	//this.El.innerHTML=this.Items[this.Curr].GetHTML();
	var o = $(this.IdPrefix+this.Items[this.Curr].id);
	if(o)o.className="block";
	if(this.EnableGrow){
		if(this.El.parentElement){
			this.El.parentElement.style.height = this.El.scrollHeight;
		}

	}
}
Ticker.prototype.OnBeginTransform=function () {
	alert(1);
}
Ticker.prototype.OnBeginTransform=function () {
	alert(2);
}

function TickerItem(id) {
	this.id=id;
}

