Accessing same time through web application

Hi all, I have a web application in which i have to access the sametime. so that it allows users to chat from web. My question is how to call the sametime application using lotus script/javas script. Any suggestion is appriciated.

Thanks in advance,

Fraser