rem: } 
context: function getTabForObject (source, create){    var name;    if (!source)    {        dd ("** UNDEFINED passed to getTabForObject **");        dd (getStackTrace());        return null;    }        switch (source.TYPE)    {        case "IRCChanUser":        case "IRCUser":            name = source.properNick;            break;                    case "IRCNetwork":        case "IRCClient":            name = source.name;            break;        case "IRCChannel":            name = source.unicodeName;            break;        default:            dd ("** INVALID OBJECT passed to getTabForObject **");            return null;    }    var tb, id = "tb[" + name + "]";    var matches = 1;    for (var i in client.viewsArray)    {        if (client.viewsArray[i].source == source)        {            tb = client.viewsArray[i].tb;            break;        }        else            if (client.viewsArray[i].tb.getAttribute("id") == id)                id = "tb[" + name + "<" + (++matches) + ">]";    }    if (!tb && create) /* not found, create one */    {        if (!("messages" in source) || source.messages == null)            createMessages(source);        var views = document.getElementById ("views-tbar-inner");        tb = document.createElement ("tab");        tb.setAttribute ("ondraggesture",                         "nsDragAndDrop.startDrag(event, tabDNDObserver);");        tb.setAttribute ("href", source.getURL());        tb.setAttribute ("name", source.name);        tb.setAttribute ("onclick", "onTabClick(" + id.quote() + ");");        tb.setAttribute ("crop", "right");                tb.setAttribute ("class", "tab-bottom view-button");        tb.setAttribute ("id", id);        tb.setAttribute ("state", "normal");        client.viewsArray.push ({source: source, tb: tb});        tb.setAttribute ("viewKey", client.viewsArray.length - 1);        if (matches > 1)            tb.setAttribute("label", name + "<" + matches + ">");        else            tb.setAttribute("label", name);        views.appendChild (tb);                var browser = document.createElement ("browser");        browser.setAttribute ("class", "output-container");        browser.setAttribute ("type", "content");        browser.setAttribute ("flex", "1");        browser.setAttribute ("tooltip", "aHTMLTooltip");        browser.setAttribute ("context", "outputContext");        //browser.setAttribute ("onload", "scrollDown(true);");        if (client.NO_BROWSER_FOCUS)            browser.setAttribute ("onclick", "focusInput()");        browser.setAttribute ("ondragover", "nsDragAndDrop.dragOver(event, contentDropObserver);");        browser.setAttribute ("ondragdrop", "nsDragAndDrop.drop(event, contentDropObserver);");        browser.setAttribute ("ondraggesture", "nsDragAndDrop.startDrag(event, contentAreaDNDObserver);");        browser.source = source;        source.frame = browser;        client.deck.appendChild (browser);        syncOutputFrame (browser);    }    return tb;    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fa359690d17fc0358c5ed06036e22e12abc609c5/static.js/clean/extensions/irc/xul/content/static.js