// Switches highlight on or off in the main menu
function buildNav()
	{

	// MAIN NAVIGATION POINTS
	if (location.pathname.indexOf('home')>0)
		{
		document.getElementById('home').className='menulinkactive';
		}
	if (location.pathname.indexOf('berufsbild')>0)
		{
		document.getElementById('berufsbild').className='menulinkactive';
		document.getElementById('berufsbildsub').style.display='block';
		}
	if (location.pathname.indexOf('veranstaltungen')>0)
		{
		document.getElementById('veranstaltungen').className='menulinkactive';
		}
	if (location.pathname.indexOf('stellen')>0)
		{
		document.getElementById('stellen').className='menulinkactive';
		document.getElementById('stellensub').style.display='block';
		}
	if (location.pathname.indexOf('organisation')>0)
		{
		document.getElementById('organisation').className='menulinkactive';
		document.getElementById('organisationsub').style.display='block';
		}

	if (location.pathname.indexOf('ratatouille')>0)
		{
		document.getElementById('ratatouille').className='menulinkactive';
		document.getElementById('ratatouillesub').style.display='block';
		}

	if (location.pathname.indexOf('dokumente')>0)
		{
		document.getElementById('dokumente').className='menulinkactive';
		}

	if (location.pathname.indexOf('kontaktelinks')>0)
		{
		document.getElementById('kontaktelinks').className='menulinkactive';
		document.getElementById('kontaktelinkssub').style.display='block';
		}
		
	if (location.pathname.indexOf('aktuelles')>0)
		{
		document.getElementById('aktuelles').className='menulinkactive';
		document.getElementById('aktuellsub').style.display='block';
		}

	// SUB-NAVIGATION POINTS
	if (location.pathname.indexOf('berufsbeschreibung.html')>0)
		{
		document.getElementById('berufsbeschreibung').className='submenulinkactive';
		}
	if (location.pathname.indexOf('berufspruefung.html')>0)
		{
		document.getElementById('berufsprufung').className='submenulinkactive';
		}
	if (location.pathname.indexOf('leitbild.html')>0)
		{
		document.getElementById('leitbild').className='submenulinkactive';
		}
	if (location.pathname.indexOf('lohnempfehlung.html')>0)
		{
		document.getElementById('lohnempfehlung').className='submenulinkactive';
		}
	if (location.pathname.indexOf('bvhlschulen.html')>0)
		{
		document.getElementById('bvhlschulen').className='submenulinkactive';
		}
	if (location.pathname.indexOf('stellenangebote.html')>0)
		{
		document.getElementById('stangebote').className='submenulinkactive';
		}
	if (location.pathname.indexOf('stellensuche.html')>0)
		{
		document.getElementById('stsuche').className='submenulinkactive';
		}
	if (location.pathname.indexOf('vorstand.html')>0)
		{
		document.getElementById('vorstand').className='submenulinkactive';
		}
	if (location.pathname.indexOf('organigramm.html')>0)
		{
		document.getElementById('organigramm').className='submenulinkactive';
		}
	if (location.pathname.indexOf('mitglied.html')>0)
		{
		document.getElementById('mitglied').className='submenulinkactive';
		}
	if (location.pathname.indexOf('fadezainli.html')>0)
		{
		document.getElementById('fadezainli').className='submenulinkactive';
		}
	if (location.pathname.indexOf('kochtopf.html')>0)
		{
		document.getElementById('kochtopf').className='submenulinkactive';
		}
	if (location.pathname.indexOf('adresse.html')>0)
		{
		document.getElementById('adresse').className='submenulinkactive';
		}
	if (location.pathname.indexOf('kformular.html')>0)
		{
		document.getElementById('kformular').className='submenulinkactive';
		}
	if (location.pathname.indexOf('adressaenderung.html')>0)
		{
		document.getElementById('adressaenderung').className='submenulinkactive';
		}
	if (location.pathname.indexOf('links.html')>0)
		{
		document.getElementById('links').className='submenulinkactive';
		}
	if (location.pathname.indexOf('fachausweis.html')>0)
		{
		document.getElementById('fachausweis').className='submenulinkactive';
		}
	if (location.pathname.indexOf('mitgliederversammlung.html')>0)
		{
		document.getElementById('mitgliederversammlung').className='submenulinkactive';
		}
	
}


// Set background of main navigation points
function checkNav(id,check)
	{
	if (location.pathname.indexOf(check)>0)
		{
		id.className='menulinkactive';
		}
	else
		{
		id.className='menulink';
		}
	}



// Set background of sub-navigation points
function checkSubnav(id,check)
	{
	if (location.pathname.indexOf(check)>0)
		{
		id.className='submenulinkactive';
		}
	else
		{
		id.className='submenulink';
		}
	}




