function MyScroller () {
	var going = false;
	var height = 0;
	var pause = 500;
	var time_step = 0;
	var i = 0;
	var timeoutID;
	var scroll_stop = false;
	var scroll_step = 1;

	function getElementId(id) {
	    var elm = document.getElementById(id);
	    return elm ? elm : null;
	};

	function roll_to_next () {
	  return ((! scroll_stop ) && going);
	}

	start_scroll = function () {
		going = true;
		continue_scroll();
	}
	function continue_scroll () {
		timeoutID = setTimeout ('anim_scroll()', time_step);
	}

	function stop_scroll () {
	  clearTimeout(timeoutID);
	}

	anim_scroll = function() {
		stop_scroll();
		if ( roll_to_next () ) {
	  	    do_anim();
	  	    continue_scroll();
	  	} else {
	  		timeoutID = setTimeout ('start_scroll()', pause);
	  	}
	}

	function scroller_next_i() {
		if ( getElementId('scroll_item' + (i+1)) )
			return (i + 1);
		else
			return 0;
	}

	function do_anim() {
		var item_i = getElementId ('scroll_item' + i);
		var item_next = getElementId ('scroll_item' + scroller_next_i());
		item_i.style.top = item_i.offsetTop - scroll_step + 'px';
		if (item_i != item_next) {
			item_next.style.top = item_next.offsetTop - scroll_step + 'px';
		}
		if ( -item_i.offsetTop > height ) {
			i = scroller_next_i();
			item_i.style.top = height;
			//switched to a new item, pause, eventually
			if (pause) {
				going = false;
				//alert ((! scroll_stop ) && going );
			}
		}
	}

	this.resume = function (){
		scroll_stop = false;
	}

	this.stop = function (){
		scroll_stop = true;
	}

	this.run_scroll = function (p_height, p_scroll_step, p_time_step, p_pause){
		height = p_height;
		time_step = p_time_step;
		pause = p_pause;
		scroll_step = p_scroll_step;
		if ( getElementId ('scroll_item' + i) ) {
			//reset all others items!!!
			for (var j=1 ; getElementId('scroll_item'+j); j++ )
				getElementId('scroll_item'+j).style.top = height+'px';
			//start_scroll();
			timeoutID = setTimeout ('start_scroll()', pause);
		}
	}

}
