code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
var strMsg = Message;
if(strMsg.search('youtube.com')!=-1) {
strMsg = strMsg.split('youtube.com')[1];
strMsg = strMsg.split('?v=')[1];
var id = strMsg.split('&')[0];
if(id) {
var thumb_url = 'http://i1.ytimg.com/vi/'+id+'/1.jpg';
var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndAsk");
}
}
}
function OnWndAskEvent_CtrlClicked(PlusWnd, ControlId) {
if (ControlId == "Link") {
var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndVideo");
var WebControl = MyWindow.Browser_GetInterface("BroInternet");
WebControl.Navigate2("http://www.youtube.com/watch_popup?v=");
}
}
How I can close the Window: WndAsk if
function OnWndAskEvent_CtrlClicked is activ?