<!--
/********************************************************************************
This is functionality for having some piece of text scrollable.
********************************************************************************/

var loaded;

var dom=document.getElementById?1:0;

function scrollit(direction, speed) {
if (loaded) {
	if (dom) {
	var layertop = parseInt(layer['divText'].style.top);
	var scrollheight = (document.getElementById('divCont').offsetHeight - layer['divText'].offsetHeight);
	}


	if (direction == "down" && layertop - 1 > scrollheight) {

  		if (dom)
  		layer['divText'].style.top = (layertop - speed) + "px";
  	}

 	else if (direction == "up" && layertop < -1 ) {

  		if(dom)
  		layer['divText'].style.top = (layertop + speed) + "px";
 	}

	timer = setTimeout("scrollit('" + direction + "', " + speed + ")", 100);
}
}

function stop() {
clearTimeout(timer);
}

function init() {
	if(dom) {
                 layer = document.getElementById("divCont").getElementsByTagName("div");
 		layer['divText'].style.visibility = "visible";
 		layer['divText'].style.top = 0;
                 arrows = document.getElementById("scroll");
                 arrows.style.visibility = "visible";
	}
	loaded=true;
}

//Call the init on page load
onload=init;

//-->
