// COPYRIGHT DIGITAL CONNECT 2008 
// Alle Rechte vorbehalten!

function setcolor() {
	if (document.cookie) {
		farbe = document.cookie;
		//alert(farbe);
		changecolor(farbe);
	}
	else {
	changecolor('#00389A');
	}
}

function changecolor(color) {
var ltrans = document.getElementById('trans');
var lcontent = document.getElementById('content');

	if (color == "white") {
		ltrans.style.backgroundColor = color;
		lcontent.style.color = "black";
	for(n=0;n<document.getElementsByTagName('h1').length;++n)
		{
		document.getElementsByTagName('h1')[n].style.color = "#00389A";
		}
	for(f=0;f<document.getElementsByTagName('h2').length;++f)
		{
		document.getElementsByTagName('h2')[f].style.color = "#00389A";
		}
	for(i=7;i<document.getElementsByTagName('a').length;++i)
		{
		links = document.getElementsByTagName('a')[i];
		links.style.color = "black";
		}
	}
	else {
		ltrans.style.backgroundColor = color;
		lcontent.style.color = "white";
	for(n=0;n<document.getElementsByTagName('h1').length;++n)
		{
		document.getElementsByTagName('h1')[n].style.color = "white";
		}
	for(f=0;f<document.getElementsByTagName('h2').length;++f)
		{
		document.getElementsByTagName('h2')[f].style.color = "white";
		}
	for(i=7;i<document.getElementsByTagName('a').length;++i)
		{
		links = document.getElementsByTagName('a')[i];
		links.style.color = "white";
		}
	}
document.cookie = color; 
//alert("color= "+color);
}
