// JavaScript Document
var timer;
var position = 0;

function scroll_up() {
 	var content = document.getElementById("scrollcontent");
	var frame = document.getElementById("right","right_wide");
	if (position < 0 - content.offsetHeight + frame.offsetHeight - 20) {
		clearInterval(timer); // stop moving
     	content.style.top = position;
	}
  	else {
		position -= 2;
		content.style.top = position;
	}
}

function scroll_down() {
	var content = document.getElementById("scrollcontent");
	if (position >= 0 ) {
		clearInterval(timer); // stop moving
      	content.style.top = position;
	}
  	else {
		position += 2;
		content.style.top = position;
	}
}

function goUp() {
  timer = setInterval("scroll_up()", 30);
}

function goDn() {
  timer = setInterval("scroll_down()", 30);
}
