loadstatustext = '<b>Đang cập nhật lại dữ liệu...</b>';
function ajaxLoad(url,id)
{
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x)
{
x.onreadystatechange = function()
{
el = document.getElementById(id);
el.innerHTML = loadstatustext;
if (x.readyState == 4 && x.status == 200)
{
el.innerHTML = x.responseText;
}
}
x.open("GET", url, true);
x.send(null);
}
}

function ajaxLoads(url,id)
{
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x)
{
x.onreadystatechange = function()
{
el = document.getElementById(id);
el.innerHTML = el.innerHTML;
document.getElementById('loadingstats').style.display = 'block';

if (x.readyState == 4 && x.status == 200)
{
	el.innerHTML = x.responseText;
	document.getElementById('loadingstats').style.display = 'none';

}
}
x.open("GET", url, true);
x.send(null);
}
}

function pb_display() 
{
ajaxLoad('/postmarquee.php','kspamrp');
}
function thongdiepyeuthuong() 
{
ajaxLoad('/thongdiep.php?js=1','thongdiepyeuthuong');
}
function cacbaivietcung(id) 
{
ajaxLoad('/oldpost.php?pid='+id,'cacbaivietcungdiendan');
}function xemhangcuano(id) 
{
ajaxLoad('/xemhang.php?hang='+id,'xemhangnemaybanoikaka');
}function choiloto(id) 
{
ajaxLoad('/xulyloto.php?chuoi='+id,'ketqualoto');
}function aidaxembaivietcuaminh(id) 
{
ajaxLoad('/whoviewthisthread.php?tid='+id,'aidaxembaivietnay');
}
function thongkediendan(id) 
{
ajaxLoads('/forumstats.php?viewpostbybot='+id,'newpostshere');
}function thongkediendans() 
{
ajaxLoads('/forumstats.php?viewtopposter=1','topposters');
}function thongkediendanss() 
{
ajaxLoads('/forumstats.php?thanhvienmoinhat=1','thanhvienmoinhat');
}
