Event=YAHOO.util.Event;
Dom=YAHOO.util.Dom;
Lang = YAHOO.lang;
Widget = YAHOO.widget;
YAHOO.widget.TreeView.prototype.buildTreeFromMarkup = function (id) {
		var build = function (parent,markup) {
			var el, node, child, text;
			for (el = Dom.getFirstChild(markup); el; el = Dom.getNextSibling(el)) {
				if (el.nodeType == 1) {
					switch (el.tagName.toUpperCase()) {
						case 'LI':
							for (child = el.firstChild; child; child = child.nextSibling) {
								if (child.nodeType == 3) {
									text = Lang.trim(child.nodeValue);
									if (text.length) {
										node = new Widget.TextNode(text, parent, false);
									}
								} else {
									switch (child.tagName.toUpperCase()) {
										case 'UL':
										case 'OL':
											build(node,child);
											break;
										case 'A':
										case 'SPAN':
											node = new Widget.TextNode({
												label:child.innerHTML,
												href: child.href,
												target:child.target,
												title:child.title ||child.alt
											},parent,false);
											break;
										default:
											node = new Widget.HTMLNode(child.parentNode.innerHTML, parent, false, true);
											break;
									}
								}
							}
							break;
						case 'UL':
						case 'OL':
							build(node, el);
							break;
					}
				}
			}
		
		};
		var markup = Dom.getChildrenBy(Dom.get(id),function (el) { 
			var tag = el.tagName.toUpperCase();
			return  tag == 'UL' || tag == 'OL';
		});
		if (markup.length) {
			build(this.root, markup[0]);
		} else {
		}
	}

function grp_init(){
	tree1 = new YAHOO.widget.TreeView("grp_tree"); 
	tree1.render();
	Dom.setStyle(Dom.get("grp_tree"),"visibility","visible");
// 	alert(tree1.getRoot().children[0].getContentEl().firstChild.firstChild.data);
}
YAHOO.util.Event.onDOMReady(grp_init);