var t; // true/false, determines whether to load the testimonials script

function getServerTime(tExist) {
	t = tExist;
	var myurl = '/scripts/time.php';
	myRand = parseInt(Math.random()*999999999999999);
	// add random number to URL to avoid cache problems
	var modurl = myurl+"?rand="+myRand;
	http.open("POST", myurl, true);
	// set up the callback function
	http.onreadystatechange = useTimeData;
	http.send('');
}

function useTimeData() {
	if (http.readyState == 4) {
		if(http.status == 200) {
			var timeValue = http.responseXML.getElementsByTagName("timenow")[0];
			document.getElementById('weatherBoxTime').innerHTML = "Queensland - Australia<br />"+timeValue.childNodes[0].nodeValue;
			if (t) {
				getTestimonials();
				setInterval("getTestimonials()", 10000);
			}
		}
	} else {
		document.getElementById('weatherBoxTime').innerHTML = '';
	}
}