function getXmlHttp(){
  var xmlhttp;
  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 gc (param)
{
	var xmlhttp = getXmlHttp();

	xmlhttp.open('GET', '/lib/calendar.php?'+param, true);

	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4)
		{
			if(xmlhttp.status == 200)
			{
				document.getElementById('calendar').innerHTML = xmlhttp.responseText;
				document.getElementById('calendar').style.cursor='auto';
			}
		}
		  else
		{
			document.getElementById('calendar').style.cursor='wait';
			document.getElementById('calTbl').style.backgroundColor='#ccc';
		}
	}

	xmlhttp.send(null);
}

