// Link auf eigene Seite = schwarz (Nav-Leiste links)
function marklink()
{ var i,f;
  if (parent.frames.length<2) f=location.href; else f=parent.location.href;
  if (f.indexOf('#')<0) // Nicht bei Ankern
  { if (f.substring(f.length-1)=='/') f+="index.htm";
    for (i=0; i<document.links.length; i++)
    { lk=document.links[i];
      if (f==lk.href && document.links[i].name=='')
      { lk.style.color="#CC0000"; lk.style.textDecoration="none";
        lk.style.cursor="default"
} } } }

// Onclick-Link = schwarz (Meteo-Navframe)
function clicklink(f)
{ var i,lk;
  for (i=0; i<document.links.length; i++)
  { lk=document.links[i];
    if (lk==f) f.style.color="#CC0000"
    else if (lk.title=='') {lk.style.color="#0000CC"}
} }

// Browser-Flags setzen
var b,ie;
op=(navigator.userAgent.indexOf('Opera')>-1);
if (op) { ie=false; ns=false; }
else { ns=(navigator.appName=='Netscape'); ie=navigator.appVersion.indexOf("MSIE")>-1; }
b=parseInt(navigator.appVersion); 

// Kalender-Fenster öffnen
function kalender()
{ x=screen.availWidth-250;
  window.open('kalender.htm','Kalender','width=210,height=210,left='+x+',top=10,resizable=yes')
}

// Opera-Ersatz für #top
function gotop()
{ if (op) scrollTo(0,0)
}

// Target für ext. Links setzen
function settarget()
{ var i,lk,own;
  own=domain(location.href);
  for (i=0; i<document.links.length; i++)
  { lk=document.links[i];
    if (domain(lk.href)!=own) lk.target="_blank"
} }

// Domain aus URL
function domain(url)
{ var u=url;
  i=u.indexOf('://'); if (i>-1) u=u.substr(i+3);
  i=u.indexOf('/'); if (i>-1) u=u.substr(0,i);
  return u
}

// Vergrößertes Bild ein- oder ausblenden
var shown='';
function switchbox(b)
{ var e, i, x=document.getElementById('ovl'), y=document.getElementById('img');
  if(x)
  { if (b!='' && b!=shown)
    { y.innerHTML='<img src="'+b+'" alt="Aktuell">'; e="visible"; shown=b
      i=document.documentElement.clientHeight;
      if (i<590) i=2; else i=parseInt(i/2-290); x.style.bottom=i+"px";
      i=document.documentElement.clientWidth;
      if (i<780) i=2; else i=parseInt(i/2-380); x.style.right=i+"px";
    } else { e="hidden"; shown='' }
    x.style.visibility=e; return false
  } else return true
}