Chat logic help

Hi all!
Im creating a site using actionscript 2.0 and i need help to the logical part of the job. Im not a newbie in as 2.0 but i need some help:

When someone visits the site, there is a windows that shows employees that are logged in at the same site (max 5). Then the user can select a employee from the list and send him a message, like chatting.

Same kind of thing can be seen at
http://www.teknision.com/siteVersions/tek2/

What techniques should i use (xmlsocket etc)?
And what should i do when this happens: same employee gets multiple messages from different users?

Thanks in advance

ps. i will be posting about my progress and telling where im at.