function determineHeight(elementName) {
    var divElement = document.getElementById(elementName);
    var divHeight; /* This calculates the height of the div */
    if (divElement.offsetHeight) {
	    divHeight = divElement.offsetHeight;
    } else if (divElement.style.pixelHeight) {
	    divHeight = divElement.pixelHeight;
    }
    return divHeight;
}

function initializeScroll() {
	minScroll = determineHeight('scrollWindowDiv');
	maxScroll = determineHeight('scrollContentDiv');
	topPosition = minScroll;
	scrollContent = false;
	setInterval(divScroll, 30);
}

function pauseScroll() {
	scrollContent = true;
}

function continueScroll() {
	scrollContent = false;
}

function divScroll() {
	if (scrollContent == false) {
		topPosition--;
		if (topPosition == 0 - maxScroll) {
			topPosition = minScroll;
		}
		document.getElementById("scrollContentDiv").style.top = topPosition + 'px';
	}
}