var xmlHttp;
  var xvar;
  var stat;
  
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function calChange(mnth,yar,url,did,fld)
  {  
	//alert(fld);
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
			//alert(xmlHttp.responseText);
			document.getElementById(did).innerHTML =xmlHttp.responseText;
			if(document.getElementById(did).style.display=="none")
					document.getElementById(did).style.display="";
			else
					document.getElementById(did).style.display="none";
        }
      }
    xmlHttp.open("GET","js/calendar.php?m="+mnth+"&y="+yar+"&url="+url+"&did="+did+"&fld="+fld,true);
	xmlHttp.send(null); 
}	
function place(dt,fld)
{
	//alert(dt+"  "+fld);
	document.getElementById(fld).value=dt;	
}