function Ticker( sID, nSpeed )
{
	this._id     = sID;
	this._ticker = document.getElementById( sID );
	this._ticker._self			= this;
	this._ticker.onmouseover	= function(){this._self.stop();};
	this._ticker.onmouseout		= function(){this._self._timer = setInterval( this._self._self + "._tick()", this._self._speed );};

	this._speed  = Math.round( nSpeed || 50 );
	this._width  = this._ticker.parentNode.offsetWidth;
	this._height = this._ticker.offsetHeight;
	this._x      = 0;
	this._y      = 0;

	this._tickmethod = this._ticker.parentNode.className.match( /verticalticker/ ) ? this._tickvertical : this._tickhorizontal;

	var bExtendWidth = true;

	for ( var i = 0; i < this._ticker.childNodes.length; ++i )
		if ( this._ticker.childNodes[ i ].nodeType != 1 ) //  remove whitespace
			this._ticker.removeChild( this._ticker.childNodes[ i ] );

	this._scrollWidth = this._ticker.firstChild.offsetWidth + this._width;
	this._ticker.firstChild.innerHTML += this._ticker.firstChild.innerHTML;
	this._childwidth = this._ticker.firstChild.offsetWidth - this._width;
	window[ ( this._self = "TickerObject_" + this._id ) ] = this;
};
Ticker.prototype._tick = function()
{
	this._tickmethod();
};
Ticker.prototype._tickvertical = function()
{
	this._ticker.scrollTop = this._y;
	++this._y;
	if ( this._y > this._height )
		this._y = 0;
};
Ticker.prototype._tickhorizontal = function()
{
	this._ticker.scrollLeft = this._x;
	++this._x;
	if ( this._x > this._scrollWidth )
		this._x = this._width;
};
Ticker.prototype.start = function( nDelay )
{
	if ( typeof nDelay == "number" )
		this._timer = setTimeout( this._self + ".start();", nDelay );
	else
		this._timer = setInterval( this._self + "._tick()", this._speed );
};
Ticker.prototype.stop = function()
{
	clearTimeout( this._timer );
};
