Basically, the JS
code I'm using makes use of functions and methods so that the tree is built similar to this:
level1ID = theMenu.addEntry(-1, "Folder1");
level2ID = theMenu.addChild(level1ID, "ChildObject1");
level2ID = theMenu.addEntry (level2ID, "ChildObject2");
level2ID = theMenu.addEntry(level2ID, "Folder");
level3ID = theMenu.addChild(level2ID, "Document");
I'm not sure how best to interface my recursive code with the above code to build a dynamic, data-driven solution.