TreeView Demo: JavaScript Functions