<!--

var moving = false;




$(function() {
		 
			  $.fn.mousehold = function(timeout, f) {
    	if (timeout && typeof timeout == 'function') {
    		f = timeout;
    		timeout = 100;
    	}
    	if (f && typeof f == 'function') {
    		var timer = 0;
    		var fireStep = 0;

    		return this.each(function() {
    			var clearMousehold = function() {
    				clearInterval(timer);
    				if (fireStep == 1) f.call(this, 1);
    				fireStep = 0;
    			};

    			$(this).mousedown(function() {
    				fireStep = 1;
    				var ctr = 0;
    				var t = this;
    				timer = setInterval(function() {
    					ctr++;
    					f.call(t, ctr);
    					fireStep = 2;
    				}, timeout);
    			}).mouseout(clearMousehold).mouseup(clearMousehold);
    		});
    	}
    };    

	$("#move_down").mousehold(function(){
		var top = $("#scrollText").css("top");	
		//var display = $("#move_up").css("display");
		var height = $('#scrollText').innerHeight();	
		var containerHeight = $("#scrollContainer").css("height");
		
		top = top.replace("px","")
		containerHeight = containerHeight.replace("px","")
			
		top = parseInt(top)
		containerHeight = parseInt(containerHeight)
		
		var maxTop = height - containerHeight;
			
		maxTop = maxTop - (maxTop*2);
			
		var nextTop = top - 90;
	
		if (nextTop < maxTop) {			
			nextTop = maxTop;
		}
		
		/*if (display == "none") {		
			$("#move_up").css("display","inline");
		}*/
		
		if (moving == false) {	
			if (height > containerHeight) {
				moving = true;
				$("#scrollText").animate({"top": nextTop}, 500, "linear", function(){
					 moving = false;
					 if (nextTop == maxTop) {
						//$("#move_down").css("display","none");
					}				 
				});
			}	
		}
	});	
	
	$("#move_up").mousehold(function(){
		var top = $("#scrollText").css("top");	
		//var display = $("#move_down").css("display");	
		top = top.replace("px","")	
		top = parseInt(top)
			
		maxTop = 0;
		
		var nextTop = top + 90;
		
		if (nextTop > maxTop) {		
			nextTop = maxTop;	
		}
		
		/*if (display == "none") {		
			$("#move_down").css("display","inline");
		}*/
		
		if ((top < 0) && (moving == false)) {
			moving = true;
			$("#scrollText").animate({"top": nextTop}, 500, "linear", function(){
				 moving = false;
				 if (nextTop == maxTop) {
					//$("#move_down").css("display","none");
				}				 
			});
		}
		
	
	});	
	
	$("#move_up").click(function(){ return false });
	$("#move_down").click(function(){ return false });

	
	
			 				   			
});
//-->
