 function slider(content,handle,context,paso,arriba,abajo){
	
	var slider = new Slider(content,handle,{
		steps: 100,	// There are 35 steps
		range: [0],	// Minimum value is 8
		wheel: true, 
		mode:"vertical",
		onChange: function(value){
			
			var position =0;
			var height = context.getCoordinates().height;
			position = -(context.getCoordinates().height*(value/100));
			context.setStyle('top',(position*0.98));
		}
	}).set(-context.getCoordinates().top);
	
	abajo.addEvent('click', function(e){
		e = new Event(e).stop();
		var step = slider.step + paso;
		slider.set(step);
	});
	arriba.addEvent('click', function(e){
		e = new Event(e).stop();
		var step = slider.step - paso;
		slider.set(step);
	});
}	
 function slider2(content,handle,context,paso,izq,der){
	
	var slider = new Slider(content,handle,{
		steps: 100,	// There are 35 steps
		range: [0],	// Minimum value is 8
		wheel: true, 
		onChange: function(value){
			
			var position =0;
			var left = context.getCoordinates().left;
			var width = context.getCoordinates().width;
			position = -(width*(value/100));
			context.setStyle('left',(position*0.98));
		}
	}).set(-context.getCoordinates().left);
	
	der.addEvent('click', function(e){
		e = new Event(e).stop();
		var step = slider.step + paso;
		slider.set(step);
	});
	izq.addEvent('click', function(e){
		e = new Event(e).stop();
		var step = slider.step - paso;
		slider.set(step);
	});
}	

function scroll(content, context, paso, arriba, abajo){
	
	var myFx = new Fx.Elements(context, { duration: 120 });
	var position =0;
	arriba.addEvent('click', function(e){
		
		var pos = context.getStyle('top').toInt();
		var height = content.getStyle('height').toInt();
		var bottom = pos + context.getStyle('height').toInt();
		if(pos < 0){
			desplazar =  context.getStyle('top').toInt() + paso;
			myFx.start({ '0': { 'top': desplazar } });
		}
	});
	abajo.addEvent('click', function(e){
		
		var pos = context.getStyle('top').toInt();
		var height = content.getStyle('height').toInt();
		var bottom = pos +context.getStyle('height').toInt();
		if(bottom > height){
			desplazar =  context.getStyle('top').toInt() - paso;
			myFx.start({ '0': { 'top': desplazar} });
		}
	});

}		
				
