/******************************************************************/
/* Functions to create the menue                                  */
/******************************************************************/

function mypage ( pagename ) {
this.pagename = pagename;
this.menueactive = "Home"; 
this.topactive = "index.html"; // Menue 2nd Level
this.midactive = "index.html"; // Menue 3rd Level
this.subactive = this.pagename;
switch (this.pagename) {
  case "index.html":
    this.menueactive = "Home"; 
    this.topactive = "index.html"; 
    this.midactive = "index.html"; 
    break;
  case "sammlung_witze_klimawandel_klimawitze.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    break;
  case "klimawitze.html":
  case "gruene_witze.html":
  case "klimaschutzwitze.html":
  case "witze_erderwaermung.html":
  case "klimawandel_witze.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.subactive = "klimawitze.html";
    break;
  case "klimawandelwitze.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "klimawandelwitze.html";
    break;
  case "bauernregeln_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "bauernregeln_klimawandel.html"; 
    break;
  case "gluehbirnen_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "gluehbirnen_witze_klimawandel.html"; 
    break;
  case "blondinenwitze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "blondinenwitze_klimawandel.html"; 
    break;
  case "alle_kinder_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "alle_kinder_witze_klimawandel.html"; 
    break;
  case "ostfriesen_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "ostfriesen_witze_klimawandel.html"; 
    break;
  case "klopf_klopf_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "klopf_klopf_witze_klimawandel.html"; 
    break;
  case "opuc_klimawandel_satire.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "opuc_klimawandel_satire.html"; 
    break;
  case "gruene_fakten_chuck_norris_witze.html":
  case "chuck_norris_klimawandel.html":
  case "chuck_norris_klima.html":
  case "chuck_norris_umwelt.html":
  case "chuck_norris_witze.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "gruene_fakten_chuck_norris_witze.html"; 
    this.subactive = "gruene_fakten_chuck_norris_witze.html";
    break;
  case "fritzchen_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "fritzchen_witze_klimawandel.html"; 
    break;
  case "haeschen_witze_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "haeschen_witze_klimawandel.html"; 
    break;
  case "climate_change_jokes.html":
  case "climate_jokes.html":
  case "climatejokes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "climate_change_jokes.html";
    this.subactive = "climate_change_jokes.html"; 
    break;
  case "new_global_warming_jokes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "new_global_warming_jokes.html"; 
    break;
  case "green_facts_about_chuck_norris_jokes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "green_facts_about_chuck_norris_jokes.html"; 
    break;
  case "lightbulb_climatejokes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "lightbulb_climatejokes.html"; 
    break;
  case "knock_knock_climatejokes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "knock_knock_climatejokes.html"; 
    break;
  case "opuc_climate_satire.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "opuc_climate_satire.html"; 
    break;
  case "witzeeingeben.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "witzeeingeben.html"; 
    break;
  case "klimawandel_in_den_mund_gelegt.html":
  case "klima_in_den_mund_gelegt.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "klima_in_den_mund_gelegt.html"; 
    this.subactive = "klima_in_den_mund_gelegt.html"; 
    break;
  case "klimafun.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_witze_klimawandel_klimawitze.html"; 
    this.midactive = "klimafun.html"; 
    break;
  case "klimacartoons_mit_pius_und_ollie.html":
  case "cartoons_klimawandel_mit_pius_und_ollie.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimacartoons_mit_pius_und_ollie.html"; 
    this.midactive = "klimacartoons_mit_pius_und_ollie.html"; 
    this.subactive = "klimacartoons_mit_pius_und_ollie.html";
    break;
  case "klimawandel_cartoon_comic.html":
  case "klimawandel_windrad_cartoon.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimacartoons_mit_pius_und_ollie.html"; 
    this.midactive = "klimacartoons_mit_pius_und_ollie.html"; 
    this.subactive = "klimawandel_cartoon_comic.html"; 
    break;
  case "klimawandel_kunst.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimawandel_kunst.html"; 
    this.midactive = "klimawande_kunst.html"; 
    break;
  case "gedichte.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "gedichte.html"; 
    this.midactive = "gedichte.html"; 
    break;
   case "klimagedichte.html":
  case "klimawandel_gedichte.html":
  case "gedichte_klimawandel.html":
  case "gedichte_erderwaermung.html":
  case "umweltgedichte.html":
  case "klimawandel_poesie.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "gedichte.html"; 
    this.midactive = "gedichte.html"; 
    this.subactive = "klimagedichte.html";
    break;
 case "gedichte_tauschen.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "gedichte.html"; 
    this.midactive = "gedichte.html"; 
    this.subactive = "gedichte_tauschen.html";
    break;
  case "klimageschichten.html":
  case "venus.html":
  case "grenzenlos.html":
  case "trueffelhund.html":
  case "gletschertor.html":
  case "kolibri.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimageschichten.html"; 
    this.midactive = "klimageschichten.html"; 
    break;
  case "sammlung_zitate_klimawandel.html":
  case "klimawandel_zitate_aktuell.html":
  case "global_warming_quotes_politics.html":
  case "global_warming_quotes_mobility.html":
  case "climate_change_quotes_business.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    break;
  case "zitate_klimawandel_politik.html":
  case "aussagen_klimawandel_politik.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "zitate_klimawandel_politik.html";
    break;
  case "climate_change_quotations.html":
  case "climate_change_quotes.html":
  case "quotations2.html":
  case "climate_quotations.html":
  case "climate_quotes.html":
  case "global_warming_quotations.html":
  case "global_warming_quotes.html":
  case "global_warming_remarks.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "climate_change_quotations.html";
    break;
  case "klimawandelzitate_wirtschaft.html":
  case "aussagen_wirtschaft_klimawandel.html":
  case "zitate_wirtschaft_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "klimawandelzitate_wirtschaft.html";
    break;
  case "zitate_klimawandel_kirche.html":
  case "zitate_klimawandel_religion.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "zitate_klimawandel_kirche.html";
    break;
  case "klimawandelzitate_ernaehrung.html":
  case "zitate_klimawandel_fleisch.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "klimawandelzitate_ernaehrung.html";
    break;
  case "zitate_auto_klimawandel.html":
  case "zitate_fliegen_klimawandel.html":
  case "zitate_mobilitaet_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "zitate_auto_klimawandel.html";
    break;
  case "klimawandelzitate_energie.html":
  case "zitate_klimawandel_energie.html":
  case "zitate_energie_oel_kohle.html":
  case "zitate_erneuerbare_energien.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "klimawandelzitate_energie.html";
    break;
  case "klimawandelzitate_motivation.html":
  case "klimaschutz_motivation.html":
  case "zitate_motivation.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "klimawandelzitate_motivation.html";
    break;
  case "growth_and_consumption_quotes.html":
  case "quotations_on_consumerism.html":
  case "quotes_on_growth_and_climate.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "growth_and_consumption_quotes.html";
    break;
  case "quotations.html":
  case "climate_protection_motivational_quotes.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "quotations.html";
    break;
  case "klimazitate.html":
  case "klimawandel_zitate.html":
  case "zitate_klimawandel.html":
  case "klimawandel_sprueche.html":
  case "zitate_erderwaermung.html":
  case "zitate_globale_erwaermung.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "klimazitate.html";
    break;
  case "zitate_natur_klima.html":
  case "zitate_natur_klimaerwaermung.html":
  case "zitate_natur_klimawandel.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "zitate_natur_klima.html";
    break;
  case "zitate_wachstum_klima.html":
  case "zitate_wachstum_klimawandel.html":
  case "aussagen_wachstum_klimawandel.html":
  case "zitate_konsum_klimawandel.html":
  case "aussagen_wachstum_und_konsum.html":
  case "kommentare_zu_wachstum_klimawandel.html":
  case "sprueche_zu_wachstum_klimawandel.html":
  case "bemerkungen_zu_wachstum_klima.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "sammlung_zitate_klimawandel.html"; 
    this.subactive = "zitate_wachstum_klima.html";
    break;
  case "zitateeingeben.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "sammlung_zitate_klimawandel.html"; 
    this.midactive = "zitateeingeben.html"; 
    break;
  case "klimawandel_musik.html":
  case "climate_change_songtexts.html":
  case "klimawandel_liedtexte.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "climate_change_songtexts.html"; 
    this.midactive = "climate_change_songtexts.html"; 
    break;
  case "klimaspiele.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimaspiele.html"; 
    this.midactive = "klimaspiele.html"; 
    break;
  case "klimaraetsel.html":
  case "klimaraetselloesungen.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimaraetsel.html"; 
    this.midactive = "klimaraetsel.html"; 
    break;
  case "klimaquiz.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimaquiz.html"; 
    this.midactive = "klimaquiz.html"; 
    break;
  case "klimafilme.html":
  case "klimafilme_dokumentarfilme.html":
  case "klimafilmprojekte.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimafilme.html"; 
    this.midactive = "klimafilme.html"; 
    break;
  case "klimavideos.html":
  case "klimawandel_videos.html":
  case "wachstum_videos.html":
  case "videos_nachhaltigkeit.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "klimafilme.html"; 
    this.midactive = "klimafilme.html"; 
    this.subactive = "klimavideos.html";
    break;
  case "buecher_klimawandel.html":
  case "klimawandel_romane.html":
    this.menueactive = "Unterhalten"; 
    this.topactive = "buecher_klimawandel.html"; 
    this.midactive = "buecher_klimawandel.html"; 
    break;
  case "geldanlegen.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "geldanlegen.html"; 
    this.midactive = "geldanlegen.html"; 
    break;
  case "banken.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "banken.html"; 
    this.midactive = "banken.html"; 
    break;
  case "indizes.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "indizes.html"; 
    this.midactive = "indizes.html"; 
    break;
  case "solaraktien.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "solaraktien.html"; 
    this.midactive = "solaraktien.html"; 
    break;
  case "windaktien.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "windaktien.html"; 
    this.midactive = "windaktien.html"; 
    break;
  case "geothermieaktien.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "geothermieaktien.html"; 
    this.midactive = "geothermieaktien.html"; 
    break;
  case "brennstoffzellenaktien.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "brennstoffzellenaktien.html"; 
    this.midactive = "brennstoffzellenaktien.html"; 
    break;
  case "elektroautoaktien.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "elektroautoaktien.html"; 
    this.midactive = "elektroautoaktien.html"; 
    break;
  case "fonds.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "fonds.html"; 
    this.midactive = "fonds.html"; 
    break;
  case "etf.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "etf.html"; 
    this.midactive = "etf.html"; 
    break;
  case "beteiligungen.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "beteiligungen.html"; 
    this.midactive = "beteiligungen.html"; 
    break;
  case "gruene_rente.html":
    this.menueactive = "Geld anlegen"; 
    this.topactive = "gruene_rente.html"; 
    this.midactive = "gruene_rente.html"; 
    break;
  case "autointro.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autointro.html"; 
    this.midactive = "autointro.html"; 
    break;
  case "autospritsparen.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autospritsparen.html"; 
    this.midactive = "autospritsparen.html"; 
    break;
  case "spritspartipps_von_chuck_norris.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autospritsparen.html"; 
    this.midactive = "autospritsparen.html"; 
    break;
  case "autoklimaneutral.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autoklimaneutral.html"; 
    this.midactive = "autoklimaneutral.html"; 
    break;
  case "autolinks.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autolinks.html"; 
    this.midactive = "autolinks.html"; 
    break;
  case "elektroautointro.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektroautointro.html"; 
    this.midactive = "elektroautointro.html"; 
    break;
  case "elektroautos.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektroautos.html"; 
    this.midactive = "elektroautos.html"; 
    break;
  case "elektroautosnewcomer.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektroautosnewcomer.html"; 
    this.midactive = "elektroautosnewcomer.html"; 
    break;
  case "plug-in-hybrid.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "plug-in-hybrid.html"; 
    this.midactive = "plug-in-hybrid.html"; 
    break;
  case "druckluftautos.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "druckluftautos.html"; 
    this.midactive = "druckluftautos.html"; 
    break;
  case "elektroautosnews.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektroautosnews.html"; 
    this.midactive = "elektroautosnews.html"; 
    break;
  case "autoaufkleber.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autoaufkleber.html"; 
    this.midactive = "autoaufkleber.html"; 
    break;
  case "elektroroller.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektroroller.html"; 
    this.midactive = "elektroroller.html"; 
    break;
  case "elektrische_motorraeder.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "elektrische_motorraeder.html"; 
    this.midactive = "elektrische_motorraeder.html"; 
    break;
  case "pedelec.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "pedelec.html"; 
    this.midactive = "pedelec.html"; 
    break;
  case "autosolar.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "autosolar.html"; 
    this.midactive = "autosolar.html"; 
    break;
  case "fliegen.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "fliegen.html"; 
    this.midactive = "fliegen.html"; 
    break;
  case "fliegengutachten.html":
    this.menueactive = "Mobil sein"; 
    this.topactive = "fliegengutachten.html"; 
    this.midactive = "fliegengutachten.html"; 
    break;
  case "energiesparen.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "energiesparen.html"; 
    this.midactive = "energiesparen.html"; 
    break;
  case "energiesparlinks.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "energiesparlinks.html"; 
    this.midactive = "energiesparlinks.html"; 
    break;
  case "imbuero.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "imbuero.html"; 
    this.midactive = "imbuero.html"; 
    break;
  case "linksenergiesparenimbuero.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "linksenergiesparenimbuero.html"; 
    this.midactive = "linksenergiesparenimbuero.html"; 
    break;
  case "greenit.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "greenit.html"; 
    this.midactive = "greenit.html"; 
    break;
  case "energiewechsel.html":
    this.menueactive = "Energie sparen"; 
    this.topactive = "energiewechsel.html"; 
    this.midactive = "energiewechsel.html"; 
    break;
  case "aktion.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "aktion.html"; 
    this.midactive = "aktion.html"; 
    break;
 case "schenken.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "schenken.html"; 
    this.midactive = "schenken.html"; 
    break;
 case "news.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "news.html"; 
    this.midactive = "news.html"; 
    break;
 case "helfenperclick.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "helfenperclick.html"; 
    this.midactive = "helfenperclick.html"; 
    break;
 case "klimawandel_messen.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "klimawandel_messen.html"; 
    this.midactive = "klimawandel_messen.html"; 
    break;
 case "klimawandel_kausalkette.html":
    this.menueactive = "Aktiv sein"; 
    this.topactive = "klimawandel_kausalkette.html"; 
    this.midactive = "klimawandel_kausalkette.html"; 
    break;
 case "sitemap.html":
    this.menueactive = "Home"; 
    this.topactive = "sitemap.html"; 
    this.midactive = "sitemap.html"; 
    break;
 case "kontakt.html":
    this.menueactive = "Home"; 
    this.topactive = "kontakt.html"; 
    this.midactive = "kontakt.html"; 
    break;
 default:
    this.subactive = "index.html"; 
    //document.write('Fehler im Menue von Page ', subactive,' <br>');
    break; }
}

