function show_sections(sectionid, parentsection)
{
	var SectionsetName=sectionid.replace("section", "sectionset");
	var SectionObj=document.getElementById(sectionid);
	var SectionsetObj = document.getElementById(SectionsetName);
	
	hide_all_sections(parentsection);
	
	SectionsetObj.style.top = SectionObj.offsetTop+"px";
	SectionsetObj.style.left = SectionObj.offsetLeft+SectionObj.offsetWidth+"px";
	SectionsetObj.style.visibility = "visible";
}

function hide_sections(chapterid)
{
	var SectionsName=chapterid.replace("chapter", "sections");
	var SectionsObj = document.getElementById(SectionsName);
	SectionsObj.style.visibility = "hidden";
}

function hide_all_sections(lparentsection)
{
	var counter=0;
	var divTagIdName;
	var divSectionTags = document.getElementById(lparentsection).getElementsByTagName("div");
	for(counter in divSectionTags)
	{
		divTagId = divSectionTags[counter].id;
		divTagIdName = divSectionTags[counter].id+"";
		if(divTagIdName.indexOf("sectionset") != -1)
		{
			document.getElementById(divSectionTags[counter].id).style.visibility = "hidden";
		}
	}
}

function hide_all_all_sections()
{
	var counter=0;
	var divTagIdName;
	var divSectionTags = document.body.getElementsByTagName("div");
	for(counter in divSectionTags)
	{
		divTagId = divSectionTags[counter].id;
		divTagIdName = divSectionTags[counter].id+"";
		if(divTagIdName.indexOf("sectionset") != -1)
		{
			document.getElementById(divSectionTags[counter].id).style.visibility = "hidden";
		}
	}
}
