/*
[功能] 展开菜单
[参数] 
[作者] molm 2003/8/9
*/
function checkInfo(obj,obj2){
	try{
		//alert(obj2.src)
		if (obj.style.display=="none"){
			obj2.src=obj2.src.replace("plus","minus");
			obj.style.display="";
		}else{
			obj2.src=obj2.src.replace("minus","plus");
			obj.style.display="none";	
		}
	}
	catch(E){
		errorHandle(E);
	}
}

/*
[功能] 隐藏显示表格
[参数] obj 图片   obj2 控制的表格
[作者] molm 2003/8/23
*/
function checkHidden(obj,obj2){
	try{
		if (obj2.style.display=="none"){
			obj.src="/image/icon/collapse.gif";
			//infotable.height=30;
			obj.alt="隐藏";
			obj2.style.display="";
		}else{
			obj.src="/image/icon/expand.gif";
			obj.alt="显示";
			obj2.height=1;
			obj2.style.display="none";	
		}
	}
	catch(E){
		errorHandle(E);
	}
}

function checkSearchHidden(obj,obj2) {
	try{
		if (obj2.style.display=="none"){
			obj.value="检索∧";
			//infotable.height=30;
			obj2.style.display="";
		}else{
			obj.value="检索∨";
			obj2.height=1;
			obj2.style.display="none";	
		}
	}
	catch(E){
		errorHandle(E);
	}
}



/*
[功能] 隐藏显示表格(自定义专用)
[参数] obj 图片   obj2 控制的表格
[作者] molm 2003/8/23
*/
function checkHidden2(obj,str){
	try{
		strCheck=obj.src;
		strCheck=strCheck.split("/");
		strCheck=strCheck[strCheck.length-1];
		//alert(strCheck);
		checkHids=displayform.hiddenTables.value.split(";");
		for (i=0;i<checkHids.length;i++){
			checkHid=checkHids[i].split("#");
			//alert (checkHid[0]+"&&&"+str)
			if (checkHid[0]==str){	
				checkHids=checkHid;
				break;
			}
		}
		//alert(checkHids.length)

		if (strCheck=="m.gif"){
			obj.src="/image/tree/p.gif";
			//infotable.height=30;
			obj.alt="显示本组";
			for (i=0;i<checkHids.length;i++){
				eval("leftTa"+checkHids[i]+".style.display='none';");
				eval("rightTa"+checkHids[i]+".style.display='none';");				
			}
			eval (displayform.hiddenScript.value);

		}else{
			obj.src="/image/tree/m.gif";
			obj.alt="隐藏本组";
			for (i=0;i<checkHids.length;i++){
				eval("leftTa"+checkHids[i]+".style.display='';");
				eval("rightTa"+checkHids[i]+".style.display='';");
			}
			eval (displayform.hiddenScript.value);
		}
	}
	catch(E){
		errorHandle(E);
	}
}

//tab页控制
function iboxActive(obj) {
	var e = event.srcElement;
	if (e.tagName=="DIV"){
		key = e.tab_num;
		num = key;
	}else{
		key = e.parentElement.tab_num;
		num = key;
	}
	max = obj.tabnum;
	def2 = parseInt(max) + parseInt(num) + 1;
	
	var menu = obj;

	var childs = menu.childNodes;
	for (var i = 0; i < max; i ++) {
		if (childs[i].tagName == 'DIV') {
			childs[i].className = "tabmenuoff";
		}
	}
	childs[num].className = "tabmenuon";		
	
	for (var i = max, c = childs.length; i < c; i ++) {
		if (childs[i].tagName == 'DIV') {
			childs[i].style.display = 'none';
		}
	}

	childs[def2].style.display = 'block';
}
