function setColor(object, rowNr)
{
	// set background-color of Text to 'transparent' to reformat the hover-effect for links set in formats.css!!!!
	obj = document.getElementById(object);
	obj.style.backgroundColor = normalColor;
	
	row = document.getElementById("td"+rowNr);
	row.style.backgroundColor = highlightColor;
}

function resetColor(object, rowNr)
{
	obj = document.getElementById(object);
	obj.style.backgroundColor = normalColor;
	
	row = document.getElementById("td"+rowNr);
	row.style.backgroundColor = normalColor;
}

function setActive(object)
{
	document.getElementById(object).style.backgroundColor = highlightColor;
}

function calcPosition()
{
	obj1 = document.getElementById("main");
	obj2 = document.getElementById("main_images");
	browser = checkBrowser();
	
	if (browser == 1 || browser == 3)					// if InternetExplorer or Opera
	{
		winHeight = document.body.offsetHeight;
		winWidth = document.body.offsetWidth;
	}
	else												// Netscape
	{
		winHeight = window.innerHeight;
		winWidth = window.innerWidth;
	}
	
	xPos = winWidth-contentWidth;
	xPos < 0 ? xPos = -20 : xPos;
	
	// Positionieren der beiden HauptDivs
	obj1.style.left = (xPos) / 2;
	obj1.style.top = topPos;
	
	obj2.style.left = ((xPos) / 2) + 30;
	obj2.style.top = topPos + 10;
	
	nsOffset();		// korrigieren der Positionen für Netscape
}

// Netscape-Helper-Function
function nsOffset()
{
	if (!document.all)
	{
		//offset für Graphiken bei Netscapebenutzung
		document.getElementById("dots_hor").style.top = 80;
		var obj = document.getElementById("lego");
		if (obj)  obj.style.bottom = -5;
	}
}
	
function checkBrowser()
{
	browserName = navigator.appName;
	usrAgent = navigator.userAgent;
	
	// check for Browser and get screen dimensions
	if (document.body && document.body.offsetWidth)		// if InternetExplorer
	{
		if (usrAgent.indexOf("Opera"))
		{
			browserAPP = 3;
		}
		else
		{
			browserAPP = 1
		}
	}
	else												// !Internet Explorer
	{
		if(browserName == "Netscape")					
		{
			browserAPP = 2;
		}
	}
	return browserAPP
}
