function scrollboxes(target, ident, blocker, interval, count) {
	
	cantick = true;
	this.id = 1;
	
	
	this.scrollLeft = function()
	{
	
	   targetnode = dojo.byId(target);
	   id = id - 2;
	   if(id <= 0) {
	     id = count;
       }
	   console.log(id);
	   cantick = true;
	   scrollTicker();
	   cantick = false;
	   
	}
	
	this.scrollRight = function()
    {
    
       targetnode = dojo.byId(target);
       console.log(id);
       cantick = true;
       scrollTicker();
       cantick = false;
       
    }
	
	
	this.init = function ()
	{
		tickerinterval = setInterval ( "scrollTicker()", interval );
		targetnode = dojo.byId(target);
		startnode = dojo.byId(ident + '-' + id);
		targetnode.innerHTML = startnode.innerHTML;
		blockernode = dojo.byId(blocker)
		id++;
		dojo.connect(blockernode, "onmouseover", null, stopTicker);
		dojo.connect(blockernode, "onmouseout", null, startTicker);
	}
		
	stopTicker = function stopTicker() 
	{
		cantick = false;
	}	

	startTicker = function startTicker() 
	{
		cantick = true;
	}	
	
	this.scrollTicker = function scrollTicker() 
	{
		if(!cantick) return false;
		if(id > count) {
			id = id - count;
		}
		console.log(id);
		thisnode = dojo.byId('item-' + id);
		targetnode = dojo.byId(target);
		dojo.fadeOut({node : target}).play();
		html = thisnode.innerHTML;
		setTimeout("dojo.fadeIn({node : '" + target + "'}).play(); 	targetnode.innerHTML = html;", 250);
		id++;
			
	}
	
	return this
	
}

// array.map() function for those browsers that don't support it
if (!Array.prototype.map)
{
  Array.prototype.map = function(fun /*, thisp*/)
  {
    var len = this.length >>> 0;
    if (typeof fun != "function")
      throw new TypeError();

    var res = new Array(len);
    var thisp = arguments[1];
    for (var i = 0; i < len; i++)
    {
      if (i in this)
        res[i] = fun.call(thisp, this[i], i, this);
    }

    return res;
  };
}




