function getXmlHttp() {
	var xmlHttp = null;
	try {
		xmlHttp = new XMLHttpRequest();
	} catch (e) {
		var progIds = ['Microsoft.XMLHTTP', 'MSXML2.XMLHTTP', 'MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0']
		var success = false;
		for (var iterator = 0; (iterator < progIds.length) && ( ! success); iterator ++) {
			try {
				xmlHttp = new ActiveXObject(progIds[iterator]);
				success = true;
			} catch (e) {}
		}
		if ( ! success ) {
			return null;
		}
	}
	return xmlHttp;
}
function zamanla(zam) {

setInterval("totalsites()", zam);
}

function totalsites() {

    var now = new Date();
    xmlHttp = getXmlHttp();
	xmlHttp.onreadystatechange = function() {
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
if(xmlHttp.responseText=='ERROR') {
return false;
} else {
tmp = xmlHttp.responseText.split(';');
document.getElementById('downtotal').innerHTML=tmp[0];
}


}
}
};
xmlHttp.open('GET', 'stats.php?' + now.getTime(), true); 
xmlHttp.send(null);
}

setTimeout("zamanla(1000)", 1000);