fires the moment you attempt to open the tree branch
some.attachEvent("onBeforeOpen", function(){ //... some code here ... });