//JavaScript Document
$(document).ready(function(){
	$("#accordionBoletines li").click(muestra_bol);
	jQuery('#accordionBoletines').accordion({
		autoheight: false,
		alwaysOpen: false
	});
});

muestra_bol = function(){
	var anio_mes = this.id;
	obtieneBole(anio_mes);
}

abrir_bol = function(nBoletin){
	window.open("http://www.comsoc.df.gob.mx/noticias/boletines.html?id=" + nBoletin, "boletin", "menu=no, direction=no, resizable, scrollbars=yes")
}

obtieneBole = function(anio_mes){
	$.ajax({
    	type:     "POST",
        url:      "/include/obtiene_boletines.php",
        async:    true,
        data:     "anio_mes=" + anio_mes,
        success:  function() { construye_vista(arguments[0]) },
        error:    function() { construye_vista("Error en la Petici&oacute;n al Servidor") }        
	}); 
}

construye_vista = function(respuesta) {
	$('#divContenido_Temas_2').html(respuesta);
}