function topnavOver(x) {
	x.style.setAttribute("backgroundImage","url('/fileadmin/xdot/images_2008/bg-buttonover.gif')","false");
}
function topnavOut(x) {
	if (x.id == 'tophere') {
	} else {
		x.style.setAttribute("backgroundImage","url('/fileadmin/xdot/images_2008/bg-button.gif')","false");
	}
}
function subnavOver(x) {
	x.style.background='#89C11E';	
}
function subnavOut(x) {
	x.style.background='#F4FBEB';	
}
function subnavOverLink(x) {
	x.style.color='white';	
}
function subnavOutLink(x) {
	x.style.color='#666666';	
}

function changeClassOver(x) {
	x.setAttribute('class','overbutton','false');	
}
function changeClassOut(x) {
	x.setAttribute('class','button','false');	
}
function changeClassOverLast(x) {
	x.setAttribute('class','overbutton last','false');	
}
function changeClassOutLast(x) {
	x.setAttribute('class','button last','false');	
}

function hideSubnav(x) {
	document.getElementById(x).style.visibility = 'hidden';	
}
function showSubnav(x) {
	switch(x) {
		 case "layer1":
			 document.getElementById(x).style.background = '#F4FBEB';
			 document.getElementById(x).style.fontColor = '#85C411';
			 document.getElementById(x).style.fontSize = '10px';
			 document.getElementById(x).style.visibility = 'visible';
			 hideSubnav('layer3');
			 break;
		 case "layer2":
			 hideSubnav('layer1');hideSubnav('layer3');
			 break;
		 case "layer3":
		 	 document.getElementById(x).style.background = '#F4FBEB';
			 document.getElementById(x).style.fontColor = '#85C411';
			 document.getElementById(x).style.fontSize = '10px';
			 document.getElementById(x).style.visibility = 'visible';
			 hideSubnav('layer1');
			 break;
		 case "layer4":
			 hideSubnav('layer1');hideSubnav('layer3');
			 break;
		 default:
			 break;
	}
}

function buttonOver(x,y) {
	switch(y) {
		 case "layer4":
			 changeClassOverLast(x);
			 showSubnav(y);
			 topnavOver(x);
			 break;
		 default:
			 changeClassOver(x);
			 showSubnav(y);
			 topnavOver(x);
			 break;
	}	
}
function buttonOut(x,y) {
	switch(y) {
		 case "layer4":
			 changeClassOutLast(x);
			 topnavOut(x);
			 break;
		 default:
			 changeClassOut(x);
			 topnavOut(x);
			 break;
	}	
}
