// read a file from the server
var xmlHttpMainAdvert = createXmlHttpRequestObject();

function UpdateStats(){
	var Now = new Date();
	//Only continue if xmlHttp isn't void
	if (xmlHttpMainAdvert) {
		//Try to connect to the server
		try {
				
				// initiate the asynchronous HTTP request
				xmlHttpMainAdvert.open("Get", "stats/fstats.php?Name=" + Now.toLocaleDateString() + " - " + Now.toTimeString(), true);
				xmlHttpMainAdvert.send(null);
			}
		// display the error in case of failure
		catch (e) {
			alert('There is a problem');
			}
	}
}

// function called when the state of the HTTP request changes


