//configure these 2 variables to change the size of the scroller
var scrollerwidth='150px'
var scrollerheight='80px'

//configure these 2 variables to pause time (in milliseconds)
//between messages and after a mouse hover
var scrollerpause = 10000;
var hoverpause = 1000;

//configure the below variable to change the contents of the scroller
var messages=new Array();

var ie = document.all;
var dom = document.getElementById;
var moving = true;
var timeoutID = null;
var scrollies = new Array();
var scoller_int;

function moveDivs() {
	if (moving) {
		for (var q in scrollies) {
			var tdiv = eval(scrollies[q]);
			if (parseInt(tdiv.style.top) > 0 && parseInt(tdiv.style.top) <= 5) {
				tdiv.style.top = 0 + "px";
				timeoutID = setTimeout("moveDivs()", scrollerpause);
				return;
			}
		}
		setTimeout("moveDivs()", 50);
		for (var q in scrollies) {
			var tdiv = eval(scrollies[q]);
			if (parseInt(tdiv.style.top) >= -parseInt(scrollerheight)) {
				tdiv.style.top = parseInt(tdiv.style.top) - 5 + "px";
			} else {
				tdiv.style.top = parseInt(scrollerheight);
				tdiv.innerHTML = messages[scoller_int];
				if (scoller_int == messages.length - 1) {
					scoller_int = 0;
				} else {
					scoller_int++;
				}
			}
		}
	}
}

function startScroll() {
	if (ie || dom) {
		scrollies[0] = (ie? first2 : document.getElementById("first2"));
		scrollies[1] = (ie? second2 : document.getElementById("second2"));
		moveDivs();
		scrollies[scrollies.length - 1].style.top = scrollerheight;
		scrollies[scrollies.length - 1].style.visibility = 'visible';
	}
}