// JavaScript Document
function init(){
	$("homeBtn").onmouseover = new Function("VeranderFoto('homeBtn','home_hover')");	
	$("homeBtn").onmouseout = new Function("VeranderFoto('homeBtn','home')");
	$("contactBtn").onmouseover = new Function("VeranderFoto('contactBtn','contact_hover')");	
	$("contactBtn").onmouseout = new Function("VeranderFoto('contactBtn','contact')");
	$("trainingBtn").onmouseover = new Function("VeranderFoto('trainingBtn','training_hover')");	
	$("trainingBtn").onmouseout = new Function("VeranderFoto('trainingBtn','training')");
	$("mediaBtn").onmouseover = new Function("VeranderFoto('mediaBtn','media_hover')");	
	$("mediaBtn").onmouseout = new Function("VeranderFoto('mediaBtn','media')");	
	$("geschiedenisBtn").onmouseover = new Function("VeranderFoto('geschiedenisBtn','geschiedenis_hover')");	
	$("geschiedenisBtn").onmouseout = new Function("VeranderFoto('geschiedenisBtn','geschiedenis')");
	
	
	
}

function VeranderFoto(sId, foto) {
	if (sId != 'zend'){
		
		document.getElementById(sId).style.backgroundImage = 'url(images/nav/'+foto+'.png)';
		document.getElementById(sId).style.backgroundRepeat = 'no-repeat';
		document.getElementById(sId).style.backgroundPosition = 'bottom';
		
		//document.getElementById(sId).setAttribute("src", "images/nav/" + foto + ".png");//dir niet vergeten anders werkt het in 1 van de browser
	}else{
		//document.getElementById(sId).setAttribute("src", "images/nav/" + foto + ".png");
		document.getElementById(sId).style.backgroundImage = 'none';
	}
	
	
}

function $(id){
	return document.getElementById(id);
}

function activateMenuItem(type){
	var menuItems = $('subMenu').getElementsByTagName('a');
	for(var i in menuItems)	menuItems[i].className = '';// alle menuitems op null zetten zodat er slechts 1 actief kan gezet worden
	 $(type).className = 'active';
	 
}
