var xmlhttp

if (window.XMLHttpRequest) {
	xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
	xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}

function EntryChange(id) {
	xmlhttp.open("GET", "blog/next.php?blog_id="+id+"",true);

	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			document.getElementById("latestentry").innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null)
}

function DateChange(month, year) {
	xmlhttp.open("GET", "blog/calendar.php?month="+month+"&year="+year+"",true);

	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			document.getElementById("mytable").innerHTML= xmlhttp.responseText;
		}
	}
	xmlhttp.send(null)
}

