function handleHttpResponse()
{
  if (http.readyState == 4) { document.getElementById('divAgenda').innerHTML = http.responseText; }
}

function getScriptPage(y,m)
{
	http.open("POST", ajax_script_page + "&y=" + escape(y)+ "&m=" + escape(m), true);
	http.onreadystatechange = handleHttpResponse;

	http.send(null);
	if(y.length==4 && m.length==2)
		box('1');
	else
		box('0');
}

function box(act)
{
  if(act=='0') { document.getElementById('divAgenda').style.display = 'none';
  } else  { document.getElementById('divAgenda').style.display = 'block';
  }
}


function getHTTPObject()
{
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
	@else
	xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	return xmlhttp;
}


var http	= getHTTPObject();
