﻿
function InitIt()
{
	divCount = document.all.tags("DIV");
    for(i=0;i<divCount.length;i++){
		objDiv = divCount(i);
		if((objDiv.className == "child"))
			objDiv.style.display = "none";            
        }
}

function Dept_onclick(aDept) {
	objDiv = eval("Dept" + aDept);
    curDiv = eval("SubDept" + aDept);    
	if (curDiv.style.display == "none") {
		curDiv.style.display = "block";
	}
	else {
		curDiv.style.display = "none";
	}
}

function SubDept_onclick(aDept) {
	objDiv = eval("ChildDept" + aDept);
    curDiv = eval("SubChild" + aDept);    
	if (curDiv.style.display == "none") {
		curDiv.style.display = "block";
	}
	else {
		curDiv.style.display = "none";
	}
}

// 同步左边的目录树
// 使用：SynchronizeToc(页面所在的目录名称);
function SynchronizeToc(folderId)
{
	var tocFrame = parent.leftFrame;
	if(tocFrame != undefined)
	{
		if(tocFrame.SynchronizeToc != undefined)
		{
			tocFrame.SynchronizeToc(folderId);
		}
	}
}

// IFrame 窗口自动调整窗口高度
function IFrameAutoHeight()
{
	if(self.location != top.location)
	{
		parent.document.all(self.name).height = document.body.scrollHeight;
	}
}