// Dieses Skript ist urheberrechtlich geschützt
//
// 2003 (c) by Peter Hildebrand
//             ph@ad2309.de

var animseqcur;               
var animseqpos;               
var animseqreq;               
var animcur;                  
var animtimers;               
var animNO = 0;               
var animEXPAND = 1;           
var animLIGHT= 2;             
var animDIM = 3;              
var animREDUCE = 4;           
var procWRITE = 5;            
var procCLEAN = 6;            
var procTITLE = 7;            
var delay = new Array(200, 50, 20, 20, 50, 5, 5); 
var servers = new Array("", "animExpandServer()", "animLightServer()",
               "animDimServer()", "animReduceServer()", "procWrite()", "procClean()",
               "procTitle()" );
var animseqdefs = new Array ("0", "1;5;2", "3;6;4", "3;6;5;2", "6;4", "3;6;4;7", "6;4;7", "6;1;5;2");
var animseqEXWRLI = 1;        
var animseqDICLRE = 2;        
var animseqDICLWRLI = 3;      
var animseqCLRE = 4;          
var animseqDICLRERS = 5;      
var animseqCLRERS = 6;        
var animseqCLEXWRLI = 7;      

var pending;                  
var finished;                 
var deltay;                   
var currenttitle;             
var currentmenu;              
var position;                 
var glow;                     

var bars = 5;
var panelheight = 250;
var positionup = -panelheight;
var positiondown = 0;
var menuentrys = 10;
var textY = 15;               
var colorarray = new Array("#1a1d30", "#555769", "#9091a2", "#ccccdd");
var origmenus;
var hardlink;                 
var themenu;

function menu(entries, urls) {
  this.entry = entries.split("#");
  this.url = urls.split("#");
  this.son = new Array(10);
}

function animationControl() {

  for (i=0;i<bars;i++) {
    if (animseqreq[i]!=animNO) {                
      if (animseqreq[i]==animseqcur[i]) {
        animseqreq[i] = animNO;
      } else if (animseqcur[i]==animNO || finished[i]) {
        animseq = animseqdefs[animseqreq[i]].split(";");
        req = animseq[0];
        animseqcur[i]=animseqreq[i];
        animseqreq[i]=animNO;
        animseqpos[i]=0;
        animcur[i]=req;
        finished[i]=0;
        pending[i]=0;
        if (req!=animNO && animtimers[req]==null) {
          animtimers[req] = window.setTimeout(servers[req],delay[req]);
        }
      } else {                        
        pending[i] = 1;
      }
    } else {                          
      if (finished[i]) {
        animseq = animseqdefs[animseqcur[i]].split(";");
        finished[i] = 0;
        if (animseqpos[i]>=animseq.length-1) {
          animseqcur[i] = animNO;
          animcur[i] = animNO;
        } else {
          animseqpos[i]++;
          req = animseq[animseqpos[i]];
          animcur[i]=req;
          if (req!=animNO && animtimers[req]==null) {
            animtimers[req] = window.setTimeout(servers[req],delay[req]);
          }
        }
      }
    }
  }
}

function animExpandServer() {
  active = 0; recall = 0;
  for (i=0;i<bars;i++) {
    if (animcur[i]==animEXPAND && pending[i]) {
      finished[i] = 1; recall = 1;
    } else if (animcur[i]==animEXPAND && !finished[i]) {
      dropitem = document.getElementById("panel"+(i+1));
      position[i] += deltay[i];
      if (position[i]>=positiondown) {
        position[i] = positiondown;
        finished[i] = 1; recall = 1;
      } else {
        active = 1;
      }
      dropitem.style.top = position[i];
    }
  }
  if (active) {
    animtimers[animEXPAND] = window.setTimeout(servers[animEXPAND],delay[animEXPAND]);
  } else {
    animtimers[animEXPAND] = null;
  }
  if (recall) animationControl();
}

function animReduceServer() {
  active = 0; recall = 0;
  for (i=0;i<bars;i++) {
    if (animcur[i]==animREDUCE && pending[i]) {
      finished[i] = 1; recall = 1;
    } else if (animcur[i]==animREDUCE && !finished[i]) {
      dropitem = document.getElementById("panel"+(i+1));
      position[i] -= deltay[i];
      if (position[i]<=positionup) {
        position[i] = positionup;
        finished[i] = 1; recall = 1;
      } else {
        active = 1;
      }
      dropitem.style.top = position[i];
    }
  }
  if (active) {
    animtimers[animREDUCE] = window.setTimeout(servers[animREDUCE],delay[animREDUCE]);
  } else {
    animtimers[animREDUCE] = null;
  }
  if (recall) animationControl();
}

