/*
 Created @ 30 March 2007 by YFKTN
 show headline ticker ... v 0.1 
 - 0.1-1@02042008 can't show 1st item fixed
*/
/*$ ROTATOR OBJECT $*/
var Rotator = function( idTimer, odItem )
{
	this.iTimer = idTimer;
	this.oItem = odItem;
	this.bIE = document.all ? true:false;
	if( !this.bIE )
	{  // check if firefox
		if(navigator.userAgent.toString().toLowerCase().indexOf('firefox', 0) > -1) this.bIE = true;
	}
	this.iOffset = -1; // #0.1-1
	this.iIntervalID = -1;
}

Rotator.prototype.MoveTick = function()
{
	if(this.iOffset+1 >= this.oItem.GetMaxItem())
		this.iOffset = 0;
	else
		this.iOffset += 1;
	this.oItem.ShowContents(this.iOffset);
}
/*$ HEADLINE OBJECT $*/
var Headline = function( odElement )
{
	/*this.iCntItems = idCntItems;*/
	this.oElement = odElement;
	this.iOffset = -1;
	this.aItems = new Array( 2 );
}

Headline.prototype.ShowContents = function ( iIndex )
{
	this.oElement.innerHTML = this.aItems[iIndex];
}

Headline.prototype.GetMaxItem = function ()
{
	return this.iOffset+1;
}

Headline.prototype.AddItem = function ( sItem )
{
	this.iOffset += 1;
	this.aItems[this.iOffset] = sItem;
}
