// Luetzschena-Stahmeln Homepage, (w) 1999,2000 Michael Bunk, CCLS e.V.
// http://beam.to/cclsev

// zeigt den menubalken-frame links an, wenn er fehlt

// location.replace(): ab netscape3/ie4
// location.href: ab nescape2/ie3

  prefix="";

function menuframe(sub) {
  if(document.location.protocol!="file:") {

  //sub: anzahl der verzeichnisebenen, die indexf.html höher liegt
//  alert("bin hier!");
  while(sub>0) {prefix+="../";sub--;}

//  alert(prefix+"indexf.htm?hauptbeamto('"+self.location.pathname+"');");

  if ( !parent.frames[0] || 
       (parent.frames[0].location.pathname.substr(
        parent.frames[0].location.pathname.length-10,10) != "balken.htm")) {
    
    // richtige versionen: netscape >= 4, ie >= 5
    // alert("appName: "+navigator.appName+"\nappVersion: "+navigator.appVersion);
    if( ((navigator.appName == "Netscape")		       && (navigator.appVersion.substring(0,1) >= "3")) ||
         ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.substring(0,1) >= "4")) )
      {
        top.location.replace(prefix+"indexf.htm?hauptbeamto('"+self.location.pathname+"');");
      }
    else { // für IE und den Rest
      window.location.search="1";
      if(window.location.search != "") { //search unterstützt
        window.location.search="";
        top.location.replace(prefix+"indexf.htm?hauptbeamto('"+self.location.pathname+"');");
//        top.location.href="indexf.htm?hauptbeamto('"+self.location.href+"');";
        }
      }
    }
}
// so einfach geht es leider nicht:
//  if(top.location.href != "indexf.htm") {
//    top.location.href="indexf.htm";
//    top.frames[1].location.href=self.location.href;
//    }
  }