function animLightServer() {
  active = 0; recall = 0;
  for (i=0;i<bars;i++) {
    if (animcur[i]==animLIGHT && pending[i]) {
      finished[i] = 1; recall = 1;
    } else if (animcur[i]==animLIGHT && !finished[i]) {
      glow[i]++;
      for (j=0;j<menuentrys;j++) {
        textitem = document.getElementById("link"+(i+1)+""+j);
        textitem.style.color = colorarray[glow[i]];
      }
      if (glow[i]==colorarray.length-1) {
        finished[i] = 1; recall = 1;
      } else {
        active = 1;
      }
    }
  }
  if (active) {
    animtimers[animLIGHT] = window.setTimeout(servers[animLIGHT],delay[animLIGHT]);
  } else {
    animtimers[animLIGHT] = null;
  }
  if (recall) animationControl();
}

function animDimServer() {
  active = 0; recall = 0;
  for (i=0;i<bars;i++) {
    if (animcur[i]==animDIM && pending[i]) {
      finished[i] = 1; recall = 1;
    } else if (animcur[i]==animDIM && !finished[i]) {
      glow[i]--;
      for (j=0;j<menuentrys;j++) {
        textitem = document.getElementById("link"+(i+1)+""+j);
        textitem.style.color = colorarray[glow[i]];
      }
      if (glow[i]==0) {
        finished[i] = 1; recall = 1;
      } else {
        active = 1;
      }
    }
  }
  if (active) {
    animtimers[animDIM] = window.setTimeout(servers[animDIM],delay[animDIM]);
  } else {
    animtimers[animDIM] = null;
  }
  if (recall) animationControl();
}


function procWrite() {   
  for (i=0;i<bars;i++) {
    if (animcur[i]==procWRITE && pending[i]) {
      finished[i] = 1;
    } else if (animcur[i]==procWRITE && !finished[i]) {
      glow[i]=0;
      if (!((window.opera)&&(navigator.appVersion.substring(0,1)<7))){
        if (i>0) {
          for (j=0;j<menuentrys;j++) {
            textitem = document.getElementById("link"+(i+1)+""+j);
            textitem.appendChild(document.createTextNode(currentmenu[i].entry[j]));
            textitem.setAttribute("href", hardlink + currentmenu[i].url[j]);
            textitem.style.color = colorarray[glow[i]];
          }
          if (currenttitle[i] != null) {
            textitem = document.getElementById("headlinetext"+(i+1));
            textitem.appendChild(document.createTextNode(currenttitle[i]));
          }
        } else {
          for (j=0;j<menuentrys;j++) {
            textitem = document.getElementById("link"+(i+1)+""+j);
            textitem.style.color = colorarray[glow[i]];
          }
        }
      }
      textitem = document.getElementById("textpanel"+(i+1));
      textitem.style.top = textY;
      finished[i] = 1;
    }
  }
  animtimers[procWRITE] = null;
  animationControl();
}

function procClean() {   
  for (i=0;i<bars;i++) {
    if (animcur[i]==procCLEAN && pending[i]) {
      finished[i] = 1;
    } else if (animcur[i]==procCLEAN && !finished[i]) {
      textitem = document.getElementById("textpanel"+(i+1));
      textitem.style.top = - panelheight;
      textitem = document.getElementById("headlinetext"+(i+1));
      while (i!=0 && textitem.hasChildNodes()) {
        textitem.removeChild(textitem.firstChild);
      }
      for (j=0;j<10;j++) {
        textitem = document.getElementById("link"+(i+1)+""+j);
        while (i!=0 && textitem.hasChildNodes()) {
          textitem.removeChild(textitem.firstChild);
        }
      }
      finished[i] = 1;
    }
  }
  animtimers[procCLEAN] = null;
  animationControl();
}

function procTitle() {   
  for (i=0;i<bars;i++) {
    if (animcur[i]==procTITLE && pending[i]) {
      finished[i] = 1;
    } else if (animcur[i]==procTITLE && !finished[i]) {
      if ((i>0)&& !((window.opera)&&(navigator.appVersion.substring(0,1)<7))){
        textitem = document.getElementById("headlinetext"+(i+1));
        textitem.appendChild(document.createTextNode(urmenue[i]));
      }
      finished[i] = 1;
    }
  }
  animtimers[procTITLE] = null;
  animationControl();
}

