/****
Seo Link Scroller
Copyright Fabio Sutto (www.seos.it)
Utilizzabile liberamente purchè queste righe non vengano cancellate
****/




function wmrScroller(config)
{ 
    this.elm = document.getElementById?document.getElementById(config.id):document.all[config.id] ;
	this.step = config.step ;
	this.ms = config.ms ;
	this.pos = 0 ;
    this.interval = null ;
	this.min = config.minLeft ;
	this.max = config.maxLeft ;
}

function _goLeft()
{
    if(this.pos<this.min)
    {
       this.pos+= this.step ;
       this.elm.style.left = this.pos + 'px' ;
    }
    else
    {
       clearInterval(this.interval) ;
    }

} wmrScroller.prototype.goLeft = _goLeft ;

function _goRight()
{
    if(this.pos>this.max)
    {
       this.pos-= this.step ;
       this.elm.style.left = this.pos + 'px' ;
    }
    else
    {
       clearInterval(this.interval) ;
    }
} wmrScroller.prototype.goRight = _goRight ;

function _move(where)
{
    wmrGlobalObj = this
    if(where == 0)
	{
	    this.interval = setInterval('wmrGlobalObj.goLeft()', this.ms) ;
	}
	else
	{
	    this.interval = setInterval('wmrGlobalObj.goRight()', this.ms) ;
	}
	
} wmrScroller.prototype.move = _move ;

function _stop()
{
   clearInterval(this.interval) ;
} wmrScroller.prototype.stop = _stop ;
