//entfernt die markierungen beim klicken eines links <a>-Tag
function BlurLinks()
{
	// Grösse an Höhe anpassen
	setToFullSize();
	
	// Text- u. Grafik-Links
	links=document.getElementsByTagName('a');
	//geht alle a-tags im dokument durch und setzt die funktion: onfocus=this.blur
	for(i=0;i<links.length;i++)	// .length = anzahl Tag auf der Seite
	{
		links[i].onfocus=new Function("this.blur()");
	}
	
	//menu schreiben:
	//alle tabellenzeilen mit der klasse menu bzw. untermenu beim mouseover und mouseout
	//entsprechend formatieren
	
	//dies gilt nicht für opera, da er es nicht richtig anzeigt!
	if (navigator.appName != "Opera")
	{
		var menu = "menu";
		var untermenu = "untermenu";
		
		//var zellen = document.getElementsByTagName('td');
		var zellen = document.getElementsByTagName("td");
		//geht alle a-tags im dokument durch und setzt die funktionen
		for(i=0;i<zellen.length;i++)	// .length = anzahl Tag auf der Seite
		{
			if (zellen[i].className == menu)
			{
				zellen[i].onmouseover=new Function("this.style.backgroundColor='#97D2FC';this.style.borderTop='1px solid #000000';this.style.borderBottom='1px solid #000000'");
				zellen[i].onmouseout=new Function("this.style.backgroundColor='';this.style.borderTop='1px solid #B2DFFF';this.style.borderBottom='1px solid #B2DFFF'");		
			}
			if (zellen[i].className == untermenu)
			{
				zellen[i].onmouseover=new Function("this.style.backgroundColor='#A7DAFF';this.style.borderTop='1px dashed #000000';this.style.borderBottom='1px dashed #000000'");
				zellen[i].onmouseout=new Function("this.style.backgroundColor='';this.style.borderTop='1px solid #B2DFFF';this.style.borderBottom='1px solid #B2DFFF'");
			}
		}
	}
	else
	{
		var menu = "menu";
		var untermenu = "untermenu";
		
		//var zellen = document.getElementsByTagName('td');
		var zellen = document.getElementsByTagName("td");
		//geht alle a-tags im dokument durch und setzt die funktionen
		for(i=0;i<zellen.length;i++)	// .length = anzahl Tag auf der Seite
		{
			if (zellen[i].className == menu)
			{
				zellen[i].onmouseover=new Function("this.style.paddingLeft='2px'");
				zellen[i].onmouseout=new Function("this.style.paddingLeft='1px'");		
			}
			if (zellen[i].className == untermenu)
			{
				zellen[i].onmouseover=new Function("this.style.paddingLeft='2px'");
				zellen[i].onmouseout=new Function("this.style.paddingLeft='1px'");
			}
		}		
	}
}

function setToFullSize()
{
	if(navigator.appVersion.indexOf("MSIE 6") > 0)
	{
		return;
	}
	
	var divs = document.getElementsByTagName("div");
	for(var i = 0; i < divs.length; i++)
	{
		if(divs[i].style.overflow == "auto")
		{
			if(navigator.appVersion.indexOf("MSIE 6") > 0 || navigator.appVersion.indexOf("MSIE 7") > 0 || navigator.appVersion.indexOf("MSIE 8") > 0)
			{
				 
				 divs[i].style.height = (document.documentElement.clientHeight - 170) + "px";
			}
			else
			{
				divs[i].style.height = (window.innerHeight - 170) + "px";
			}
		}				
	}
	
	var tds = document.getElementsByTagName("td");
	for(var i = 0; i < tds.length; i++)
	{
		if(tds[i].className == "sitemap" && tds[i].colSpan == 1)
		{
			if(navigator.appVersion.indexOf("MSIE 6") > 0 || navigator.appVersion.indexOf("MSIE 7") > 0 || navigator.appVersion.indexOf("MSIE 8") > 0)
			{
				tds[i].height = document.documentElement.clientHeight - 160;
			}
			else
			{
				tds[i].height = window.innerHeight - 160;
			}
		}
	}
	
	var imgs = document.getElementsByTagName("img");
	for(var i = 0; i < imgs.length; i++)
	{
		if(imgs[i].src.indexOf("logo-pro-aachtal.jpg") > 0)
		{
			imgs[i].parentNode.parentNode.style.verticalAlign = "bottom";
		}
	}
	
	window.onresize = setToFullSize;
}
