timerID = null;
        
function ScrollUp(speed){
	if(document.getElementById){
		if(parseInt(txt.style.top) < 0){ txt.style.top = parseInt(txt.style.top) + speed + "px"; }
		timerID = setTimeout("ScrollUp("+speed+")",30)
	}
}

function ScrollDown(speed){
	if(document.getElementById){                        
		if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ txt.style.top = parseInt(txt.style.top) - speed + "px"; }
		timerID = setTimeout("ScrollDown("+speed+")",30)
	}
}

function ScrollStop(){
	if(document.getElementById){ clearTimeout(timerID); }
}

function ScrollInit() {
	if (document.getElementById) {
		var x = new getObjX('arrowUp'); x.style.display = 'none';
		var x = new getObjX('arrowDown'); x.style.display = 'none';
		cnt = document.getElementById("cont1");
		txt = document.getElementById("text1");
		txt.style.top = 0;
		if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ 
			var x = new getObjX('arrowUp'); x.style.display = '';
			var x = new getObjX('arrowDown'); x.style.display = '';
		}
	}
}

function getObjX(name) {
	if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; }
	else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; }
	else if (document.layers) { this.obj = document.layers[name]; this.style = document.layers[name]; }
}

