Tree Structure In Javascript Dynamically