function scroll(id, opts) {
	if( document.getElementById(id) )
    {
        var args = {step: 2, rate: 40, spacing: 2};
        for (var i in opts) args[i] = opts[i];
    
        var curpos = 0;
        var content = document.getElementById(id).getElementsByTagName('div')[0];
        var height = content.offsetHeight + args.spacing;
        content.appendChild(content.cloneNode(true)).style.top = height + 'px';
    
        function scrollStep() {
            var pos = curpos - args.step;
            if (pos < -height) pos = 0;
            content.style.top = pos + 'px';
            curpos = pos;
        }
        setInterval(scrollStep, args.rate);
	}
}

window.onload = function() { scroll('scroller'); };