			children:[]
			};
			if (n.dir === true) {
				obj.state = 'closed';
				obj.dir = true;
				obj.iconCls = 'icon-dir';
				if (n.nodes) {
					for (var i in n.nodes) {
						var rn = getNode(n.nodes[i]);
						obj.children.push(rn);
					}
				}
			}
			return obj
		}

		function showMenu(e, node) {
			e.preventDefault();
			$('#etree').tree('select',node.target);
			var mid = "treeNodeMenu";
			if (treeMode === 'path') {
				mid = 'treeDirMenu';
				if (version === '2') {
                    if (node.di