// ////////////////////////////////////////////////////////////////////////////////////
function AccionarMenuEvento(id){
	if ($('#MenuEvento_' + id).css('display') == 'none'){
		$('#MenuEvento_' + id).slideDown('fast');
		$('#MenuEvento_' + id + ' .imagen_ajustable').each(function(){$(this).AjustarImagen('','');});
	}else{
		$('#MenuEvento_' + id).slideUp('fast');
	}			
}
// ////////////////////////////////////////////////////////////////////////////////////
function AccionarEventocabecera(id){
	if ($('#evento_cabecera_' + id).css('display') == 'none'){
		$('#evento_cabecera_' + id).slideDown('fast');
	}else{
		$('#evento_cabecera_' + id).slideUp('fast');
	}			
}
// ////////////////////////////////////////////////////////////////////////////////////
function MostrarEventoVisor(URLImagen, Titular, FechaInicio, HoraInicio, id, key){	
	var texto; 
	texto = '<span class="titular_evento_agenda_01">' + Titular + '</span><br />';	
	if (FechaInicio != ''){texto = texto + '<strong>' + FechaInicio + '</strong>'}
	if (HoraInicio != ''){texto = texto + '&middot;' + HoraInicio + ' horas'}
	
	$('#enlace_imagen_evento').attr('href', 'agendaeventos.asp?id=' + id + '&k=' + key);
	$('#imagen_evento').bind('load', function(){$(this).AjustarImagen(235,178);});
	$('#imagen_evento').attr('src', URLImagen);
	
	//$('#submenu2_1').html(texto); ??????
	document.getElementById('submenu2_1').innerHTML = texto;
}
// ////////////////////////////////////////////////////////////////////////////////////
function RefrescarVisorEventos(){
	if (NumeroEventos > 0){		
		if (IndiceEventoActual == (NumeroEventos-1)){
			IndiceEventoActual = 0;
		}else{
			IndiceEventoActual = IndiceEventoActual + 1;
		}
		//alert(FechaInicioEventos[IndiceEventoActual]);
		MostrarEventoVisor(URLImagenesEventos[IndiceEventoActual], 
						   TitularesEventos[IndiceEventoActual], 
						   FechaInicioEventos[IndiceEventoActual], 
						   HoraInicioEventos[IndiceEventoActual], 
						   IdsEventos[IndiceEventoActual], 
						   KeysEventos[IndiceEventoActual]);
	}
}
// ////////////////////////////////////////////////////////////////////////////////////