// AJAX backbone
function tryXml() {
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
	}
	catch(e) {
		// Internet Explorer
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e) {
				//alert("Your computer does not have a web browser that supports this site. Please consider using Microsoft Internet Explorer 6 or above, or Firefox 2 or above.");
				return false;
			}
		}
	}
	return xmlHttp;
}

function updateDate() {
	var xmlHttp;
	var nowDate = new Date();
	
	xmlHttp = tryXml();
	if(xmlHttp === false) {
		return false;
	}
	xmlHttp.onreadystatechange = function() {
		if(xmlHttp.readyState == 4) {
			// don't show anything on the front end
		}
	}
	xmlHttp.open("GET", "/setTime.php?time=" + nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + nowDate.getDate(), true);
	xmlHttp.send(null);
}
