//行折叠功能
Fold = function(ele){
	var p = ele.parentNode;
	var tr,table;
	try{
		while(p){
			var tagName = p.tagName.toLowerCase();
			if(tagName=="tr"){
				tr = p;
			}
			if(tagName=="table"){
				table = p;
				break;
			}
			p = p.parentNode;
		}
	}catch(ex){alert(ex.message);}

	var hideFlag = false;
	if(ele.src.indexOf("butExpand")>0){
		ele.src = ""+Server.ContextPath+"imgs/Images/butCollapse.gif";
		hideFlag = true;
	}else{
		ele.src = ""+Server.ContextPath+"imgs/Images/butExpand.gif";
	}
	var rows = table.rows;
	var level = parseInt(tr.getAttribute("level"));
	for(var i=0;i<rows.length;i++){
		if(rows[i]===tr){
			for(var j=i+1;j<rows.length;j++){
				var r = $(rows[j]);
				if(parseInt(r.$A("level"))>level){
					if(hideFlag){
						if($E.visible(r)){
							r.setAttribute("_TreeHideLevel",level);
							$E.hide(r);
						}
					}else{
						if(r.$A("_TreeHideLevel")==level){
							$E.show(r);
							r.setAttribute("_TreeHideLevel",null);
						}
					}
				}else{
					break;
				}
			}
			break;
		}
	}
}