First and foremost I needed a tree control, which the YUI has. Actually the library contains several components which Yahoo classifies as either utilities or controls. So far I've been working with the DOM Collection (for DOM scripting) and Connection Manager (for AJAX) utilities as well as the Menu and TreeView controls, but these are just a few of the available components.
Second, Yahoo released the YUI library under the BSD license earlier this year. While I'm no open source licensing expert it's my understanding that the BSD license is one of the more permissive free software licenses, which is great because that means I can use it at work.