<!--
//Scroller 1.0
//By Lone

var collection;
var isIE = isIEx();
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, r, c
		t = document.createElement("table");
		var dir = collection[i].direction
		if (dir=="up" || dir=="down")
		{
			r = t.insertRow(-1);
			c = r.insertCell(-1);
			c.innerHTML = html;
			r = t.insertRow(-1);
			c = r.insertCell(-1);
			c.innerHTML = html;
		}else{
			r = t.insertRow(-1);
			c = r.insertCell(-1);
			c.innerHTML = html;	
			c = r.insertCell(-1);
			c.innerHTML = html;			
		}

		if (div.hasChildNodes)div.innerHTML = "";
		collection[i].object.appendChild(t);
		if (dir=="down") div.scrollTop = div.scrollHeight;
		if (dir=="right") div.scrollLeft = div.scrollWidth;
		Lone_Marquee(i);
	}
}

function Lone_Marquee(){
	if (arguments.length==0) return;
	var index = arguments[0];
	var div = collection[index].object;
	if (collection[index].speed==0)
	{
		if (isIE)
		{
			setTimeout("Lone_Marquee("+index+")", collection[index].interval);
		}else{
			setTimeout(Lone_Marquee, collection[index].interval, index);
		}
		
	}else{
		var sdiv = div.firstChild;
		var dir = collection[index].direction;
		switch (dir)
		{
		case "up" :
			{
				var sdiv0 = sdiv.rows[0].cells[0];
				var sdiv1 = sdiv.rows[1].cells[0];
				if(sdiv1.offsetTop-div.scrollTop<=0)
					div.scrollTop-=sdiv0.offsetHeight;
				else{
					div.scrollTop++;
				}
			}
			break;
		case "down" :
			{
				var sdiv0 = sdiv.rows[0].cells[0];
				var sdiv1 = sdiv.rows[1].cells[0];
				if(sdiv0.offsetTop-div.scrollTop>=0)
					div.scrollTop+=sdiv1.offsetHeight;
				else{
					div.scrollTop--;
				}
			}
			break;
		case "left" :
			{
				var sdiv0 = sdiv.rows[0].cells[0];
				var sdiv1 = sdiv.rows[0].cells[1];			
				if(sdiv1.offsetWidth-div.scrollLeft<=0)
					div.scrollLeft-=sdiv0.offsetWidth;
				else{
					div.scrollLeft++;
				}
			}
			break;
		case "right" :
			{
				var sdiv0 = sdiv.rows[0].cells[0];
				var sdiv1 = sdiv.rows[0].cells[1];
				if(div.scrollLeft<=0)
					div.scrollLeft+=sdiv1.offsetWidth;
				else{
					div.scrollLeft--;
				}
			}
			break;
		}

		if (isIE)
		{
			setTimeout("Lone_Marquee("+index+")", collection[index].speed);
		}else{
			setTimeout(Lone_Marquee, collection[index].speed, index);
		}
	}
}

function isIEx() {
  var ua = navigator.userAgent.toLowerCase();
  return ((ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1));
}
-->