function myRequest(url, callback, method){
	var rq = (function(){
		var rq = null
		try{
			 rq = new XMLHttpRequest();
		}catch(e){
			try{
				rq = new ActiveXObject('Msxml2.XMLHTTP');
			}catch(e){
				rq = new ActiveXObject('Microsoft.XMLHTTP')
			}
		}
		return rq;
	})();
	
	rq.open('get', url);
	rq.onreadystatechange = function(){
		if(rq.readyState == 4){
			if(rq.status == 200){
				callback(rq);
			}
		}
	};
	rq.send(null);
}

function visTime(sq){
	var t = eval('('+sq.responseText+')');
	var cnt = t.cn, est = t.es;
	document.getElementById('cntime').innerHTML = cnt;
	document.getElementById('estime').innerHTML = est;
	setTimeout(getTime, 1000);
}

function getTime(){
	myRequest('/include/get_curtime.php?r='+new Date().getTime(), visTime);
}