 if (client.hostCompat.typeChromeBrowser) browser.setAttribute("type", "chrome"); else browser.setAttribute("type", "content"); 
browser.setAttribute("type", "content"); 
function getTabForObject (source, create){    var name;    if (!ASSERT(source, "UNDEFINED passed to getTabForObject"))        return null;    if ("viewName" in source)    {        name = source.viewName;    }    else    {        ASSERT(0, "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.unicodeName);        tb.setAttribute("onclick", "onTabClick(event, " + id.quote() + ");");        // This wouldn't be here if there was a supported CSS property for it.        tb.setAttribute("crop", "center");        tb.setAttribute("context", "context:tab");        tb.setAttribute("tooltip", "xul-tooltip-node");        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);        tb.view = source;        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");        // Only use type="chrome" if the host app supports it properly:        if (client.hostCompat.typeChromeBrowser)            browser.setAttribute("type", "chrome");        else            browser.setAttribute("type", "content");        browser.setAttribute("flex", "1");        browser.setAttribute("tooltip", "html-tooltip-node");        browser.setAttribute("context", "context:messages");        //browser.setAttribute ("onload", "scrollDown(true);");        browser.setAttribute("onclick",                             "return onMessageViewClick(event)");        browser.setAttribute("onmousedown",                             "return onMessageViewMouseDown(event)");        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;        ASSERT(client.deck, "no deck?");        client.deck.appendChild (browser);        syncOutputFrame (source);    }    return tb;}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/2fe82e08f87671b1a5f5e6648549a7ad6ecc79ea/static.js/clean/extensions/irc/xul/content/static.js