function writemitem (reference, menueitem, active) {
  document.write('<a href="');
  document.write(reference);
  document.write('">')
  document.write(menueitem);
  document.write('</a>');
}

function writetopmitem (reference, menueitem, active) {
  document.write('<a href="');
  document.write(reference);
  if ( active == menueitem ) {
    document.write('" class="topactive" >')
  } else {
    document.write('" class="top" >')
  }  
  document.write(menueitem);
  document.write('</a>');
}

function writesubmitem (reference, menueitem, active) {
  document.write('<li><a href="');
  document.write(reference);
  document.write('">')
  document.write(menueitem);
  document.write('</a></li>');
}

// topactive = pagename i.e. to be mapped!
function writehorizontalmenue (mytype, topactive, subactive) {

  var actpageh = new mypage (topactive);

  document.write('<div id="navicontainer"><div id="navi"><ul id="naviul">');
  document.write('<li>');
  writetopmitem ('index.html','Home',actpageh.menueactive);
  document.write('<ul>');
  writesubmitem ('index.html','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home',subactive);
  writesubmitem ('sitemap.html','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sitemap',subactive);  
  writesubmitem ('kontakt.html','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Impressum',subactive);    
  document.write('</ul></li>');
  document.write('<li>');

  writetopmitem ('sammlung_witze_klimawandel_klimawitze.html','Unterhalten',actpageh.menueactive);
  document.write('<ul>');
    writesubmitem ('sammlung_witze_klimawandel_klimawitze.html','Klimawitze',subactive);
    writesubmitem ('klimafun.html','Klimafun',subactive);
    writesubmitem ('klimacartoons_mit_pius_und_ollie.html','Klimacartoons',subactive);
    writesubmitem ('klimawandel_kunst.html','Klimakunst',subactive);
    writesubmitem ('gedichte.html','Klimagedichte',subactive);
    writesubmitem ('klimageschichten.html','Klimageschichten',subactive);
    writesubmitem ('sammlung_zitate_klimawandel.html','Zitate',subactive);
    writesubmitem ('climate_change_songtexts.html','Liedtexte',subactive);
    writesubmitem ('klimaraetsel.html','Klimar&auml;tsel',subactive);
    writesubmitem ('klimaquiz.html','Klimaquiz',subactive);
    writesubmitem ('klimaspiele.html','Klimaspiele',subactive);
    writesubmitem ('klimafilme.html','Kinofilme',subactive);
    writesubmitem ('klimavideos.html','Internet Videos',subactive);
    writesubmitem ('buecher_klimawandel.html','B&uuml;cher',subactive);
  document.write('</ul></li>');
  document.write('<li>');

  writetopmitem ('geldanlegen.html','Geld anlegen',actpageh.menueactive);
  document.write('<ul>');
    writesubmitem ('geldanlegen.html','Einstieg',subactive);
    writesubmitem ('banken.html','Banken',subactive);
    writesubmitem ('indizes.html','Aktien - Indizes',subactive);
    writesubmitem ('solaraktien.html','Aktien - Solarenergie',subactive);
    writesubmitem ('windaktien.html','Aktien - Windenergie',subactive);
    writesubmitem ('geothermieaktien.html','Aktien - Geothermie',subactive);
    writesubmitem ('brennstoffzellenaktien.html','Aktien - Brennstoffzellen',subactive);
    writesubmitem ('elektroautoaktien.html','Aktien - Elektrofahrzeuge',subactive);
    writesubmitem ('fonds.html','Fonds &amp; Zertifikate',subactive);
    writesubmitem ('etf.html','ETFs',subactive);
    writesubmitem ('beteiligungen.html','Beteiligungen &amp; Genussrechte',subactive);  
    writesubmitem ('gruene_rente.html','Gr&uuml;ne Renten',subactive);      
  document.write('</ul></li>');
  document.write('<li>');

  writetopmitem ('autointro.html','Mobil sein',actpageh.menueactive);
  document.write('<ul><li>');
    writemitem ('autointro.html','Autofahren',subactive);
    document.write('<ul>');
    writesubmitem ('autospritsparen.html','Spritspartipps',subactive);  
    writesubmitem ('autoklimaneutral.html','Klimaneutral Autofahren',subactive);
    writesubmitem ('autolinks.html','Links Autofahren',subactive);
    document.write('</ul></li><li>');
    writemitem ('elektroautointro.html','Elektroautos',subactive);
    document.write('<ul>');
    writesubmitem ('elektroautointro.html','Einstieg',subactive);  
    writesubmitem ('elektroautos.html','Elektroautos',subactive);
    writesubmitem ('elektroautosnewcomer.html','Elektroautos Newcomer',subactive);
    writesubmitem ('plug-in-hybrid.html','Plug-In Hybrid',subactive);
    writesubmitem ('druckluftautos.html','Druckluftautos',subactive);
    writesubmitem ('elektroautosnews.html','Elektroauto News',subactive);
    writesubmitem ('autoaufkleber.html','Autoaufkleber',subactive);
    writesubmitem ('autosolar.html','World Solar Challenge',subactive);
    document.write('</ul></li><li>');
    writemitem ('elektroroller.html','E-Bikes',subactive);
    document.write('<ul>');
    writesubmitem ('elektroroller.html','Elektroroller',subactive);
    writesubmitem ('elektrische_motorraeder.html','Elektromotorr&auml;der',subactive);
    writesubmitem ('pedelec.html','Pedelecs',subactive);
    document.write('</ul></li><li>');
    writemitem ('fliegen.html','Fliegen',subactive);
    document.write('<ul>');
    writesubmitem ('fliegen.html','Klimaneutral Fliegen',subactive);
    writesubmitem ('fliegengutachten.html','Gutachten Fliegen',subactive);
    document.write('</ul></li>');
  document.write('</ul></li>');
  document.write('<li>');

  writetopmitem ('energiesparen.html','Energiesparen',actpageh.menueactive);
  document.write('<ul>');
    writesubmitem ('energiesparen.html','Energiespartipps',subactive);
    writesubmitem ('energiesparlinks.html','Links',subactive);
    writesubmitem ('imbuero.html','Top 10 Energiespartipps im B&uuml;ro',subactive);
    writesubmitem ('linksenergiesparenimbuero.html','Links Energiesparen im B&uuml;ro',subactive);
    writesubmitem ('greenit.html','Green IT',subactive);
    writesubmitem ('energiewechsel.html','Energiewechsel',subactive);
  document.write('</ul></li>');
  document.write('<li>');
  writetopmitem ('aktion.html','Aktiv sein',actpageh.menueactive);
  document.write('<ul>');
    writesubmitem ('aktion.html','Aktionen',subactive);
    writesubmitem ('schenken.html','Schenken',subactive);
    writesubmitem ('news.html','Newsletter',subactive);
    writesubmitem ('helfenperclick.html','Helfen per Click',subactive);
    writesubmitem ('klimawandel_messen.html','Klimawandel messen',subactive);
    writesubmitem ('klimawandel_kausalkette.html','Fakten kennen',subactive);
  document.write('</ul></li>');
  document.write('</ul></div></div>');
}


