Thanks Ken, the second answer is exactly what we needed. But since the "online" portion is controlled by the javascript, the first answer does not apply.
What we need to do is show everyone who is online in the messenger, a separate group would be good. But we don't want to have everyone on the site who is offline appear in an offline group. So we would have a group of friends - online and offline, and another group of "other" users who are online at that moment. Is that possible?