window.addEvent('domready', function() {      
      
        if ($('text').scrollHeight <= $('text').offsetHeight) {
            fx1 = new Fx.Style('slideBar','opacity', {duration:0}).set(0);
        }
        
        var scrollervalue = 'yes';       
		var scroll = new Fx.Scroll('text', {});		
		var mySlide = new Slider($('slideBar'), $('slideButton'), {steps: $('text').offsetHeight,mode: 'vertical',onChange: function(step){$('text').scrollTo(0,(step / $('text').offsetHeight) * ($('text').scrollHeight - $('text').offsetHeight));}}).set(0);
document.addEvent('mousewheel', function(event) {
	event = new Event(event);
	if (event.wheel > 0) {
        mySlide.set(mySlide.step -= 20);
	}
	else if (event.wheel < 0) {
        mySlide.set(mySlide.step += 20);
	} 
});
});   
function injectScroll(newStepValue){
    mySlide.set(newStepValue);
}

