var Ajax = false;
			
			function AjaxRequest() {
		        Ajax = false;
		        if (window.XMLHttpRequest) { // Mozilla, Safari,...
		            Ajax = new XMLHttpRequest();
		        } else if (window.ActiveXObject) { // IE
		            try {
		                Ajax = new ActiveXObject("Msxml2.XMLHTTP");
		            } catch (e) {
		                try {
		                    Ajax = new ActiveXObject("Microsoft.XMLHTTP");
		                } catch (e) {}
		            }
		        }		
			}
			
			

			
			//###################################################################################################
			
		
			
			function mes_atual() {
				var id;
				AjaxRequest();
        		Ajax.onreadystatechange= mostra_agenda;
				Ajax.open('GET','agenda_mes.php', true);
        		Ajax.send(null);
    		}
			
		//########################################################################################
		
		
			function escolha_mes(data) {
				var  data;
				AjaxRequest();
        		Ajax.onreadystatechange= mostra_agenda;
        		//document.write(categoria);
				Ajax.open('GET','agenda_busca.php?data=' + data, true);
        		Ajax.send(null);
    		}
			


			function mostra_agenda() {
				if (Ajax.readyState == 4) {
            		if (Ajax.status == 200) {
							//document.getElementById("conteudo").innerHTML=""; 
							document.getElementById("AGENDA").innerHTML=Ajax.responseText;						
            		} else {               		
						document.getElementById('AGENDA').innerHTML = '[Erro Destaque]';
            		}
        		}
    		}
		
		//########################################################################################
