function aktiv(inp) 
{
	inp.style.backgroundColor = "#ffffff";
	inp.style.scrollbarTrackColor  = "#ffffff";
}
function inaktiv(inp)
{
	inp.style.backgroundColor = "#F0F6F5";
	inp.style.scrollbarTrackColor  = "#F0F6F5";
}


function openw(theURL,winName,features) {
imagenews = new Image();imagenews.src = ""+theURL;
var fenster = window.open("",winName,features);

fenster.document.open();
fenster.document.write("<html><head><title>:: RIFF NIENHAGEN ::</title><link rel='stylesheet' href='style.css' type='text/css'></head><body bgcolor='#ffffff'><table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0'><tr><td align='center'><table bgcolor=#32495D border=0 cellpadding=1 cellspacing=1><tr><td bgcolor=#ffffff><img src='"+imagenews.src+"'></td></tr></table></td></tr><tr><td align='center' height='25'><a href='javascript:window.close()'>Fenster schlie&szlig;en</a></td></tr></table></body></html>");
fenster.document.close();


fenster.focus();

}

function getsize()
{
	// Breite und Hoehe des Anzeigebereiches im Browserfenster ermitleln 
	if (self.innerWidth) // all except Explorer 
	{ 
		breite = self.innerWidth; 
	} 
	else if (document.documentElement && document.documentElement.offsetWidth) // Explorer 6 Strict Mode 
	{ 
		breite = document.documentElement.offsetWidth; 
	} 
	else if (document.body) // other Explorers 
	{ 
		breite = document.body.clientWidth; 
	}// Breite und Hoehe des Anzeigebereiches im Browserfenster ermitleln 
	
	
	
	if (self.innerHeight) // all except Explorer 
	{ 
		hoehe = self.innerHeight; 
	} 
	else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode 
	{ 
		hoehe = document.body.clientHeight;
	} 
	else if (document.body) // other Explorers 
	{ 
		hoehe = document.body.clientHeight;
	}
	
	vbreite = (breite - 16)/100*100;
	vhoehe = hoehe - 10;
	startx = (vbreite - 937)/2;
	starty = 0;
	if(startx < 0){startx = 0};
	if(starty < 0){starty = 0};
	leftpadding = 242;
	toppadding = 270;
	bottompadding = 55;
	
}

function setelements(korrektur)
{
	if(navigator.appName!="Microsoft Internet Explorer")
	{
		korrektur = 0;
	}
	
	var obj = document.getElementById("textinhalt");
	var navigesamt = obj.getElementsByTagName("span").length;
	for(inavi=0;inavi<navigesamt;inavi++)
	{
		nummer = inavi + 1;
		if(nummer<10)
		{
			nummer = "0"+nummer;
		}
		obj.getElementsByTagName("span")[inavi].innerHTML = nummer;
	}
	
	var navigesamt = obj.getElementsByTagName("i").length;
	for(inavi=0;inavi<navigesamt;inavi++)
	{
		nummer = inavi + 1;
		if(nummer<10)
		{
			nummer = "0"+nummer;
		}
		obj.getElementsByTagName("i")[inavi].innerHTML = "·";
	}
	

	document.getElementById("hauptfenster").style.left = (startx+korrektur)
	document.getElementById("inhalt").style.left = leftpadding+"px";
	document.getElementById("inhalt").style.top = toppadding+"px";
	//alert(breite);
	
	if(document.getElementById("inhalt").offsetHeight + bottompadding + toppadding > hoehe)
	{
		document.getElementById("hauptfenster").style.height = document.getElementById("inhalt").offsetHeight + bottompadding + toppadding;
		document.getElementById("haupttable").style.height = document.getElementById("inhalt").offsetHeight + bottompadding + toppadding;
	}
	else
	{
		document.getElementById("hauptfenster").style.height = hoehe;
		document.getElementById("haupttable").style.height = hoehe;
	}
}
window.onresize = function() 
{
	getsize();
	setelements(0);
}