var scroll_interval_id = null;
jQuery((document)).ready(function(){
			jQuery(".scrollbar").each(function(){
				var obj_ref;
				jQuery((this.parentNode)).find(".content").each(function(){
						obj_ref = this;
				});
				this.content = obj_ref;
				jQuery((this)).find(".scrollUp").each(function(){
						obj_ref = this;
				});
				this.up_arrow = obj_ref;
				jQuery((this)).find(".scrollDown").each(function(){
						obj_ref = this;
				});
				this.down_arrow = obj_ref;
				
				var total_height = jQuery((this.content.parentNode)).height();
				var content_height = jQuery((this.content)).height();
				//alert("Total height: " + total_height);
				//alert("content height: " + content_height);
				if(content_height < total_height){
					this.style.display = "none";	
				}
				else{
					this.style.display = "block";
					//alert("Showing");	
				}
				this.up_arrow.onclick = function(){
					 var current_top = jQuery((this.parentNode.content)).position().top;
					 var new_top = parseInt(current_top) + 100;
					 jQuery((this.parentNode.content)).css("position","relative");
					 jQuery((this.parentNode.content)).css("top",new_top + "px");
				}
				this.up_arrow.onmouseup= function(){
					 var current_top = parseInt(jQuery((this.parentNode.content)).css("top"));
					 jQuery((this.parentNode.content)).stop();
					 if(current_top >= 0){
						jQuery((this.parentNode.content)).css("top","-100px");
					 }
				}
				this.down_arrow.onclick = function(){
					 var current_top = jQuery((this.parentNode.content)).position().top;
					 var new_top = parseInt(current_top) - 100;
					 jQuery((this.parentNode.content)).css("position","relative");
					 jQuery((this.parentNode.content)).css("top", new_top + "px");
				}
				this.down_arrow.onmouseup = function(){
					 var current_top = parseInt(jQuery((this.parentNode.content)).css("top"));
					 var height = jQuery((this.parentNode.content)).height();
					 var parent_height = jQuery((this.parentNode)).height();
					 var fullscroll_position = (-1 * (height - parent_height));
					 jQuery((this.parentNode.content)).stop();
					 if(current_top < fullscroll_position){
						jQuery((this.parentNode.content)).css("top",fullscroll_position);
					 }
				}
			});
	});
	function Start_Scroll_Interval(obj_ref){
		scroll_interval_id = setTimeout(function(){Scroll_Interval_Tick(obj_ref);},500);
	}
	function End_Scroll_Interval(){
		clearInterval(scroll_interval_id);
		scroll_interval_id = null;
	}
	function Scroll_Interval_Tick(object){
		if(scroll_interval_id != null){
			setTimeout(function(){Scroll_Interval_Tick(object);},500)	
		}
		else{
				
		}
	}
