The much better way:
Status.php
<?php
require_once('libs/common.php');
require_once('libs/chat.php');
require_once('libs/operator.php');
require_once('libs/groups.php');
$groupid = verifyparam( "group", "/^\d{1,10}$/", "");
$status = has_online_operators($groupid) ? "on" : "off";
echo $status;
?>
With this small script there is no need to check any button-size or something else... with "status.php?group=<id>" you're able to check, if there is someone on or off in the defined group.
Regards,
nickel