//SCROLL ENGINE

function startScroll(direction) {
	scrolling = 1;
	scroll(direction);
}

function scroll(direction) {
	if (scrolling == 1) {
		if ((direction == 1) && (y>dest_y)) {
			//Keep on moving the div till the target is achieved 
			y = y - interval;
		}
		else {
			if ((direction == 0) && (y<orig_y)) {
			//Keep on moving the div till the target is achieved 
				y = y + interval;
			}
		}
	
	//Move the div to new location (enter DIV ID between ("")
		document.getElementById("bioScroll").style.top  = y+'px';

		if ((y+interval > dest_y) && (direction == 1)) {
			//Keep on calling this function every 100 microsecond 
			//	till the target location is reached or scrolling is stopped
			scrollMotion = 'scroll('+direction + ')';
			setTimeout(scrollMotion,50);
		} 
	
		if ((y+interval < orig_y) && (direction == 0)) {
			//Keep on calling this function every 100 microsecond 
			//	till the target location is reached or scrolling is stopped
			scrollMotion = 'scroll('+direction + ')';
			setTimeout(scrollMotion,50);
		}
	}
}
	
function stopScroll() {
	scrolling = 0;
}