function getHeight(e) {
	if (e.offsetHeight) { return e.offsetHeight; }
	else if (e.clip) { return e.clip.height; }
	else { return -1; }
}
function do_scroll(s, s2, h) {
    var x = parseInt(s.top, 10) - 1;
    if (x < -h) {
        x = 0;
    }
    s.top = x + "px";
    s2.top = (x + h) + "px";
}
var iid;
function scroll_create_second() {
    var e = document.getElementById("scroll");
    var e2 = e.cloneNode(true);
    e2.id = "scroll2";
    e2.style.top = getHeight(e) + "px";
    e.parentNode.appendChild(e2);
}
function scroll_init() {
    var e = document.getElementById("scroll");
    iid = setInterval(function () {do_scroll(e.style, document.getElementById("scroll2").style, getHeight(e));}, 50);
}
function scroll_pause() {
    clearInterval(iid);
}
function scroll_resume() {
    clearInterval(iid);
    scroll_init();
}
scroll_create_second();
scroll_init();

