Nevermind, problem solved.
I can't believe, as a programmer in other languages, that my mistake was so newbie (I don't have any background in JS
)
I just had to set the var to the object itself.. myChat = ChatWnd.
And then use it in the other function.
Thanks alot, tho. Your array helped me think of the answer