
isExpand = true;
function FolderExpandAll(){
	var intCount
	intCount = 0;
	tempColl = document.all.tags("DIV");
	for (i=0; i<tempColl.length; i++) {
		if (tempColl(i).className == "child"){ 
			intCount++;
			if (isExpand){
				tempColl(i).style.display = "block";
				ExpandTree = eval("m" + intCount + "Tree");
				ExpandTree.src = strInclude + "../jsTree/Tminus.gif";
				ExpandFolder = eval("m" + intCount + "Folder");
				ExpandFolder.src = strInclude + "../jsTree/openfoldericon.gif";
			}
			else
			{
				tempColl(i).style.display = "none";
				ExpandTree = eval("m" + intCount + "Tree");
				ExpandTree.src = strInclude + "../jsTree/Tplus.gif";
				ExpandFolder = eval("m" + intCount + "Folder");
				ExpandFolder.src =  strInclude + "../jsTree/foldericon.gif";
			}
		}
	}
	//lastµÄÊ÷ÑùÊ½
	for (i=0; i<tempColl.length; i++) {

		if (tempColl(i).className == "last"){ 
			intCount=0;
			//alert (tempColl(i).getAttribute("id"));
			//for (kk in tempColl(i).all )
			//{
			//alert (kk + "bb" + tempColl(i).all[kk]);
			//}
			kk=tempColl(i).getAttribute("id").toString();
			//tempColl(i).getAttribute("id").toString();
			
			kk = kk.replace(/parent/i,"");
			
			if (isExpand){
				ExpandTree = eval(kk + "Tree");
				ExpandTree.src =  strInclude + "../jsTree/Lminus.gif";
			}
			else
			{
				ExpandTree = eval(kk + "Tree");
				ExpandTree.src =  strInclude + "../jsTree/Lplus.gif";
			}
		}
	}

	isExpand = !isExpand;
}
function FolderInit(){
	tempColl = document.all.tags("DIV");
	for (i=0; i<tempColl.length; i++) {
		if (tempColl(i).className == "child") tempColl(i).style.display = "none";
	}
}

function FolderExpand($1,$2,$3) {
	ExpandChild = eval($1 + "Child");
	ExpandTree = eval($1 + "Tree");
	ExpandFolder = eval($1 + "Folder");

	if (ExpandChild.style.display == "none") {
		ExpandChild.style.display = "block";
        if ($2 == "last") 
			{ ExpandTree.src =  strInclude + "../jsTree/Lminus.gif"; }
		else 
			{ ExpandTree.src =  strInclude + "../jsTree/Tminus.gif"; }
		ExpandFolder.src =  strInclude + "../jsTree/openfoldericon.gif";
	}
	else {
		ExpandChild.style.display = "none";
	    if ($2 == "last") 
			{ ExpandTree.src =  strInclude + "../jsTree/Lplus.gif"; }
		else 
			{ ExpandTree.src =  strInclude + "../jsTree/Tplus.gif"; }
		ExpandFolder.src =  strInclude + "../jsTree/foldericon.gif";
	}
	
}


with (document) {
	write("<STYLE TYPE='text/css'>");
		write(".child { font:12px/13px Times; display:none;color:black;}");
	    write(".item { color: black; text-decoration:none; cursor: hand }");
	write("</STYLE>");
}


onload = FolderInit;
