var cmd_str="";
var cmd_tmr=null;

function cmd_send_req()
{
	cmd_tmr=null;

	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		req=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		req=new ActiveXObject("Microsoft.XMLHTTP");
	}
	req.open("GET","rc.cgi?"+cmd_str,true);
	// workaround for MSIE caching problem
	req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	req.onreadystatechange=function() { if (this.readyState==4 && this.status==200) window.parent.frames["m"].reloadData(); }
	try { req.send(null);} catch(err) {}
}

function cmd(command)
{
	if (cmd_tmr) {
		clearTimeout(cmd_tmr);
		cmd_str+="&"+command;
	}
	else {
		cmd_str=command;
	}
	cmd_tmr=setTimeout('cmd_send_req()',200);
	return false;
}
