/* Copyright Scientec Internet Applications + Media GmbH - www.scientec.de */

check();
window.onload=function()
{
  if(document.getElementById)init();
}

window.onerror=catchError;
function catchError(Nachricht,Datei,Zeile)
{
//  top.document.location.href="/";
  return true;
}

function check() { if (top==self) {top.location.href="/"} } 

function objExits(s){
  var pfad=s.split(".");
  co=pfad[0];
  if (!eval(co))return false;
  for (var i=1;i<pfad.length;i++){
    co+="."+pfad[i];
    if (!eval(co))return false;
  }
  return true
}

function init(){
  check();
  sBody=document.body;
  url=self.document.URL; 
  if (objExits("top.main.document.getElementById('mainiframe').contentWindow.subnav.document")){
    navi=top.main.document.getElementById('mainiframe').contentWindow.subnav.document;      
    if (!document.all){ navi.body.innerHTML=navi.body.innerHTML.replace(/\n|\f|\r|\t|\v/g,"").replace(/> {2,}</g,"><");}
    for (var i=0; i<navi.getElementsByTagName("a").length; i++){
      var A=navi.getElementsByTagName("a")[i];
      if (A.href==url){
        A.className="selected";
      }
      else{
        A.className="";
      }
    }
  }
  else{nochmal=setTimeout("init()",50)}
}
