window.onload = init;

function init()
{
	/* variablen definieren */
	
	var news = document.getElementById("news");
	var newsdiv = document.getElementById("newsdiv");
	var newsul = document.getElementById("newsul");
	
	var leistungen = document.getElementById("leistungen");
	var leistungendiv = document.getElementById("leistungendiv");
	var leistungenul = document.getElementById("leistungenul");
	
	var tipps = document.getElementById("tipps");
	var tippsdiv = document.getElementById("tippsdiv");
	var tippsul = document.getElementById("tippsul");
	
	var standorte = document.getElementById("standorte");
	var standortediv = document.getElementById("standortediv");
	var standorteul = document.getElementById("standorteul");
	
	var ueberuns = document.getElementById("ueberuns");
	var ueberunsdiv = document.getElementById("ueberunsdiv");
	var ueberunsul = document.getElementById("ueberunsul");
	
	var versicherung = document.getElementById("versicherung");
	var versicherungdiv = document.getElementById("versicherungendiv");
	var versicherungul = document.getElementById("versicherungul");
	
	var homeing = document.getElementById("homeing");
		
	leistungen.onmouseover = leistungenopen;
	tipps.onmouseover = tippsopen;
	standorte.onmouseover = standorteopen;
	ueberuns.onmouseover = ueberunsopen;
	news.onmouseover = newsopen;
	versicherung.onmouseover = versicherungopen;
	
}

durationtime = 0.2;


/* funktionen */	
	
function leistungenopen(leistungenul)
{
	var neufahrzeugeappear = Effect.Appear('leistungenul', { duration: durationtime });
	tippsclose();
	standorteclose();
	ueberunsclose();
	newsclose();
	versicherungclose();
}

function leistungenclose(leistungenul)
{
	Effect.Fade('leistungenul', { duration: durationtime });
}	

function tippsopen(tippsul)
{
	var neufahrzeugeappear = Effect.Appear('tippsul', { duration: durationtime });
	leistungenclose();
	standorteclose();
	ueberunsclose();
	newsclose();
	versicherungclose();
}

function tippsclose(tippsul)
{
	Effect.Fade('tippsul', { duration: durationtime });
}	

function standorteopen(standorteul)
{
	var neufahrzeugeappear = Effect.Appear('standorteul', { duration: durationtime });
	
	leistungenclose();
	tippsclose();
	ueberunsclose();
	newsclose();
	versicherungclose();
}

function standorteclose(tippsul)
{
	Effect.Fade('standorteul', { duration: durationtime });
}	
	
function ueberunsopen(ueberunsul)
{
	var neufahrzeugeappear = Effect.Appear('ueberunsul', { duration: durationtime });
	
	leistungenclose();
	tippsclose();
	standorteclose();
	newsclose();
	versicherungclose();
}

function ueberunsclose(ueberunsul)
{
	Effect.Fade('ueberunsul', { duration: durationtime });
}	

function newsopen(newsul)
{
	var neufahrzeugeappear = Effect.Appear('newsul', { duration: durationtime });
	
	leistungenclose();
	tippsclose();
	standorteclose();
	ueberunsclose();
	versicherungclose();
}

function newsclose(newsul)
{
	Effect.Fade('newsul', { duration: durationtime });
}	

function versicherungopen(versicherungul)
{
	var neufahrzeugeappear = Effect.Appear('versicherungul', { duration: durationtime });
	
	leistungenclose();
	tippsclose();
	standorteclose();
	ueberunsclose();
	newsclose();
}

function versicherungclose(newsul)
{
	Effect.Fade('versicherungul', { duration: durationtime });
}	

/* MOUSEOVEREVENTS BACKGROUND-COLOR */

function out(div)
{
	colorTween.stop(); colorTweenout = new ColorTween(div.style, 'backgroundColor', Tween.regularEaseOut, '000000', '000000', 0.8);
	colorTweenout.start();	
}

function mouseover(div)
{
	colorTween = new ColorTween(div.style, 'backgroundColor', Tween.regularEaseOut, '000000', 'da0000', 0.8);
    colorTween.start();
}

function out1(div)
{
	colorTween.stop(); colorTweenout = new ColorTween(div.style, 'backgroundColor', Tween.regularEaseOut, '242424', '242424', 0.8);
	colorTweenout.start();	
}

function mouseover1(div)
{
	colorTween = new ColorTween(div.style, 'backgroundColor', Tween.regularEaseOut, '242424', 'da0000', 0.8);
    colorTween.start();
}