function Init() {
  animseqcur = new Array(bars);
  animseqpos = new Array(bars);
  animseqreq = new Array(bars);
  animcur = new Array(bars);
  pending = new Array(bars);
  finished = new Array(bars);
  deltay = new Array(bars);
  currentmenu = new Array(bars);
  currenttitle = new Array(bars);
  position = new Array(bars);
  glow = new Array(bars);
  for (i=0;i<bars;i++) {
    animseqcur[i] = animNO;
    animseqpos[i] = 0;
    animseqreq[i] = animNO;
    animcur[i] = animNO;
    pending[i] = 0;
    finished[i] = 0;
    deltay[i] = 0;
    currentmenu[i] = null;
    currenttitle[i] = null;
    position[i] = - panelheight;
    glow[i] = 0;
  }
  animtimers = new Array(servers.length);
  for (i=0;i<servers.length;i++) {
    animtimers[i] = null;
  }
  origmenus = new Array(bars-1);
  if ((window.opera)&&(navigator.appVersion.substring(0,1)<7)) {
    document.getElementById("operawarning").style.top = "1px"; return
  } else {
    for (i=2;i<bars+1;i++) {
      textitem = document.getElementById("headlinetext"+i);
      while (textitem.hasChildNodes()) {
        textitem.removeChild(textitem.firstChild);
      }
      if (urmenue[i-1]!=null) {
        textitem.appendChild(document.createTextNode(urmenue[i-1]));
      }
    }
  }
  hardlink = document.URL;
  if (hardlink.indexOf("cgi-bin")>-1) {
   hardlink = hardlink.substring(0, hardlink.indexOf("cgi-bin"));
  } else {
   hardlink = "";
  }
  // Definition der Menühierarchie
  themenu= new menu("Übersicht#Das Universum#Geschichten#Rollenspielmaterial#Galerien##Download Universum###Impressum","toc001.html#toc002.html#toc015.html#toc014.html#toc004.html##down.html###impressum.html");
  m100001= new menu("Startseite#Was ist AD 2309?#Allgemeine FAQ#Technische FAQ#Bedienungshinweise#aktuelles Update#frühere Updates###","index.html#ueber01.html#ueber02.html#ueber03.html#ueber04.html#ueber05.html#ueber06.html###");
  themenu.son[0] = m100001;
  m110001= new menu("Terranische Union#Exobiologie#Atlas der UTC#Technologie#Ausrüstung#Schiffstechnik#Parapsychologie###","toc007.html#toc008.html#toc009.html#toc010.html#toc011.html#toc012.html#toc013.html###");
  themenu.son[1] = m110001;
  m120001= new menu("Das Piratennest#########","piratennest01.html#########");
  themenu.son[2] = m120001;
  m130001= new menu("Katzenjammer#Kurierschiff \"Corax\"#Spielleiter-Leitfaden#######","toc043.html#toc044.html#leitfaden01.html#######");
  themenu.son[3] = m130001;
  m140001= new menu("ToPeG#Thomas Kramme#Peter Hildebrand#######","toc018.html#toc019.html#toc020.html#######");
  themenu.son[4] = m140001;
  m110002= new menu("Zeittafel 2002-2295#Zeittafel 2296-2308#Ausdehnung#Politisches System#Soziale Struktur#Wichtige Konzerne####","toc021.html#toc022.html#toc023.html#toc024.html#toc025.html#toc026.html####");
  m110001.son[0] = m110002;
  m111002= new menu("Einleitung#Arnesh#Energa#Lengroah#Spezies X#Srakhs#Tsrit#Solostellare Rassen##","exobio01.html#toc027.html#toc028.html#toc029.html#exobio44.html#toc030.html#toc031.html#toc032.html##");
  m110001.son[1] = m111002;
  m112002= new menu("Terranischer Gürtel#Kernbereich########","toc033.html#atlasKern.html########");
  m110001.son[2] = m112002;
  m113002= new menu("Einleitung#Antriebstechnologie#Informationstechnol.#Nanotechnologie#Rohstoffe#####","technol01.html#toc034.html#toc035.html#toc036.html#toc037.html#####");
  m110001.son[3] = m113002;
  m114002= new menu("Allg. Ausrüstung#Bioware#Cyberware#Dopingkartuschen#Handwaffen#Panzerung#Medizin. Feldbedarf###","toc038.html#ausrue06.html#ausrue07.html#ausrue08.html#toc039.html#ausrue28.html#toc040.html###");
  m110001.son[4] = m114002;
  m115002= new menu("Einleitung#Schiffsrümpfe#Energiesysteme#Antriebsarten#Computerhardware#Programme#Technisches Gerät#Räumlichkeiten#Verteidigungssysteme#Waffensysteme","technik01.html#technik02.html#technik03.html#technik04.html#technik05.html#technik06.html#technik07.html#technik08.html#technik09.html#technik10.html");
  m110001.son[5] = m115002;
  m116002= new menu("Einleitung#Paranormal Begabte#Psi-Kräfte#######","psi01.html#toc041.html#toc042.html#######");
  m110001.son[6] = m116002;
  m130002= new menu("Übersicht#Szenen#NSCs#Anhänge######","abent01.html#abent02.html#abent03.html#abent04.html######");
  m130001.son[0] = m130002;
  m131002= new menu("Einleitung#Deckbeschreibungen#Standardprozeduren#Sicherheitshinweise#Deckpläne#####","toc090.html#toc091.html#toc092.html#toc093.html#toc094.html#####");
  m130001.son[1] = m131002;
  m140002= new menu("Lengroah-Bilder#Verschiedene Bilder########","toc048.html#toc049.html########");
  m140001.son[0] = m140002;
  m141002= new menu("Tsrit (links)#Tsrit (rechts)#Tsrit (vorne)#######","galerie_tk01.html#galerie_tk02.html#galerie_tk03.html#######");
  m140001.son[1] = m141002;
  m142002= new menu("Jordansrock#Jordnsr. animiert#Flagge der UTC#Oculus III#Lengroahbilder#Srakhsbilder####","galerie_ph01.html#galerie_ph02.html#galerie_ph03.html#galerie_ph04.html#galerie_ph05.html#galerie_ph06.html####");
  m140001.son[2] = m142002;
  m110003= new menu("Zeittafel 2001-2050#Zeittafel 2051-2100#Zeittafel 2101-2150#Zeittafel 2151-2200#Zeittafel 2201-2250#Zeittafel 2251-2300####","union01.html#union02.html#union03.html#union04.html#union05.html#union06.html####");
  m110002.son[0] = m110003;
  m110103= new menu("Die Jahre 2296-2300#Die Jahre 2301-2308########","toc050.html#toc051.html########");
  m110002.son[1] = m110103;
  m110203= new menu("Einleitung#Sol#Terranischer Gürtel#Kernbereich#Kolonialbereich#Randbereich####","union20.html#union21.html#union22.html#union23.html#union24.html#union25.html####");
  m110002.son[2] = m110203;
  m110303= new menu("Einleitung#Kolonieorgane#Polit. Gruppierungen#Unionsrat/-regierung#Militärrat#Unionsgerichte#Polizei/Militär#Innere Sicherheit#Nachrichtendienst#Besondere Gesetze","union26.html#union27.html#union28.html#union29.html#union30.html#union31.html#union32.html#union33.html#union34.html#union35.html");
  m110002.son[3] = m110303;
  m110403= new menu("Steuer-/Sozialwesen#Leben#Spezielle Volksgruppen#######","union36.html#toc052.html#toc053.html#######");
  m110002.son[4] = m110403;
  m110503= new menu("Im Militärrat (2x)#Im Militärrat (1x)#Sonstige A-L#Sonstige M-Z######","toc054.html#toc055.html#toc056.html#toc057.html######");
  m110002.son[5] = m110503;
  m111103= new menu("Einleitung#Xenobiologie#Kultur#Stellagraphie######","exobio02.html#toc058.html#toc059.html#toc060.html######");
  m111002.son[1] = m111103;
  m111203= new menu("Einleitung#Xenobiologie#Kultur#Stellagraphie######","exobio16.html#toc061.html#toc062.html#toc063.html######");
  m111002.son[2] = m111203;
  m111303= new menu("Einleitung#Xenobiologie#Kultur#Stellagraphie######","exobio30.html#toc064.html#toc065.html#toc066.html######");
  m111002.son[3] = m111303;
  m111503= new menu("Einleitung#Xenobiologie#Kultur#Stellagraphie######","exobio45.html#toc067.html#toc068.html#toc069.html######");
  m111002.son[5] = m111503;
  m111603= new menu("Einleitung#Xenobiologie#Kultur#Stellagraphie######","exobio59.html#toc070.html#toc071.html#toc072.html######");
  m111002.son[6] = m111603;
  m111703= new menu("Botranen#Ratorianer#R'garil#Sirrit#Tayunew#Zrota####","exobio73.html#exobio74.html#exobio75.html#exobio76.html#exobio77.html#exobio78.html####");
  m111002.son[7] = m111703;
  m112003= new menu("Einleitung#Sol#Kolonien >100 Mio#Kolonien <100 Mio#unbewohnte Systeme#####","atlasTG.html#0sol.html#toc073.html#toc074.html#toc075.html#####");
  m112002.son[0] = m112003;
  m113103= new menu("Einleitung#Stromraum#Weltraum#######","technol02.html#toc076.html#toc077.html#######");
  m113002.son[1] = m113103;
  m113203= new menu("Einleitung#Hardware 1/Einleitung#Hardware 2/Prozess.#Hardware 3/Speicher#Software#Kommunikation#Datenerfassung###","technol12.html#technol13.html#toc078.html#toc079.html#toc080.html#toc081.html#toc082.html###");
  m113002.son[2] = m113203;
  m113303= new menu("Einleitung#Bauelemente#Anwendungsgebiete#Einschränkungen######","technol42.html#toc083.html#toc084.html#toc085.html######");
  m113002.son[3] = m113303;
  m113403= new menu("Besondere Rohstoffe#########","toc086.html#########");
  m113002.son[4] = m113403;
  m114003= new menu("Einleitung#Sinnesverb.#Kommun./Organis.#Computerzubehör######","ausrue01.html#ausrue02.html#ausrue03.html#ausrue04.html######");
  m114002.son[0] = m114003;
  m114403= new menu("Besitz/Führen##Projektilwaffen#Energiewaffen#Materiethermalwaffen#Zusatzausrüstung####","ausrue09.html##toc087.html#toc088.html#toc089.html#ausrue05.html####");
  m114002.son[4] = m114403;
  m114603= new menu("Einleitung#Verbrauchsmaterial#Technisches Gerät#######","ausrue29.html#ausrue30.html#ausrue31.html#######");
  m114002.son[6] = m114603;
  m116103= new menu("Einleitung#Menschen#Fremdrassen#######","psi02.html#psi03.html#psi04.html#######");
  m116002.son[1] = m116103;
  m116203= new menu("Erforschbarkeit#Psi-Wahrnehmung#Psi-Psychomanip.#Psi-Physische Manip.######","psi05.html#psi06.html#psi07.html#psi08.html######");
  m116002.son[2] = m116203;
  m131003= new menu("Glückwunsch!#Eigenschaften#Aufbau des Schiffes#Techn. Komponenten######","corax01.html#corax02.html#corax03.html#corax04.html######");
  m131002.son[0] = m131003;
  m131103= new menu("Einleitung#Unterdeck#Hauptdeck#Oberdeck######","corax05.html#corax06.html#corax07.html#corax08.html######");
  m131002.son[1] = m131103;
  m131203= new menu("Einleitung#Atmosphärenreinig.#Start und Landung#Be- / Entladen#Reststoffentsorgung#Gammaemitterwartg.####","corax09.html#corax10.html#corax11.html#corax12.html#corax13.html#corax14.html####");
  m131002.son[2] = m131203;
  m131303= new menu("Einleitung#Autom. Maßnahmen#Sicherheitsvorschr.#Notfallmaßnahmen#Gesetzliche Hinweise#####","corax15.html#corax16.html#corax17.html#corax18.html#corax19.html#####");
  m131002.son[3] = m131303;
  m131403= new menu("Unterdeck#Hauptdeck#Oberdeck#######","corax20.html#corax21.html#corax22.html#######");
  m131002.son[4] = m131403;
  m140003= new menu("\"Erstkontakt\"#Anatomie, Realismus#Nur zum Spaß#Auftragszeichnungen#Eigene Inspiration#Die besten Bilder####","toc095.html#toc096.html#toc097.html#toc098.html#toc099.html#toc100.html####");
  m140002.son[0] = m140003;
  m140103= new menu("Transporter#Tsrit########","galerie_topeg030.html#galerie_topeg031.html########");
  m140002.son[1] = m140103;
  m110104= new menu("Schlag der Tsrit: '96#Kolonialkonflikt: '97#Katzenjahr: '98#Frage der Ethik? '99#Technologien: '00#####","union07.html#union08.html#union09.html#union10.html#union11.html#####");
  m110103.son[0] = m110104;
  m110114= new menu("Cui potentia est? '01#Kreuzzug: '02#Nachkriegswirren: '03#Ein Jahr Frieden? '04#Gegen die Zeit: '05#Der Sündenfall: '06#Staatsstreich: '07#Offene Fragen: '08##","union12.html#union13.html#union14.html#union15.html#union16.html#union17.html#union18.html#union19.html##");
  m110103.son[1] = m110114;
  m110414= new menu("Freizeit#Arbeit#Verkehr#Kommunikation#Finanzen#####","union37.html#union38.html#union39.html#union40.html#union41.html#####");
  m110403.son[1] = m110414;
  m110424= new menu("Einleitung#Replikanten#Lengroah#Arnesh#Andere Fremdrassen#####","union42.html#union43.html#union44.html#union45.html#union46.html#####");
  m110403.son[2] = m110424;
  m110504= new menu("Tay Chen#Tsushida#Lunastar#######","union47.html#union48.html#union49.html#######");
  m110503.son[0] = m110504;
  m110514= new menu("AMProd#Ferroplast#Amdrine#Dream Technologies#Titanis#Fire Project#Fusiondrives#United Arms Tech.#Kubarak#Tuuron Mining","union50.html#union51.html#union52.html#union53.html#union54.html#union55.html#union56.html#union57.html#union58.html#union59.html");
  m110503.son[1] = m110514;
  m110524= new menu("CNK/GNK#Gouneau#Graysoft#Imagine#Karring Propulsions#Kin Dan#LASing Industries###","union60.html#union61.html#union62.html#union63.html#union64.html#union65.html#union66.html###");
  m110503.son[2] = m110524;
  m110534= new menu("Nayami#Neronos#Pectors#Schnarder#Stuntech#Telesoft#Typec#UFC#Vernét#","union67.html#union68.html#union69.html#union70.html#union71.html#union72.html#union73.html#union74.html#union75.html#");
  m110503.son[3] = m110534;
  m111114= new menu("Aussehen#Physiologie#Mentalität#######","exobio03.html#exobio04.html#exobio05.html#######");
  m111103.son[1] = m111114;
  m111124= new menu("Sprache#Geschichte#Soziale Struktur#Staatsform#Kultur#Technologie####","exobio06.html#exobio07.html#exobio08.html#exobio09.html#exobio10.html#exobio11.html####");
  m111103.son[2] = m111124;
  m111134= new menu("Heimatwelt#Ausbreitung#Erstkontakt#Diplomatie######","exobio12.html#exobio13.html#exobio14.html#exobio15.html######");
  m111103.son[3] = m111134;
  m111214= new menu("Aussehen#Physiologie#Mentalität#######","exobio17.html#exobio18.html#exobio19.html#######");
  m111203.son[1] = m111214;
  m111224= new menu("Sprache#Geschichte#Soziale Struktur#Staatsform#Kultur#Technologie####","exobio20.html#exobio21.html#exobio22.html#exobio23.html#exobio24.html#exobio25.html####");
  m111203.son[2] = m111224;
  m111234= new menu("Heimatwelt#Ausbreitung#Erstkontakt#Diplomatie######","exobio26.html#exobio27.html#exobio28.html#exobio29.html######");
  m111203.son[3] = m111234;
  m111314= new menu("Aussehen#Physiologie#Mentalität#######","exobio31.html#exobio32.html#exobio33.html#######");
  m111303.son[1] = m111314;
  m111324= new menu("Sprache#Geschichte#Soziale Struktur#Staatsform#Kultur#Technologie####","exobio34.html#exobio35.html#exobio36.html#exobio37.html#exobio38.html#exobio39.html####");
  m111303.son[2] = m111324;
  m111334= new menu("Heimatwelt#Ausbreitung#Erstkontakt#Diplomatie######","exobio40.html#exobio41.html#exobio42.html#exobio43.html######");
  m111303.son[3] = m111334;
  m111514= new menu("Aussehen#Physiologie#Mentalität#######","exobio46.html#exobio47.html#exobio48.html#######");
  m111503.son[1] = m111514;
  m111524= new menu("Sprache#Geschichte#Soziale Struktur#Staatsform#Kultur#Technologie####","exobio49.html#exobio50.html#exobio51.html#exobio52.html#exobio53.html#exobio54.html####");
  m111503.son[2] = m111524;
  m111534= new menu("Heimatwelt#Ausbreitung#Erstkontakt#Diplomatie######","exobio55.html#exobio56.html#exobio57.html#exobio58.html######");
  m111503.son[3] = m111534;
  m111614= new menu("Aussehen#Physiologie#Mentalität#######","exobio60.html#exobio61.html#exobio62.html#######");
  m111603.son[1] = m111614;
  m111624= new menu("Sprache#Geschichte#Soziale Struktur#Staatsform#Kultur#Technologie####","exobio63.html#exobio64.html#exobio65.html#exobio66.html#exobio67.html#exobio68.html####");
  m111603.son[2] = m111624;
  m111634= new menu("Heimatwelt#Ausbreitung#Erstkontakt#Diplomatie######","exobio69.html#exobio70.html#exobio71.html#exobio72.html######");
  m111603.son[3] = m111634;
  m112024= new menu("Alpha Centauri#Barnards Stern#Epsilon Eridani#Epsilon Indi#Ross 128#Ross 154#Sirius#Tau Ceti##","71683.html#87937.html#16537.html#108870.html#57548.html#92403.html#32349.html#8102.html##");
  m112003.son[2] = m112024;
  m112034= new menu("61 Cygni#Proxima Centauri#Groombridge 34#L 725-32#Lacaille 9352#Lalande 21185#Luytens Stern#Procyon#Sigma 2398#","104214.html#70890.html#1475.html#5643.html#114046.html#54035.html#36208.html#37279.html#91768.html#");
  m112003.son[3] = m112034;
  m112044= new menu("L 789-6#UV Ceti#Wolf 359#######","0l789-6.html#0uvceti.html#0wolf359.html#######");
  m112003.son[4] = m112044;
  m113114= new menu("Einleitung#Stromraumanatomie#Portalgeneratoren#Passive Antriebe#Aktive Antriebe##Andere Antriebsarten###","technol03.html#technol04.html#technol05.html#technol06.html#technol07.html##technol08.html###");
  m113103.son[1] = m113114;
  m113124= new menu("Einleitung#Fusionsantriebe#Gravitonantriebe#######","technol09.html#technol10.html#technol11.html#######");
  m113103.son[2] = m113124;
  m113224= new menu("elektrische PN#elektroquantische PN#probabilistische PS#diskret-optische PN#unscharf-optische PN#neuronal-nichtlin. PN#Naniten-PS###","technol14.html#technol15.html#technol16.html#technol17.html#technol18.html#technol19.html#technol20.html###");
  m113203.son[2] = m113224;
  m113234= new menu("EM-Speicher#Holografischer Sp.#Polymerspeicher#Quantenzellen#RNA-Speicher#####","technol21.html#technol22.html#technol23.html#technol24.html#technol25.html#####");
  m113203.son[3] = m113234;
  m113244= new menu("Einleitung#Agentensysteme#Arbeitsprogramme#Entscheidungssyst.#Schnittstellenprog.#Wissensbasen####","technol26.html#technol27.html#technol28.html#technol29.html#technol30.html#technol31.html####");
  m113203.son[4] = m113244;
  m113254= new menu("Einleitung#Radiowellenkomm.#Laserkommunikation#Quantenkomm.#Tachyonenkomm.#Kurierschiffe####","technol32.html#technol33.html#technol34.html#technol35.html#technol36.html#technol37.html####");
  m113203.son[5] = m113254;
  m113264= new menu("Einleitung#Eingabemedien#Passive Sensoren#Aktive Sensoren######","technol38.html#technol39.html#technol40.html#technol41.html######");
  m113203.son[6] = m113264;
  m113314= new menu("Einleitung#Antriebssysteme#Energieversorgung#Datenerfassung#Kommunikation#Informationsverarb.#Manipulation###","technol43.html#technol44.html#technol45.html#technol46.html#technol47.html#technol48.html#technol49.html###");
  m113303.son[1] = m113314;
  m113324= new menu("Medizin#Lifestyle#Produktion#Waffentechnik#Sonstige#####","technol50.html#technol51.html#technol52.html#technol53.html#technol54.html#####");
  m113303.son[2] = m113324;
  m113334= new menu("Einleitung#Selbstreproduktion#Funktionsdauer#Empfindlichkeit#Größe#Legalität####","technol55.html#technol56.html#technol57.html#technol58.html#technol59.html#technol60.html####");
  m113303.son[3] = m113334;
  m113404= new menu("Einleitung#Grastatium#Antimaterie#######","technol61.html#technol62.html#technol63.html#######");
  m113403.son[0] = m113404;
  m114424= new menu("Überblick#Projektilpistolen#Maschinenpistolen#Projektilgewehre#Maschinengewehre#Schrotgewehre#Granatgewehre#Panzerfäuste##","ausrue10.html#ausrue11.html#ausrue12.html#ausrue13.html#ausrue14.html#ausrue15.html#ausrue16.html#ausrue17.html##");
  m114403.son[2] = m114424;
  m114434= new menu("Überblick#Laserpistolen#EM-Betäubg.-pistolen#Lasergewehre#EM-Betäubg.-gewehre#Gravitongewehre####","ausrue18.html#ausrue19.html#ausrue20.html#ausrue21.html#ausrue22.html#ausrue23.html####");
  m114403.son[3] = m114434;
  m114444= new menu("Überblick#Flammenwerfer#Plasmapistolen#Plasmagewehre######","ausrue24.html#ausrue25.html#ausrue26.html#ausrue27.html######");
  m114403.son[4] = m114444;
  m140004= new menu("Lengroah m/w#Haarpracht#Weitere Änderungen#Neuer Versuch######","galerie_topeg001.html#galerie_topeg002.html#galerie_topeg003.html#galerie_topeg004.html######");
  m140003.son[0] = m140004;
  m140014= new menu("Einleitung#Kralle und Hand#Schädelansicht#Skelett#Kopf (seitlich)#Kopf (vorne)#Tatze###","galerie_topeg005.html#galerie_topeg006.html#galerie_topeg007.html#galerie_topeg008.html#galerie_topeg009.html#galerie_topeg010.html#galerie_topeg011.html###");
  m140003.son[1] = m140014;
  m140024= new menu("Handschlag#Ur-Lengroah#Lengroah-Punk I#Lengroah-Punk II#Lengroah auf Eis#####","galerie_topeg012.html#galerie_topeg013.html#galerie_topeg014.html#galerie_topeg015.html#galerie_topeg016.html#####");
  m140003.son[2] = m140024;
  m140034= new menu("Heckert u. Rrhegar#\"Privates\" Treffen#Windgeflüster I#Windgeflüster II#Größenvergleich#####","galerie_topeg017.html#galerie_topeg018.html#galerie_topeg019.html#galerie_topeg020.html#galerie_topeg021.html#####");
  m140003.son[3] = m140034;
  m140044= new menu("Kampf#Liebespaar#Krallenschwert#######","galerie_topeg022.html#galerie_topeg023.html#galerie_topeg024.html#######");
  m140003.son[4] = m140044;
  m140054= new menu("Eleganz#Im Hangar#Portrait#Über der Stadt#Neugier#####","galerie_topeg025.html#galerie_topeg026.html#galerie_topeg027.html#galerie_topeg028.html#galerie_topeg029.html#####");
  m140003.son[5] = m140054;

  amenu = themenu;
  for (i=1;i<5;i++) {
    for (j=0;j<10;j++) {
      if (urmenue[i]=="") {
        break;
        origmenus[i] = null;
      } else if (amenu.entry[j]==urmenue[i]) {
        origmenus[i] = amenu.son[j];
        amenu = amenu.son[j];
        break;
      }
    }
  }
  currentmenu[0] = themenu;
  if (urmenue[0]) window.setTimeout("openmenu(0)",2000);
}

