// Kristof Lipfert 2009

document.write('<style>.art{height:'+(window.innerHeight-80)+'px}</style>')
if(window.innerHeight<670||screen.height<800)document.write('<style>.art h2{padding-top:5px;</style>')

if(document.namespaces)document.write('<style>.art p{padding-top:0;height:380px}</style>');

window.onload=function(){
if (!document.getElementsByClassName) {
document.getElementsByClassName = function (cn) {
var rx = new RegExp("\\b" + cn + "\\b"), allT = document.getElementsByTagName("*"), allCN = [], i = 0, a;
while (a = allT[i++]) {
if (a.className && a.className.indexOf(cn) + 1) {
if(a.className===cn){ allCN[allCN.length] = a; continue;   }
rx.test(a.className) ? (allCN[allCN.length] = a) : 0;
}}
return allCN;
}}

if(this.location.hash)document.wechsel(this.location);
else this.location.href=this.location.href+"#";
}

function zuWechsel(x){
y=this.location.href;
var r=1;
if(document.namespaces)r=0; 
zy=y.substring(0,y.indexOf("#"));
if(x.childNodes[r].id=="trauringkurse")
document.wexsel(zy+"#");
else
document.wexsel(zy+"#"+x.childNodes[r].id);
}

document.wechsel=function (t){t=t.href;document.wexsel(t);}

document.wexsel=function (t){
y=document.getElementById('nav').childNodes.length;
for(i=0;i<y;i++){
if(document.getElementById('nav').childNodes[i].childNodes.length>0){
if(t==document.getElementById('nav').childNodes[i].firstChild.href){
document.getElementById('nav').childNodes[i].firstChild.style.color = "gray";
document.getElementById('nav').childNodes[i].style.textAlign = "left";
}else{
document.getElementById('nav').childNodes[i].firstChild.style.color = "orange";
document.getElementById('nav').childNodes[i].style.textAlign = "right";
}}}}


