var directoryType = {
    initial : 0,
    myMenu  : Object, // IE, crap that it is chokes if this is "menu"
    init    : function() {
        myMenu = D.GE("type");
        initial = myMenu.selectedIndex;
        addEvent(myMenu,"change",directoryType.change);
    },

    change  : function() {
        var current = myMenu.selectedIndex;
        if(current!=initial) {
            if(current==0) {
                location.href="./";
            } else {
                var newType = myMenu.options[current].value;
                location.href = "./" + newType;
            }
        }
    }
}
addEvent(window,"load",directoryType.init);
