/*
	FILE : scroll.js
	DATE : 5.17.2006
	AUTH : David A Striegel
	COPY : 2006 Copyright Mindframe, Inc.
*/

var scrollTimer = null;

function scroll(inc) { 
	var elm = document.getElementById('content');

	if (elm.offsetHeight && elm.offsetHeight != 0)
		if (!elm.style.height) elm.style.height = elm.offsetHeight + 'px';

	var curY = parseInt(elm.style.top);
	var curH = parseInt(elm.style.height);
	
	var topLimit = 30;
	var btmLimit = (0 - (curH - 428 - 0));
	
	if (inc > 0 && curY >= topLimit) curY -= inc;
	if (inc < 0 && curY <= btmLimit) curY -= inc;
	
	elm.style.top = (curY + inc) + 'px';

	scrollTimer = setTimeout("scroll(" + inc + ");", 1);
}

function stopScroll() { 
	clearTimeout(scrollTimer); 
	scrollTimer = null; 
}

