<!--
function changeButton(isExpand, btnHandle)
{
	var btn = document.getElementById(btnHandle);
//	var str = btn.getAttribute("src");
//	if (str.search("images/plus.gif") != -1)
	if (isExpand == 1)
	{
		btn.setAttribute("src", "images/minus.gif");
	}
	else
	{
		btn.setAttribute("src", "images/plus.gif");
	}
	return true;
}

function expand(isExpandAll)
{
	var divs = document.getElementsByTagName("div")
	
	for (i=0; i<divs.length; i++)
	{
		if (divs[i].className == "lib-info" || divs[i].className == "dept-info"
			 || divs[i].className == "display-lib-info" || divs[i].className == "display-dept-info")
		{
			if (isExpandAll == 1)
			{
				divs[i].style.display = "block";
			}
			else
			{
				divs[i].style.display = "none";
			}			
			
			if (divs[i].className == "lib-info" || divs[i].className == "display-lib-info")
			{
				//get libInfo div's id
				var libInfoDivID = divs[i].getAttribute("id");
				//get libraryID
				var libraryID = libInfoDivID.substr(libInfoDivID.indexOf("_") + 1);
				changeButton(isExpandAll, "btnExpand_" + libraryID);
			}
			else if (divs[i].className == "dept-info" || divs[i].className == "display-dept-info")
			{
				//get deptInfo div's id
				var deptInfoDivID = divs[i].getAttribute("id");
				//get libraryID_deptID
				var lib_deptID = deptInfoDivID.substr(deptInfoDivID.indexOf("_") + 1);
				changeButton(isExpandAll, "btnExpand_" + lib_deptID);
			}
		}
	}
}

function expandYear(year)
{
	var libInfo = document.getElementById("archiveData_" + year);
	var btn = document.getElementById("btnExpand_" + year);

	if (libInfo.style.display == "block")
	{
		libInfo.style.display = "none";
		changeButton(0, "btnExpand_" + year);
	}
	else
	{
		libInfo.style.display = "block";
		changeButton(1, "btnExpand_" + year);
	}

	return true;
}

function expandLibrary(libraryID)
{
	var libInfo = document.getElementById("libInfo_" + libraryID);
	var btn = document.getElementById("btnExpand_" + libraryID);
	
	if (libInfo.style.display == "block")
	{
		libInfo.style.display = "none";
		changeButton(0, "btnExpand_" + libraryID);
	}
	else
	{
		libInfo.style.display = "block";
		changeButton(1, "btnExpand_" + libraryID);
	}
	return true;
}

function expandDept(libraryID, deptID)
{
	var deptInfo = document.getElementById("deptInfo_" + libraryID + "_" + deptID);
	var btn = document.getElementById("btnExpand_" + libraryID + "_" + deptID);

	if (deptInfo.style.display == "block")
	{
		deptInfo.style.display = "none";
		changeButton(0, "btnExpand_" + libraryID + "_" + deptID);
	}
	else
	{
		deptInfo.style.display = "block";
		changeButton(1, "btnExpand_" + libraryID + "_" + deptID);
	}

}

function expandTP(libraryID, deptID, tpID)
{
	var tpInfo = document.getElementById("tpInfo_" + libraryID + "_" + deptID + "_" + tpID);
	var btn = document.getElementById("btnExpand_" + libraryID + "_" + deptID + "_" + tpID);

	if (tpInfo.style.display == "block")
	{
		tpInfo.style.display = "none";
		changeButton(0, "btnExpand_" + libraryID + "_" + deptID + "_" + tpID);
	}
	else
	{
		tpInfo.style.display = "block";
		changeButton(1, "btnExpand_" + libraryID + "_" + deptID + "_" + tpID);
	}

}



//-->