/****************************************************************************
 * Definition of "section" related JavaScript functions. 
 * Require: ldv.js								                    			*
 ****************************************************************************/

//--------------------------------------------------------------------------------
/*
	Unpack by ID specified section and show all elements contained in this section.
	Pack all the other section on the page and hide elements those sections contain.
	Unpack means to add CSS class "unpacked" and pack
	means to remove this class.
	@param sectionIdToBeUnpacked A HTML ID of a section to be unpacked.
 */
function unpackSectionAndPackAllOthres(sectionIdToBeUnpacked) {
	var sectionArray = getElementsByTagNameAndClassName("div", "section");
	for (var index in sectionArray) {
		var section = sectionArray[index];
		if (section.id && section.id == sectionIdToBeUnpacked) {
			removeClass(section, "packed");
			addClass(section, "unpacked");
		} else {
			removeClass(section, "unpacked");
			addClass(section, "packed");
		}
	}
	rez();
}
