
/* Using PHP, change the parameter in the body onload function to display different submenus */
function expandMenu(subID)
{
   if(subID != "none") // if the subMenu was asked to be open then...
   {	
	var fullID = subID + "SubMenu";
	window.document.getElementById(fullID).style.display="inline";
   }
}

function changeFontSize(id,size)
{

	/*
	If there is no input for id that i know that the function is called by the select menu and therefore
	is intended to change the main text. Also dont forget that size should be defined by the select
	This way i can also call the function from other places with specific ids if necessary
	*/
	if(id == undefined && size == undefined)
	{
		id = "contentText";
		var selected = window.document.textSizer.textSize.selectedIndex;
		var size = window.document.textSizer.textSize[selected].value;
		var elmStyle = window.document.getElementById(id).style;
		elmStyle.fontSize = size;
	}
	else if(id == undefined && size != undefined)
	{
		id = "contentText";
		var elmStyle = window.document.getElementById(id).style;
		elmStyle.fontSize = size;
	}
	
	// Also set the cookie
	setCookie(size);

}
