var hex=275;

function show(keuze) {
	hex = 275;
	document.getElementById(keuze).style.display = 'inline';
	document.getElementById('li' + keuze).style.color = 'white';
	document.getElementById('li' + keuze).style.backgroundColor = '#444';
	fadetext_up(keuze);
}

function hide(keuze) {
	hex=0;
	document.getElementById(keuze).style.display = 'none';
	document.getElementById('li' + keuze).style.color = '';
	document.getElementById('li' + keuze).style.backgroundColor = '';
}

function goTo(dir) {
	window.location.href=dir;
}

function fadetext_up(keuze3){ 
	if (hex>0)   { //If color is not black yet
		hex-=7; // increase color darkness
		if (document.getElementById(keuze3).style.display == 'inline') {
			document.getElementById(keuze3).style.color="rgb("+ (hex - 25) +","+ (hex-30) +","+ (hex+20) +")";
			setTimeout("fadetext_up('" + keuze3 + "')", 150); 
		}
	}
	else {
		hex=0; //reset hex value
		fadetext_down(keuze3);
	}
		
}


function fadetext_down(keuze3) {
	if (hex < 230)   { //If color is not black yet
		hex+=7; // increase color darkness
		if (document.getElementById(keuze3).style.display == 'inline') {
			document.getElementById(keuze3).style.color="rgb("+(hex-25)+","+(hex-30)+","+(hex+20)+")";
			setTimeout("fadetext_down('" + keuze3 + "')", 150); 
		}
	}
	else {
		hex=230; //reset hex value
		fadetext_up(keuze3);
	}
}
