function highlightButton(ID){
	document.getElementById(ID).style.background = "#E2001A";
	document.getElementById(ID+"Link").style.color = "#FFF";
}

function normalizeButton(ID){
	document.getElementById(ID).style.background = "#FFF";
	document.getElementById(ID+"Link").style.color = "#006";	
}

function getRed(ID){

	// wahl 2008 has two template pages (for highlighting images) - check for overview page
	if (ID == "wahl2008_overview")
	{	
		document.getElementById("wahl2008Link").style.backgroundColor = "#E2001A";
		document.getElementById("wahl2008Link").style.color = "#FFF";
	}

	else
	{
		document.getElementById(ID+"Link").style.backgroundColor = "#E2001A";
		document.getElementById(ID+"Link").style.color = "#FFF";
	}
	
}

function getRedCandidates(ID){
	document.getElementById(ID).style.backgroundColor = "#E2001A";
	document.getElementById(ID+"Link").style.color = "#FFF";	
	document.getElementById(ID+"Link").style.fontWeight = "bold";	
	document.getElementById(ID).style.borderTop = "0px solid #FFF";		
}

function changeImageColor(IDname){
	ID = IDname.substring(3);	
	{document.getElementById(""+IDname+"").setAttribute("src","img/kandidaten/"+ID+".jpg");}
	document.getElementById(""+ID+"Link").style.fontWeight = "bold";
}

function changeImageGrey(IDname){
	ID = IDname.substring(3);
	document.getElementById(""+IDname+"").setAttribute("src","img/kandidaten/"+ID+"_grau.jpg");
	document.getElementById(""+ID+"Link").style.fontWeight = "normal";	
}

function changeImageColor2(IDname){
	ID = IDname.substring(3);	
	{document.getElementById(""+IDname+"").setAttribute("src","img/kandidaten/"+ID+".jpg");}
	//document.getElementById(""+ID+"Link").style.fontWeight = "bold";
}

function changeImageGrey2(IDname){
	ID = IDname.substring(3);
	document.getElementById(""+IDname+"").setAttribute("src","img/kandidaten/"+ID+"_grau.jpg");
	//document.getElementById(""+ID+"Link").style.fontWeight = "normal";	
}


// FUNCTIONS FOR NAVIGATION

navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
