fires before the tree is hidden
fmanager.attachEvent("onBeforeHideTree", function(){ // some code return true; });