AS2.0: filtering nodes in menu

I’m currently modifying an xml menu found in the kirupa tutorials and Ive gotten stuck. I want the menu to filter into different columns depending on a xml node called type="". So far I have this but I cant seem to get my head around how to filter the menu.


GenerateMenu = function (container, name, x, y, depth, node_xml) {
    var currNode;
    var currItem;
    var currMenu = container.createEmptyMovieClip(name, depth);
    for (var i = 0; i<node_xml.childNodes.length; i++) {
        currItem = currMenu.attachMovie("menuitem", "_mc", i);
        if (currItem.type == web) {
            currItem._x = x;
            currItem._y = y+i*currItem._height;
        }
        currItem.trackAsMenu = true;
        currNode = node_xml.childNodes*;
        currItem.type = currNode.attributes.type;
        currItem.description = currNode.attributes.description;
        currItem.name.text = currNode.attributes.name;
        currItem.onRelease = function() {
            xmlDoc = this.name.text;
            projectType = this.type;
            proDescription.text = this.description;
            xmlProject.load(xmlDoc+"/project.xml");
            resetSlideshow();
            trace("this is == "+projectType);
        };
    }
};

at the moment all I’ve tried to do is filter the menu with an if statement to only display the type node with “web” in them. As soon as I undestand how this is done I sohuld be albe to do the rest myself.

Any help would be greatly appretiated.

Dave