function agenda(id){
	for(i=1;i<=3;i++){
		document.getElementById('agenda'+i).style.display = 'none';
	}
	document.getElementById('agenda'+id).style.display = 'block';
	document.getElementById('years').style.background = 'url(' + agendaPath + '/images/year'+id+'.jpg) no-repeat';
	
	return false;
}

function openAgenda(id){
	$.ajax({
		type: "POST",
		url: agendaPath + "/agenda.aspx",
		data: "id="+ id,
		success: function(msg){
			$("#dialogAgenda").html(msg);
			$('#dialogAgenda').dialog('open');
		}
	});			
}

var agendaState = 'h';
$("#btnMoreAgenda").click(function(){
	if(agendaState == 'h'){
		agendaState = 's';
		$(".hiddenEvents").slideDown();
		$("#btnMoreAgenda").html('<img src="' + agendaPath + '/images/arrow.png" border="0" />see less events');
	}else{
		agendaState = 'h';
		$(".hiddenEvents").slideUp(400, function(){setTimeout('$(".hiddenEvents").hide();', 500)});
		$("#btnMoreAgenda").html('<img src="' + agendaPath + '/images/arrow.png" border="0" />see more events');
	}
	return false;
});
$(document).ready(function(){
	$("#dialogAgenda").dialog({
		width:400,
		height:200,
		modal: true,
		autoOpen: false,
		resizable: true
	});
});
