function posts(year,month,day)
{
	if(window.XMLHttpRequest)
	{
		x = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		x = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if(x != null)
	{
		x.onreadystatechange=xPosts;
		x.open("POST","events.php?year="+year+"&month="+month+"&day="+day,true);
		x.send(null);
	}
	else
	{
		alert("no");
		return '';
	}
}

function xPosts()
{
	if(x.readyState==4)
	{
		if(x.status==200)
		{
			if(x.responseText.length > 0)
			{
				var posts = document.getElementById("events");
				posts.innerHTML = x.responseText;
			}
		}
		else
		{
			alert(x.statusText);
		}
	}
}