// JavaScript Document
function objetoAjax()
{
  var xmlhttp=false;
  try {   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }   catch (e) { 
  try {   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false;   } } 
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {  xmlhttp = new XMLHttpRequest(); }
  return xmlhttp;
}
function cargarpagina(url,id)
{
	//alert(opcion);
		//donde se mostrará el formulario con los datos
		divFormulario = document.getElementById(id);
		
		ajax=objetoAjax();
		ajax.open("POST", url);
		ajax.onreadystatechange=function() {
			if (ajax.readyState==4) {
				divFormulario.innerHTML = ajax.responseText
				divFormulario.style.display="block";
									}
			if(ajax.readyState==1) { 
			divFormulario.innerHTML  =  "<img src='./images/loader.gif'/>"; 
			}
		}
		ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		ajax.send(null)
		//alert("Informacion Guardada!!!");
		
	}
function refrescarMes(mes,ano,id)
{
	//alert(opcion);
		//donde se mostrará el formulario con los datos
		divFormulario = document.getElementById(id);
		
		ajax=objetoAjax();
		ajax.open("GET", "calendario.php?mes="+mes+"&ano="+ano);
		ajax.onreadystatechange=function() {
			if (ajax.readyState==4) {
				divFormulario.innerHTML = ajax.responseText
				divFormulario.style.display="block";
									}
			if(ajax.readyState==1) { 
			divFormulario.innerHTML  =  "<img src='./images/loader.gif'/>"; 
			}
		}
		ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		ajax.send();
		//alert("Informacion Guardada!!!");
		
	}
