<script language="javascript" type="text/javascript">
    function insertIcons()
    {
        var content = null;
        var divs = document.body.getElementsByTagName('div');
        for (j=0; j<divs.length; ++j)
        {
            if(divs[j].className == 'content')
            {
                content = divs[j];
                break;
            }
        }
        if(content != null)
        {
            var links   = content.getElementsByTagName('a');
            for (j=0; j<links.length; ++j)
            {
                if(links[j].href.match(/\/dir\?/))                   // directory
                {
                    var img = document.createElement('span');
                    img.innerHTML = '<img src="data:image/png;base64,XXXXXXXXXXXXXXXXXXXXXXXXXXX==" width="16" height="16" />&nbsp;';
                    links[j].parentNode.insertBefore(img,links[j]);
                }
                else if(links[j].href.match(/\/(finfo|artifact)\?/)) // file
                {
                    var img = document.createElement('span');
                    img.innerHTML = '<img src="data:image/png;base64,XXXXXXXXXXXXXXXXXXXXXXXXXXX==" width="16" height="16" />&nbsp;';
                    links[j].parentNode.insertBefore(img,links[j]);
                }
            }
        }
    }
    if(String(document.location).match(/\/dir/)) insertIcons();
</script>
