function toggleSubMenu(id) {
	var submenu = document.getElementById("submenurow" + id);
	if(submenu.style.display == "block" || submenu.style.display == "") document.getElementById("submenurow" + id).style.display = "none";
	else document.getElementById("submenurow" + id).style.display = "block";
	setPageSizeWithScroll();
}


function setPageSizeWithScroll(){
	var yWithScroll = document.getElementById("containermain").scrollHeight + 220;
	var mWithScroll = document.getElementById("containerleft").scrollHeight + 220;
	var aWithScroll = document.getElementById("contentboxtop").scrollHeight + 220;
	if(mWithScroll > yWithScroll) yWithScroll = mWithScroll;
	if(aWithScroll > yWithScroll) yWithScroll = aWithScroll;
	var myheight = document.documentElement.clientHeight;
	myheight +=0;
	if(yWithScroll < myheight) {	
		document.getElementById("containerlayout").style.height = (myheight - 220) + "px";
	}
	else document.getElementById("containerlayout").style.height = (yWithScroll - 215) + "px";
}
