// JavaScript Document
//MENU AAN
function MoOnMenu(id,img){
		document.getElementById(id).src=_PROJECT_URL+"img/nav/"+img+"_o.jpg";
}

//MENU UIT
function MoOutMenu(id,img){
		document.getElementById(id).src=_PROJECT_URL+"img/nav/"+img+".jpg";
}

function OpenSubMenu(){
	if (subMenuActive==false){
		document.getElementById("diensten").src=_PROJECT_URL+"img/nav/diensten_o.jpg";
	}else{
		document.getElementById("diensten").src=_PROJECT_URL+"img/nav/diensten_a.jpg";
	}
	document.getElementById('menu_1').style.display='block'
	document.getElementById('menu_2').style.display='block'
}

function CloseSubMenu() {
	document.getElementById("diensten").src=_PROJECT_URL+"img/nav/diensten.jpg";
	document.getElementById('menu_1').style.display='none'
	document.getElementById('menu_2').style.display='none';
}

function displayItem(id,status) {
	document.getElementById(id).style.display=status
}

// CONTENT HIGHLIGHT NEW IMAGE FUNCTIE
//CONTENT HIGHLIGHT
function content_highlight(){
	NewImage('pijl_'+content_highlight_box_nr_prev,'button_'+content_highlight_box_nr_prev+'.png')
	NewImage('pijl_'+content_highlight_box_nr,'button_'+content_highlight_box_nr+'_o.png')
	
	if (content_highlight_box_nr == 1) {
		NewImageDatabase('infoImage',_info1)
		EditText(_inhoud_1,_titel_1)
	}else if (content_highlight_box_nr == 2) {
		NewImageDatabase('infoImage',_info2)
		EditText(_inhoud_2,_titel_2)
	}else if (content_highlight_box_nr == 3) {
		NewImageDatabase('infoImage',_info3)
		EditText(_inhoud_3,_titel_3)
	}
		
	content_highlight_box_nr_prev = content_highlight_box_nr

	if (content_highlight_box_nr<3) { 
		content_highlight_box_nr++ 
	}else{
		content_highlight_box_nr = 1
	}
	
	if (stopTimer==false){
		trigger = setTimeout("content_highlight()",5000)
	}
}




function MoHover(id){
	document.getElementById(id).style.backgroundColor = "#E5E5E5"
}

function mOutHover(id){
	document.getElementById(id).style.backgroundColor = "#FFFFFF"
}

function NewImage(id,img){
	document.getElementById(id).src=_PROJECT_URL+"img/"+img
}

function NewImageDatabase(id,img){
	document.getElementById(id).src=img
}


// 
function EditText(inhoud,titel) {
	document.getElementById('inhoud').innerHTML = inhoud;
	document.getElementById('titel').innerHTML = titel;
}

function content_highlight_mouseover(selectedId){
	stopTimer=true //Timeout uitzetten
	clearTimeout(trigger) //timeout leegmakane
	content_highlight_box_nr=selectedId //highlight geslecteerde div
	content_highlight() //highlight functie weer aanzetten.
	document.getElementById("highlight_box_"+selectedId).style.backgroundColor = "#f2f2f2"
}

function content_highlight_mouseOut(selectedId){
	document.getElementById("highlight_box_"+selectedId).style.backgroundColor = "#ffffff"	
	stopTimer=false //Timeout aanzeten
	content_highlight_box_nr=1  //highlight boven aan beginnen
	clearTimeout(trigger) //timeout leegmaken
	content_highlight() //highlight functie weer aanzetten.
}