function event_list( p_arr_events, p_title_holder_id, p_date_holder_id, p_btn_prev_id, p_btn_next_id )
{
	this.arr_events = p_arr_events;
	this.current_index = 0;
	this.max_index = this.arr_events.length - 1;
	
	this.$title_holder = $('#' + p_title_holder_id);
	this.$date_holder = $('#' + p_date_holder_id);
	
	this.$btn_prev = $('#' + p_btn_prev_id ); 
	this.$btn_next = $('#' + p_btn_next_id ); 
	
	this.next = function()
	{
		this.current_index++ ;
		if( this.current_index >= this.max_index )
		{
			this.current_index = this.max_index;
		}
		this.show_current();
		return;
	}
	
	this.previous = function()
	{
		if( this.current_index <= 0 )
		{
			this.current_index = 0;
		}
		else
		{
			this.current_index--;
		}
		this.show_current();
		return;
	}
	
	this.fade_in = function()
	{
		//alert( this.current_index );
		var info = this.arr_events[ this.current_index ];
		
		var date_html = info[1];
		var title_html ='<a href="' + info[2] + '">'  + info[0] + '</a>';
		
		this.$date_holder.html( date_html );
		this.$title_holder.html( title_html );
		
		this.$date_holder.fadeIn();
		this.$title_holder.fadeIn();
		
	}
	
	this.show_current = function()
	{
		this.show_hide_buttons();
		if( this.max_index < 0 )
		{
			return;
		}
		
		this.$title_holder.fadeOut( "normal");
		this.$date_holder.fadeOut( "normal", function(){ obj_event_list.fade_in(); } );
		

		return;
	}
	
	
	
	this.show_hide_buttons = function()
	{
		if( this.current_index <= 0 )
		{
			this.$btn_prev.hide();
		}
		else
		{
			this.$btn_prev.show();
		}
		
		if( this.current_index >= this.max_index )
		{
			this.$btn_next.hide();
		}
		else
		{
			this.$btn_next.show();
		}
	}
	
	this.show_current();
}
