﻿
function __getElement(id) {
	return document.getElementById(id);
}

function Scroll_Start(id, timeoutvar, height) {
	element = __getElement(id);
	
	if(eval(timeoutvar)) {
		element.style.top = parseInt(element.style.top) - 1 + "px"
		
		if(parseInt(element.style.top) < -element.offsetHeight) {
			element.style.top = height + "px"
		}
	}
	
	if(element.offsetHeight > height - 10 || element.offsetHeight == 0) {
		timeoutvar2 = setTimeout("Scroll_Start('" + id + "', '" + timeoutvar + "', " + height + ")", 35);
	} else {
		element.style.top = "0px";
	}
}