function openmenu(level) {
  deltay[level] = 50;
  animseqreq[level] = animseqEXWRLI;
  dropitem = document.getElementById("closer");
  dropitem.style.top = 300;
  if (level==0) {
    currentmenu[level] = themenu;
    for (i=1;i<bars;i++) {
      closemenu(i, 0);
    }
  }
  animationControl();
}

function closemenu(level, animFlag) {
  if (position[level]!=positionup || animseqcur!=animNO) {
    deltay[level] = 80;
    if (glow[level]>0) {
      animseqreq[level] = animseqDICLRE;
    } else {
      animseqreq[level] = animseqCLRE;
    }
    if (animFlag) animationControl();
  }
}

function closemenus() {
  for (i=0;i<bars;i++) {
    if (position[i]!=positionup || animseqcur!=animNO) {
      deltay[i] = 80;
      if (glow[i]>0) {
        animseqreq[i] = animseqDICLRERS;
      } else {
        animseqreq[i] = animseqCLRERS;
      }
    }
  }
  dropitem = document.getElementById("closer");
  dropitem.style.top = -400;
  animationControl();
}

function select(level) {
  if (!((window.opera)&&(navigator.appVersion.substring(0,1)<7))) {
    main = Math.floor(level/10);
    sub = level % 10;
    currentmenu[main] = currentmenu[main-1].son[sub];
    currenttitle[main] = currentmenu[main-1].entry[sub];
    for (i=main+1;i<bars;i++) {
      closemenu(i,0);
    }
    if (currentmenu[main] != null) {
      if (position[main]==positiondown) {
        deltay[main] = 50;
        animseqreq[main] = animseqDICLWRLI;
      } else {
        deltay[main] = 50;
        animseqreq[main] = animseqEXWRLI;
      }
    } else {
      closemenu(main,0);
    }
    animationControl();
  }
}

function restoremenu() {
  if (position[0]==positionup) {
    currentmenu[0] = themenu;
    animseqreq[0] = animseqCLEXWRLI;
    deltay[0] = 50;
    for (i=1; i<bars; i++) {
      currentmenu[i] = origmenus[i];
      currenttitle[i] = urmenue[i];
      deltay[i] = 50;
      if (origmenus[i]!=null) {
        animseqreq[i] = animseqCLEXWRLI;
      } else {
        closemenu(i,0);
      }
    }
  dropitem = document.getElementById("closer");
  dropitem.style.top = 300;
  animationControl();
  }
}

function debug() {
alert("timers: "+animtimers+"\ncurrent animation: "+animcur+"\ncurrent sequence: "+animseqcur+"\nrequested sequence: "+animseqreq+"\nfinished: "+finished+"\npending: "+pending);
}
