function ToggleField(id)
{
	var o = document.getElementById(id);
	if (o)
	{
		if (o.style.display == "none")
		{
			o.style.display = "";
		}
		else
		{
			o.style.display = "none";
		}
	}
}

function SetActiveMenu(page)
{
	var id = "";
	var subnav = "";
	var subnavid = "";
	switch(page)
	{
		case "general":
			id = "miGeneral";
			break;
		case "framework":
			id = "miFramework";
			break;
		case "storage":
			id = "miStorage";
			break;
			
		case "applications":
			id = "miApplications";
			subnav = "navApps";
			subnavid = "miAppsGeneral";
			break;
		case "applications.doctemplatebuilder":
			id = "miApplications";
			subnav = "navApps";
			subnavid = "miAppsDocTemplateBuilder";
			break;
		case "applications.zoho":
			id = "miApplications";
			subnav = "navApps";
			subnavid = "miAppsZoho";
			break;
			
		case "office":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeGeneral";
			break;
		case "office.contacts":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeContacts";
			break;
		case "office.casetracker":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeCaseTracker";
			break;
		case "office.projects":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeProjects";
			break;
		case "office.financial":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeFinancial";
			break;
		case "office.accounting":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeAccounting";
			break;
		case "office.userrights":
			id = "miOffice";
			subnav = "navOffice";
			subnavid = "miOfficeUserrights";
			break;
			
		case "faq":
			id = "miFAQ";
			break;
		case "licenses":
			id = "miLicenses";
			break;
		case "marjotmultisoft":
			id = "miMMS";
			break;
	}
	
	if (id)
	{
		var o = document.getElementById(id);
		if (o)
		{
			o.className = "activenav";
		}
	}
	
	if (subnav)
	{
		var o = document.getElementById(subnav);
		if (o)
		{
			o.style.display = "";
		}

		if (subnavid)
		{
			var o = document.getElementById(subnavid);
			if (o)
			{
				o.className = "activenav";
			}
		}
	}
}