function writevmitem (reference,menueitem,topactive,midactive,subactive) {
  document.write('<a href="');
  document.write(reference);
  if ( topactive == reference ) {
    document.write('" class="vactive" >')
  } else {
    document.write('"  >')
  }  
  document.write(menueitem);
  document.write('</a> <br>');
}

function writeverticalmenue (subactive) {
  document.write('<div style="text-align: right; margin-right: 8px;">');
  var actpage = new mypage (subactive);
  writevmitem ('index.html','Home',actpage.topactive,actpage.midactive,subactive);

  switch (actpage.menueactive) {
  case "Home":
    writevmitem ('sammlung_witze_klimawandel_klimawitze.html','Unterhalten',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('geldanlegen.html','Geld anlegen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('autointro.html','Mobil sein',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('energiesparen.html','Energie sparen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('aktion.html','Aktiv sein',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('sitemap.html','Sitemap',actpage.topactive,actpage.midactive,subactive);
    break;
 case "Mobil sein":
    writevmitem ('autointro.html','Einf&uuml;hrung',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('autospritsparen.html','Spritspartipps',actpage.topactive,actpage.midactive,subactive);  
    writevmitem ('autoklimaneutral.html','Klimaneutral Autofahren',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('autolinks.html','Links Autofahren',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektroautointro.html','Einstieg Elektroautos',actpage.topactive,actpage.midactive,subactive);  
    writevmitem ('elektroautos.html','Elektroautos',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektroautosnewcomer.html','Elektroautos Newcomer',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('plug-in-hybrid.html','Plug-In Hybrid',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('druckluftautos.html','Druckluftautos',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektroautosnews.html','Elektroauto News',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('autoaufkleber.html','Autoaufkleber',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektroroller.html','Elektroroller',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektrische_motorraeder.html','Elektromotorr&auml;der',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('pedelec.html','Pedelecs',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('autosolar.html','World Solar Challenge',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('fliegen.html','Klimaneutral Fliegen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('fliegengutachten.html','Gutachten Fliegen',actpage.topactive,actpage.midactive,subactive);
    break;
  case "Geld anlegen":
    writevmitem ('geldanlegen.html','Einstieg',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('banken.html','Banken',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('indizes.html','Aktien - Indizes',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('solaraktien.html','Aktien - Solarenergie',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('windaktien.html','Aktien - Windenergie',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('geothermieaktien.html','Aktien - Geothermie',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('brennstoffzellenaktien.html','Aktien - Brennstoffzellen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('elektroautoaktien.html','Aktien - Elektrofahrzeuge',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('fonds.html','Fonds &amp; Zertifikate',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('etf.html','ETFs',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('beteiligungen.html','Beteiligungen &amp; Genussrechte',actpage.topactive,actpage.midactive,subactive); 
    writevmitem ('gruene_rente.html','Gr&uuml;ne Renten',actpage.topactive,actpage.midactive,subactive);   
    break;
  case "Unterhalten":
    writevmitem ('sammlung_witze_klimawandel_klimawitze.html','Klimawitze',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "sammlung_witze_klimawandel_klimawitze.html"
         && actpage.subactive != "sammlung_witze_klimawandel_klimawitze.html" ) { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('sammlung_witze_klimawandel_klimawitze.html','&Uuml;bersicht',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawitze.html','Witze allgemein',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawandelwitze.html','Witze NEU',subactive,actpage.midactive,subactive);
       writevmitem ('bauernregeln_klimawandel.html','Bauernregeln',subactive,actpage.midactive,subactive);
       writevmitem ('gluehbirnen_witze_klimawandel.html','Gl&uuml;hbirnenwitze',subactive,actpage.midactive,subactive);
       writevmitem ('blondinenwitze_klimawandel.html','Blondinenwitze',subactive,actpage.midactive,subactive);
       writevmitem ('alle_kinder_witze_klimawandel.html','Alle Kinder Witze',subactive,actpage.midactive,subactive);
       writevmitem ('ostfriesen_witze_klimawandel.html','Ostfriesenwitze',subactive,actpage.midactive,subactive);
       writevmitem ('klopf_klopf_witze_klimawandel.html','Klopf Klopf Witze',subactive,actpage.midactive,subactive);
       writevmitem ('opuc_klimawandel_satire.html','OPUC Satire',subactive,actpage.midactive,subactive);
       writevmitem ('gruene_fakten_chuck_norris_witze.html','Chuck Norris',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('fritzchen_witze_klimawandel.html','Fritzchenwitze',subactive,actpage.midactive,subactive);
       writevmitem ('haeschen_witze_klimawandel.html','H&auml;schenwitze',subactive,actpage.midactive,subactive);
       writevmitem ('climate_change_jokes.html','Climate Jokes',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('new_global_warming_jokes.html','NEW Climate Jokes',subactive,actpage.midactive,subactive);
       writevmitem ('green_facts_about_chuck_norris_jokes.html','Chuck Norris Facts',subactive,actpage.midactive,subactive);
       writevmitem ('lightbulb_climatejokes.html','Lightbulb Jokes',subactive,actpage.midactive,subactive);
       writevmitem ('knock_knock_climatejokes.html','Knock Knock Jokes',subactive,actpage.midactive,subactive);
       writevmitem ('opuc_climate_satire.html','OPUC Jokes',subactive,actpage.midactive,subactive);
       writevmitem ('witzeeingeben.html','Witze eingeben',subactive,actpage.midactive,subactive);
       writevmitem ('klima_in_den_mund_gelegt.html','In den Mund gelegt',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimafun.html','Klimafun',subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    writevmitem ('klimacartoons_mit_pius_und_ollie.html','Klimacartoons',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "klimacartoons_mit_pius_und_ollie.html") { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('klimacartoons_mit_pius_und_ollie.html','Pius & Ollie',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawandel_cartoon_comic.html','Windradcartoons',actpage.subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    writevmitem ('klimawandel_kunst.html','Klimakunst',actpage.topactive,actpage.midactive,subactive);

    writevmitem ('gedichte.html','Klimagedichte',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "gedichte.html" ) 
   { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('gedichte.html','&Uuml;bersicht',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimagedichte.html','Gedichte',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('gedichte_tauschen.html','Gedichte tauschen',actpage.subactive,actpage.midactive,subactive);
       document.write('</span>');
    };   
    writevmitem ('klimageschichten.html','Klimageschichten',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "klimageschichten.html") { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('klimageschichten.html','&Uuml;bersicht',subactive,actpage.midactive,actpage.subactive);
       writevmitem ('venus.html','Das Venusprojekt',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('grenzenlos.html','Grenzenlos',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('trueffelhund.html','Der Tr&uuml;ffelhund',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('gletschertor.html','Das Gletschertor',actpage.subactive,actpage.midactive,subactive);
        writevmitem ('kolibri.html','Der Kolibri',actpage.subactive,actpage.midactive,subactive);
      document.write('</span>');
    };
    writevmitem ('sammlung_zitate_klimawandel.html','Klimazitate',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "sammlung_zitate_klimawandel.html" ) 
   { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('sammlung_zitate_klimawandel.html','&Uuml;bersicht',subactive,actpage.midactive,subactive);
       writevmitem ('klimawandel_zitate_aktuell.html','Zitate aktuell',subactive,actpage.midactive,subactive);
       writevmitem ('klimazitate.html','Zitate allgemein',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitate_klimawandel_politik.html','Politik',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitate_auto_klimawandel.html','Mobilit&auml;t',actpage.subactive,actpage.midactive,subactive);
        writevmitem ('klimawandelzitate_energie.html','Energie',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawandelzitate_wirtschaft.html','Wirtschaft',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitate_wachstum_klima.html','Wachstum',actpage.subactive,actpage.midactive,subactive);
        writevmitem ('klimawandelzitate_ernaehrung.html','Ern&auml;hrung',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitate_klimawandel_kirche.html','Kirche',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitate_natur_klima.html','Natur',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawandelzitate_motivation.html','Motivation',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('climate_change_quotations.html','Climate Quotes',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('global_warming_quotes_mobility.html','Mobility',subactive,actpage.midactive,subactive);
       writevmitem ('growth_and_consumption_quotes.html','Growth and consumption',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('global_warming_quotes_politics.html','Politics',subactive,actpage.midactive,subactive);
       writevmitem ('climate_change_quotes_business.html','Business',subactive,actpage.midactive,subactive);
       writevmitem ('quotations.html','Motivational Quotes',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('zitateeingeben.html','Zitate eingeben',subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    writevmitem ('climate_change_songtexts.html','Klimamusik',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "climate_change_songtexts.html") { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('climate_change_songtexts.html','Liedtexte',subactive,actpage.midactive,actpage.subactive);
       writevmitem ('klimawandel_musik.html','Musikvideos',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimawandel_liedtexte.html','Neue Texte',actpage.subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    writevmitem ('klimaraetsel.html','Klimar&auml;tsel',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('klimaquiz.html','Klimaquiz',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('klimaspiele.html','Klimaspiele',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('klimafilme.html','Klimafilme',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "klimafilme.html") { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('klimafilme.html','Spielfilme',subactive,actpage.midactive,actpage.subactive);
       writevmitem ('klimafilme_dokumentarfilme.html','Dokumentarfilme',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimavideos.html','Internet Videos',actpage.subactive,actpage.midactive,subactive);
       writevmitem ('klimafilmprojekte.html','Filmprojekte',actpage.subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    writevmitem ('buecher_klimawandel.html','Klimab&uuml;cher',actpage.topactive,actpage.midactive,subactive);
    if ( actpage.topactive == "buecher_klimawandel.html") { 
       document.write('<span class="menuesmalltext">');
       writevmitem ('buecher_klimawandel.html','Sachb&uuml;cher',subactive,actpage.midactive,actpage.subactive);
       writevmitem ('klimawandel_romane.html','Romane',actpage.subactive,actpage.midactive,subactive);
       document.write('</span>');
    };
    break;
  case "Energie sparen":
    writevmitem ('energiesparen.html','Energiespartipps',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('energiesparlinks.html','Links Energiesparen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('imbuero.html','Top 10 im B&uuml;ro',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('linksenergiesparenimbuero.html','Links B&uuml;ro',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('greenit.html','Green IT',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('energiewechsel.html','Energiewechsel',actpage.topactive,actpage.midactive,subactive);
    break;
  case "Aktiv sein":
    writevmitem ('aktion.html','Aktionen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('schenken.html','Schenken',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('news.html','Newsletter',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('helfenperclick.html','Helfen per Click',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('klimawandel_messen.html','Klimawandel messen',actpage.topactive,actpage.midactive,subactive);
    writevmitem ('klimawandel_kausalkette.html','Fakten kennen',actpage.topactive,actpage.midactive,subactive);
    break;
  default:
    document.write('Fehler im Menue ', actpage.topactive,' <br>');
    break; }

  document.write('</div>');
}

