var contentArea = client.currentObject.frame.contentDocument.body; 
var contentArea = getContentDocument(client.currentObject.frame).body; 
function setCurrentObject (obj){    function clearList()    {        client.rdf.Unassert (client.rdf.resNullChan, client.rdf.resChanUser,                             client.rdf.resNullUser, true);    };    if (!ASSERT(obj.messages, "INVALID OBJECT passed to setCurrentObject **"))        return;    if ("currentObject" in client && client.currentObject == obj)        return;    var tb, userList;    userList = document.getElementById("user-list");    if ("currentObject" in client && client.currentObject)    {        var co = client.currentObject;        // Save any nicknames selected        if (client.currentObject.TYPE == "IRCChannel")            co.userlistSelection = getSelectedNicknames(userList);        tb = getTabForObject(co);    }    if (tb)    {        tb.selected = false;        tb.setAttribute ("state", "normal");    }    /* Unselect currently selected users.     * If the splitter's collapsed, the userlist *isn't* visible, but we'll not     * get told when it becomes visible, so update it even if it's only the     * splitter visible. */    if (isVisible("user-list-box") || isVisible("main-splitter"))    {        /* Remove currently selected items before this tree gets rerooted,         * because it seems to remember the selections for eternity if not. */        if (userList.view && userList.view.selection)            userList.view.selection.select(-1);        if (obj.TYPE == "IRCChannel")        {            client.rdf.setTreeRoot("user-list", obj.getGraphResource());            reSortUserlist(userList);            // Restore any selections previously made            if (("userlistSelection" in obj) && obj.userlistSelection)                setSelectedNicknames(userList, obj.userlistSelection);        }        else        {            var rdf = client.rdf;            rdf.setTreeRoot("user-list", rdf.resNullChan);            rdf.Assert (rdf.resNullChan, rdf.resChanUser, rdf.resNullUser,                        true);            setTimeout(clearList, 100);        }    }    client.currentObject = obj;    tb = dispatch("create-tab-for-view", { view: obj });    if (tb)    {        tb.selected = true;        tb.setAttribute ("state", "current");    }    var vk = Number(tb.getAttribute("viewKey"));    delete client.activityList[vk];    client.deck.selectedIndex = vk;    // Style userlist and the like:    updateAppMotif(obj.prefs["motif.current"]);    updateTitle();    updateProgress();    updateSecurityIcon();    scrollDown(obj.frame, false);    // Input area should have the same direction as the output area    if (("frame" in client.currentObject) &&        client.currentObject.frame &&        ("contentDocument" in client.currentObject.frame) &&        client.currentObject.frame.contentDocument &&        ("body" in client.currentObject.frame.contentDocument) &&        client.currentObject.frame.contentDocument.body)    {        var contentArea = client.currentObject.frame.contentDocument.body;        client.input.setAttribute("dir", contentArea.getAttribute("dir"));    }    client.input.focus();}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/a3e839fe5b35a608da653750f2126d4c87be6b9f/static.js/clean/extensions/irc/xul/content/static.js