<script>
function tf(){document.search.q.focus()}
function rcolor(id, color) {
var rid = document.getElementById(id);
rid.style.color=color;
if (color=='#fff') setTimeout('rcolor("'+id+'", "#999")', 1000);
}
var save=Array();
save['rsearch']=7375;
save['rdownload']=3911;
save['rlisten']=15210;
function refreshCount(id, url) {
var req = window.XMLHttpRequest?
new XMLHttpRequest() :
new ActiveXObject("Microsoft.XMLHTTP");
req.onreadystatechange = function() {
if (req.readyState == 4)
{
document.getElementById(id).innerHTML=req.responseText;
if(save[id]!=req.responseText) rcolor(id, '#fff');
save[id]=req.responseText;
}
}
req.open("GET", url, true);
req.send(null);
}
//180000
setInterval("refreshCount('rsearch', '?rc=search')", 50000);
setInterval("refreshCount('rdownload', '?rc=download')", 50000);
setInterval("refreshCount('rlisten', '?rc=listen')", 50000);
function FMrf(txt) {
var vq = document.getElementById('q').value;
if(vq!='' && vq!=0) {
var req = window.XMLHttpRequest?
new XMLHttpRequest() :
new ActiveXObject("Microsoft.XMLHTTP");
req.onreadystatechange = function() {
if (req.readyState == 4) document.getElementById('FMrf').innerHTML=req.responseText;
}
req.open("GET", txt, true);
req.send(null);
} else document.getElementById('FMrf').innerHTML='';
}
</script>