code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin, Message,MessageKind){
Interop.Call('user32', 'SetFocus', ChatWnd.Handle);
}
Take note though that when using this, if you are in the middle of typing you will continue typing in the new window, and may end up sending the message to the wrong person.
Hope this helps