
var xmlHttp2  
function ajaxEventCall(dat)
{
	

	xmlHttp2=GetXmlHttpObject()
	if (xmlHttp2==null) 
	{
		alert("Browser does not support HTTP Request")
		return
	}
	
	document.getElementById('displayEvents').innerHTML='';
		var url="components/com_events/ajax/search_calendar.php"
		url=url+"?dateStr="+dat
		url=url+"&sid="+Math.random()
	
	
	xmlHttp2.onreadystatechange=stateChanged2
	xmlHttp2.open("GET",url,true)
	xmlHttp2.send(null)
}

function stateChanged2(v) 
{
	
	if (xmlHttp2.readyState==1 || xmlHttp2.readyState==2 || xmlHttp2.readyState==3)
	document.getElementById('showLoading').style.display='';
	
	if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
	{
		var answer = xmlHttp2.responseText
		document.getElementById('displayEvents').innerHTML=xmlHttp2.responseText;
		document.getElementById('showLoading').style.display='none';
	}
}

function GetXmlHttpObject() 
{
	var objXMLHttp=null
	if (window.XMLHttpRequest) 
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject) 
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

