    var default_exp_img = '/expand.gif';
    var default_col_img = '/collapse.gif';

    var exploder = window.Event ? false : true;
    var nobubble = false;

    function clickBranch(id, ei, ci) {
        if ( exploder && window.event.altKey ) { collapse(id, ei, ci) }
        if( nobubble ) { nobubble = (id == 0) ? false : true; return; }
        nobubble = (id == 0) ? false : true;
        if( exploder ){
//            if ( window.event.ctrlKey ) {
//            if ( window.event.shiftKey ) {
            if ( window.event.altKey ) {
                collapse_path(id, ei, ci)
                return false;
            }
        }
//        else{ alert( id.modifiers ) }
//        alert( id )
        toggle(id, ei, ci);
        return false;
    }

    function toggle(id, ei, ci)   { _set(id, ei, ci) }
    function expand(id, ei, ci)   { _set(id, ei, ci, 1) }
    function collapse(id, ei, ci) { _set(id, ei, ci, 0) }
    function expand_path(id, ei, ci)   { _set_path( id, ei, ci, 1 )   }
    function collapse_path(id, ei, ci) { _set_path( id, ei, ci, 0 ) }

    function _set(id, ei, ci, mode) {
     // toggle   when mode is undefined
     // expand   when mode is true
     // collapse when mode is zero

        if ( document.getElementById ) {
//           if( id == 0 ){ return false; }
            var fldr = document.getElementById('fldr_' + id);
            var list = document.getElementById('list_' + id);
            if( !list || !fldr ) { return false; }
            if( mode == undefined ){
                mode = list.style.display=="none" ? true : false;
            }
            if ( mode ){
                fldr.style.listStyleImage="url( '" + (ei || default_exp_img) + "' )"
                list.style.display=""
            }
            else {
                fldr.style.listStyleImage="url( '" + (ci || default_col_img) + "' )"
                list.style.display="none"
            }
        }
        else {
            alert( "Could not find " + id )
        }
    }
    function _set_path(id, ei, ci, mode) {
        myArray = id.match( /([.:`]?(?:\\.|[^.:`]+))/g )
        _set( this_id = myArray.shift(), ei, ci, mode );
        while( myArray.length ){
            location.hash = this_id.match(/^\d+_(.*)$/).pop()
            _set( this_id += myArray.shift(), ei, ci, mode );
        }
    }
