 function removeFile(fileIndex) { var theFile = document.getElementById(fileIndex);  if (theFile.parentNode.childNodes.length < 2) { var theSite = theFile.parentNode.parentNode; theSite.removeChildren(); theSite.parentNode.removeChild(theSite); } else theFile.parentNode.removeChild(theFile); } 
function SiteBrowser(){    var fileBrowser = document.getElementById("filesBrowserSites");        this.addURL = function add(url, fileIndex)    {        var parsedURL = new ParsedURL(url);        var divs = fileBrowser.getElementsByTagName("div");                if (divs.length == 0) {             addNewDomain(parsedURL, fileIndex);        } else {            var isNew = true;            for (var i = 0; i < divs.length; i++) {                if (divs[i].id == parsedURL.domain) {                    var uls = divs[i].getElementsByTagName("ul");                    var ul = (uls.length > 0) ? uls[0] : document.createElement("ul");                    var li = document.createElement("li");                                        li.id = fileIndex;                    li.addEventListener("click", fileBrowserMouseEvents, false);                    li.title = li.innerText = parsedURL.relativePath ? parsedURL.relativePath : "/";                    ul.appendChild(li);                    isNew = false;                    break;                }            }            if (isNew) {                addNewDomain(parsedURL, fileIndex);            }        }    }        this.selectInitialFile = function sf()    {        if (currentFile == -1)            document.getElementById("1").className = "active";    }        function addNewDomain(parsedURL, fileIndex)    {        var div = document.createElement("div");        var ul = document.createElement("ul");        var li = document.createElement("li");                div.id = div.innerText = div.title = parsedURL.domain;        div.addEventListener("click", fileBrowserMouseEvents, false);        // Maybe we can add some roll-overs here...        //div.addEventListener("mouseover", fileBrowserMouseEvents, false);        //div.addEventListener("mouseout", fileBrowserMouseEvents, false);        li.id = fileIndex;        li.addEventListener("click", fileBrowserMouseEvents, false);        li.title = li.innerText = parsedURL.relativePath ? parsedURL.relativePath : "/";        ul.appendChild(li);        div.appendChild(ul);        fileBrowser.appendChild(div);            }}
1725	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1725/4380d29b4671e2af9a2676a030bf008a2723b3a2/debugger.js/buggy/WebKitTools/Drosera/debugger.js