// JavaScript Document

function calendario(url, form){
	var data = form.dt.value;
	
	url = url+"?data="+data;
	
	if (document.getElementById) { //Verifica se o Browser suporta DHTML.
		if(window.XMLHttpRequest) {
			try {
				HttpReq = new XMLHttpRequest();
			} catch(e) {
				HttpReq = false;
			}
		} else if(window.ActiveXObject) {
			try {
				HttpReq = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					HttpReq = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					HttpReq = false;
				}
			}
		}

	if(HttpReq) {
			HttpReq.onreadystatechange = XMLHttpRequestChange;
			HttpReq.open("GET", url, true);
			HttpReq.send(null);
		}		  
	}
}

function XMLHttpRequestChange() {
	if (HttpReq.readyState == 4 && HttpReq.status == 200){
      var result = HttpReq.responseText;
      var texto = document.getElementById("agenda");
		texto.innerHTML = result;
   }
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////

function calendario_2(url){
	if (document.getElementById) { //Verifica se o Browser suporta DHTML.
		if(window.XMLHttpRequest) {
			try {
				HttpReq = new XMLHttpRequest();
			} catch(e) {
				HttpReq = false;
			}
		} else if(window.ActiveXObject) {
			try {
				HttpReq = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					HttpReq = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					HttpReq = false;
				}
			}
		}

	if(HttpReq) {
			HttpReq.onreadystatechange = XMLHttpRequestChange_1;
			HttpReq.open("GET", url, true);
			HttpReq.send(null);
		}		  
	}
}

function XMLHttpRequestChange_1() {
	if (HttpReq.readyState == 4 && HttpReq.status == 200){
      var result = HttpReq.responseText;
      var texto = document.getElementById("agenda");
		texto.innerHTML = result;
   }
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////


function menu(url){
	if (document.getElementById) { //Verifica se o Browser suporta DHTML.
		if(window.XMLHttpRequest) {
			try {
				HttpReq = new XMLHttpRequest();
			} catch(e) {
				HttpReq = false;
			}
		} else if(window.ActiveXObject) {
			try {
				HttpReq = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					HttpReq = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					HttpReq = false;
				}
			}
		}

	if(HttpReq) {
			HttpReq.onreadystatechange = XMLHttpRequestChange_2;
			HttpReq.open("GET", url, true);
			HttpReq.send(null);
		}		  
	}
}

function XMLHttpRequestChange_2() {
	if (HttpReq.readyState == 4 && HttpReq.status == 200){
      var result = HttpReq.responseText;
      var texto = document.getElementById("menu");
		texto.innerHTML = result;
   }
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////


function cal_1(url, form)	{
	var data = form.dt.value;
	
	url = url+"?data="+data;
	
	window.location = url;
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////

function cal_2(url)	{
	window.location = url;
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
