/*
 * The Careers menu item has a special yellow style. To avoid making changes to the Joomla code,
 * this script was developed to find the careers menu item and give it a special class name,
 * thereby making it possible to give the menu item its exclusive style with CSS 
 *
function careers() {
// grab all the links in the navigation div
	var theindex = document.getElementById("navigation").getElementsByTagName("a");
// loop through all links
	for (var e = 0; e < theindex.length; e++) {
// look for Careers
		if((theindex[e].firstChild.nodeValue == "Careers") || (theindex[e].firstChild.nodeValue == "Carrière")) {
// add careers to the <a> class
			theindex[e].className += "careers";
// add careers to the <li> class
			theindex[e].parentNode.className += "careers";
// check whether Careers is the active page
			if(theindex[e].parentNode.className == "mainlevel_currentcareers" || theindex[e].parentNode.className == "mainlevel_activecareers" ) {
// if so add careers to the subnavigation class
				var thesubindex = document.getElementById("subnav");
				thesubindex.className = "careers";
			}
		}
	}
}

/*
 * The labels of the careers and news modules on the homepage should be linked to 
 * their respective pages. This script was developed to find the labels and insert
 * a link to the right page.
 */
function linktitles() {
// look for all titles (H3) in the content
	var thetitle = document.getElementById("content").getElementsByTagName("h3");
// loop through them all
	for (var l = 0; l < thetitle.length; l++) {
// look for careers (reg expr used to get rid of spaces)
		if(thetitle[l].firstChild.nodeValue.replace(/^\s+|\s+$/g, '') == "Careers") {
// clear the content
			thetitle[l].firstChild.nodeValue = "";
// create new text
			var thetext = document.createTextNode("Careers");
// create a link
			var thelink = document.createElement("a");
// set the link 
			thelink.setAttribute("href", 'index.php?option=com_content&task=blogsection&id=2&Itemid=15');
// add the new text to the link
			thelink.appendChild(thetext);
// add the link to the title
			thetitle[l].appendChild(thelink);
		}
// in Dutch
		if(thetitle[l].firstChild.nodeValue.replace(/^\s+|\s+$/g, '') == "Carrière") {
			thetitle[l].firstChild.nodeValue = "";
			var thetext = document.createTextNode("Carrière");
			var thelink = document.createElement("a");
			thelink.setAttribute("href", 'index.php?option=com_content&task=blogsection&id=3&Itemid=25');
			thelink.appendChild(thetext);
			thetitle[l].appendChild(thelink);
		}
// repeat the whole process for News
		if(thetitle[l].firstChild.nodeValue.replace(/^\s+|\s+$/g, '') == "News") {
			thetitle[l].firstChild.nodeValue = "";
			var thetext = document.createTextNode("News");
			var thelink = document.createElement("a");
			thelink.setAttribute("href", 'index.php?option=com_content&task=blogsection&id=3&Itemid=25');
			thelink.appendChild(thetext);
			thetitle[l].appendChild(thelink);
		}
// and for Nieuws
		if(thetitle[l].firstChild.nodeValue.replace(/^\s+|\s+$/g, '') == "Nieuws") {
			thetitle[l].firstChild.nodeValue = "";
			var thetext = document.createTextNode("Nieuws");
			var thelink = document.createElement("a");
			thelink.setAttribute("href", 'index.php?option=com_content&task=blogsection&id=3&Itemid=25');
			thelink.appendChild(thetext);
			thetitle[l].appendChild(thelink);
		}
	}
}

// Disable right mouse click Script
// By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
// For full source code, visit http://www.dynamicdrive.com

function GoAction()
{
}

function clickIE4()
{
if (event.button == 2)
	{
	GoAction();
	return false;
	}
}

function clickNS4(e)
{
if (document.layers || document.getElementById && !document.all)
	{
	if (e.which == 2 || e.which == 3)
		{
		GoAction();
		return false;
		}
	}
}

if (document.layers)
	{
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS4;
	}
else if (document.all && !document.getElementById)
	{
	document.onmousedown = clickIE4;
	}

document.oncontextmenu = new Function("GoAction(); return false");