
		
function switchBackground(id) {
	if (!window.ie6) {
		bodybgColor.start(backgroundColor[id]);
	}
}

function fadingBackground() {
		
		backgroundColor = {};
		
		backgroundColor[0] = "800a2b";
		backgroundColor[1] = "003772";
		backgroundColor[2] = "b5c000";
		backgroundColor[3] = "dccd38";
		
		menuItem = {}
		
		menuItem[0] = $('mitem0');
		menuItem[1] = $('mitem1');
		menuItem[2] = $('mitem2');
		menuItem[3] = $('mitem3');
		
		menuItemHash = {}
		
		menuItemHash[0] = "#home";
		menuItemHash[1] = "#betrieb";
		menuItemHash[2] = "#produkte";
		menuItemHash[3] = "#kontakt";
		
		bodybgColor = $(document.body).effect('background-color', {wait: false, duration: 1000});
		
		switch (window.location.hash) {
			case menuItemHash[0]:
				var bodybgColorFix = $(document.body).effect('background-color', {wait: false, duration: 1});
				bodybgColorFix.start(backgroundColor[0]);
				$(document.body).setStyle('background-color', backgroundColor[0]);
				
			break;
			case menuItemHash[1]:
				var bodybgColorFix = $(document.body).effect('background-color', {wait: false, duration: 1});
				bodybgColorFix.start(backgroundColor[1]);
				$(document.body).setStyle('background-color', backgroundColor[0]);
				
			break;
			case menuItemHash[2]:
				var bodybgColorFix = $(document.body).effect('background-color', {wait: false, duration: 1});
				bodybgColorFix.start(backgroundColor[2]);
				$(document.body).setStyle('background-color', backgroundColor[0]);
				
			break;
			case menuItemHash[3]:
				var bodybgColorFix = $(document.body).effect('background-color', {wait: false, duration: 1});
				bodybgColorFix.start(backgroundColor[3]);
				$(document.body).setStyle('background-color', backgroundColor[3]);
				
			break;
			default:
				var bodybgColorFix = $(document.body).effect('background-color', {wait: false, duration: 1});
				bodybgColorFix.start(backgroundColor[0]);
				$(document.body).setStyle('background-color', backgroundColor[0]);
			break;
		}
		
		$("mod_horizontalmenu").addEvent("mouseleave", function(e) {

			switch (window.location.hash) {
				case menuItemHash[0]:
					bodybgColor.start(backgroundColor[0]);
				break;
				case menuItemHash[1]:
					bodybgColor.start(backgroundColor[1]);
				break;
				case menuItemHash[2]:
					bodybgColor.start(backgroundColor[2]);
				break;
				case menuItemHash[3]:
					bodybgColor.start(backgroundColor[3]);
				break;
				default:
					bodybgColor.start(backgroundColor[0]);
				break;
			}

							
		});
	
	}

