else if (channelTreeView.rowCount >= 1) 
else if (channelTreeView.rowCount == 1) 
function runFilter(){    function process()    {        var exactMatch = null;        var channelText = text;        if (!channelText.match(/^[#&+!]/))            channelText = "#" + channelText;        // Should ideally be calling freeze()/thaw() here, but unfortunately they        // mess up the selection, even if they make this so much faster.        for (var i = 0; i < channels.length; i++)        {            var match = (channels[i].name.toLowerCase().indexOf(text) != -1) ||                        (searchTopics &&                         (channels[i].topic.toLowerCase().indexOf(text) != -1));            if (minUsers && (channels[i].users < minUsers))                match = false;            if (maxUsers && (channels[i].users > maxUsers))                match = false;            if (channels[i].isHidden)            {                if (match)                    channels[i].unHide();            }            else            {                if (!match)                    channels[i].hide();            }            if (match && (channels[i].name.toLowerCase() == channelText))                exactMatch = channels[i];            if ((i % 100) == 0)                updateProgress(MSG_CD_FILTERING, 100 * i / channels.length);        }        updateProgress();        createChannelItem.name = channelText;        var tree = document.getElementById("channelList");        tree.treeBoxObject.invalidateRow(0);        if (exactMatch)        {            if (!createChannelItem.isHidden)                createChannelItem.hide();            channelTreeView.selectedIndex = exactMatch.calculateVisualRow();        }        else        {            if (createChannelItem.isHidden)                createChannelItem.unHide();            if (channelTreeView.selectedIndex == -1)            {                // The special 'create' row is visible, so prefer the first                // real channel over it.                if (channelTreeView.rowCount >= 2)                    channelTreeView.selectedIndex = 1;                else if (channelTreeView.rowCount >= 1)                    channelTreeView.selectedIndex = 0;            }        }    };    var text = document.getElementById("filterText").value.toLowerCase();    var searchTopics = document.getElementById("searchTopics").checked;    var minUsers = document.getElementById("minUsers").value * 1;    var maxUsers = document.getElementById("maxUsers").value * 1;    if (channels.length > 1000)        updateProgress(getMsg(MSG_CD_FILTERING1, channels.length));    else        updateProgress(getMsg(MSG_CD_FILTERING2, channels.length));    setTimeout(process, 100);}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/df3574b661190be2fc155155fabbfe2d4af307a3/channels.js/buggy/extensions/irc/xul/content/channels.js