<!--
//By Lone
var collection;
function scrollers(){
	this.items	= [];
	this.add = function(divId, dir, sp){
		var newItem				= {};
		newItem.object			= document.getElementById(divId);
		newItem.direction		= dir;
		newItem.speed			= sp;
		newItem.interval			= 0;
		newItem.object.onmouseover = function(){newItem.interval=newItem.speed; newItem.speed=0}
		newItem.object.onmouseout = function(){newItem.speed=newItem.interval; newItem.interval=0}
		this.items[this.items.length]		= newItem;
	}

	this.start = function()
	  {
		collection	= this.items;
	 	startscroll();
	  }
}

function startscroll(){
	for (var i=0; i<collection.length; i++)
	{
		var div = collection[i].object;
		var html = div.innerHTML;
		var t = document.createElement("table");
		var r = document.createElement("tr");
		var c1 = document.createElement("td");
		var c2 = document.createElement("td");
		c1.innerHTML = html;
		c2.innerHTML = html;

		if (collection[i].direction=="up")
		{
			r.appendChild(c1);
			t.appendChild(r);
			r = document.createElement("tr");
			r.appendChild(c2);
			t.appendChild(r);
		}else{
			r.appendChild(c1);
			r.appendChild(c2);
			t.appendChild(r);
		}
		//div2.className = "flatLayout";
		html = t.outerHTML;
		collection[i].object.innerHTML = html;
		Lone_Marquee(i);
	}
}

function Lone_Marquee(index){
	var div = collection[index].object;
	if (collection[index].speed==0)
	{
		setTimeout("Lone_Marquee("+index+")", collection[index].interval);
	}else{
		var sdiv = div.childNodes;
		var dir = collection[index].direction;
		if (dir=="up")
		{
			var sdiv0 = sdiv[0].rows[0].cells[0];
			var sdiv1 = sdiv[0].rows[1].cells[0];
			if(sdiv1.offsetTop-div.scrollTop<=0)
				div.scrollTop-=sdiv0.offsetHeight;
			else{
				div.scrollTop++;
			}
		}else{
			var sdiv0 = sdiv[0].rows[0].cells[0];
			var sdiv1 = sdiv[0].rows[0].cells[1];			
			if(sdiv1.offsetWidth-div.scrollLeft<=0)
				div.scrollLeft-=sdiv0.offsetWidth;
			else{
				div.scrollLeft++;
			}
		}
		setTimeout("Lone_Marquee("+index+")", collection[index].speed);
	}
}
-->
