function scrollup() {
	upTimer = setTimeout('doScrollUp()', 1);
}

function doScrollUp () {
	var originalValue = parseInt(document.getElementById('moving').style.top);	// Determine the current position
	
	var containerHeight = parseInt(document.getElementById('container').style.height); // get the height of the container div
	var actualDivHeight = document.getElementById('moving').offsetHeight; // get the height of the div, so you can stop scrolling it when you need to
	if (originalValue <= -(actualDivHeight - containerHeight)) { // if div is about to fly off the screen, stop this madness!
		clearTimeout(scrollTimer);
		//alert ('stopped.\n\noriginalValue:'+originalValue);
	} else {
		newPixelPosition = originalValue - 10; // add the change
		newPosition = newPixelPosition + "px"; // add 'px' back on, so you can assign it to the style
		document.getElementById('moving').style.top=newPosition; // move the div
		scrollTimer = setTimeout('doScrollUp()', 20);	// now do it again
	}
}

function scrolldown() {
	upTimer = setTimeout('doScrollDown()', 1);
}

function doScrollDown () {
	var originalValue = parseInt(document.getElementById('moving').style.top);	// Determine the current position
	
	if (originalValue >= 0) { // if div is about to fly off the screen, stop this madness!
		clearTimeout(scrollTimer);
		//alert ('stopped.\n\noriginalValue:'+originalValue);
	} else {
		newPixelPosition = originalValue + 10; // add the change
		newPosition = newPixelPosition + "px"; // add 'px' back on, so you can assign it to the style
		document.getElementById('moving').style.top=newPosition; // move the div
		scrollTimer = setTimeout('doScrollDown()', 20);	// now do it again
	}
}

function stopscrolling() {
	clearTimeout(scrollTimer);
	}