Webchat code

If I use the example webchat code I get a window with just a button on saying ‘Close Window’

If I go thru Admin and Fastpath/Tools and save settings I get a new page with a chat icon saying chat online and if I click the image then a chat window opens and works great

So what code should I be using to check if the workgroup is online and to initiate a chat

Thanks

Got it,need full name for the workgroup e.g.

demo@workgroup.mysite.com