Regarding Facebook Style Chat message System

Hi all,

I’ve just been wondering if anyone has any idea what kind of programing would there be to programa chatbar abit like you have on facebook for all of your online friends?

Now my guess is that they are using javascript or maybe Ajax to do it with some php and a database engine or some sort,

But can anyone help me point me in the right direction as to where i can get a chat bar like that so i have can have many chats going on all at once?

ive tried to find out but not many tutorials

i found this

only thing i am curious about the actual floating facebook bar where u setup many chats etc you can minimise them does anyone know how to create the chat bar itself abit like facebook itself?