function scroll()
{

	window.addEvent('domready', function(){	
		scroll_box_height=$('contentInbox').getSize().y;
		

		var step_length=parseInt(scroll_box_height/10);
		var scrollbar = $('scrollbar'),
		scrollbarButton = $('scrollbarButton'),
		text = $('contentMenu');
		var scrollbar_button_size=29;	
		var size = text.getScrollSize();
		s = ((size.y-(scroll_box_height-10))/step_length).round();
		
		var current_step=0;	

		if(size.y>scroll_box_height) $('scrollbar').setStyle('display', 'block');


		scroller = new Slider(scrollbar, scrollbarButton, {
			steps: s,	
			wheel: true,
			mode: "vertical",
			onChange: function(step){
				current_step=step;
				text.scrollTo(0,step*step_length);	
			}
		}).set(0);	
		


		text.addEvent('mousewheel', function(e){

			if(e.wheel<0) 
				{
				if(current_step<s)
					{
					text.scrollTo(0,(current_step+1)*step_length);
					current_step=current_step+1;
					var current_top=parseInt((scroll_box_height/s)*current_step);
					if(current_top<=(scroll_box_height-scrollbar_button_size)) $('scrollbarButton').style.top = current_top + 'px';
					else $('scrollbarButton').style.top = (scroll_box_height-scrollbar_button_size) + 'px';
				}
				return false;
			}
			else 
				{
				if(current_step>0)
					{
					text.scrollTo(0,(current_step-1)*step_length);
					current_step=current_step-1;
					var current_top=parseInt((scroll_box_height/s)*current_step);
					if(current_top<=(scroll_box_height-scrollbar_button_size)) $('scrollbarButton').style.top = current_top + 'px';
					else $('scrollbarButton').style.top = (scroll_box_height-scrollbar_button_size) + 'px';
				}
				return false;
			}

		});	



	});	




}

