﻿// Menuebaum notwendiges Modul menu.js

itemOnColor = "#FFFFCC";
itemOffColor = "#dedede";
itemnmOnColor = "#ccffcc";
menuNext = "<img src=images/next.gif>";
newMenuXDepl = -2;
newMenuYDepl = 2;
menuBgColor="#a0a0a0";
menuFgColor="#ffffff";

// preload images

im1 = new Image();
im1.src = "images/nimic.gif";
im2 = new Image();
im2.src = "images/next.gif";

function loaded(){

status = "Loading menus...";
myStatus = 0;

l1=addMenu(1, "<p align='left'>&nbsp;&nbsp;Aktuelles</p>", "window.open('aktuelles.html', '_self')", 180, 70, 10, 130);

l2=addMenu(1, "<p align='left'>&nbsp;&nbsp;Veranstaltungen</p>", "window.open('veranstaltungen.html', '_self');", 180, 110);
l2.addMenuItem("<p align='left'>&nbsp;&nbsp;&Uuml;bersicht Veranstaltungen</p>", "window.open('veranstaltungen.html', '_self');");
l2.addMenuItem("<p align='left'>&nbsp;&nbsp;Aktueller Terminkalender</p>", "var prwin = window.open('dokumente/terminliste.pdf','_blank');prwin.focus();");

l3=addMenu(1, "<p align='left'>&nbsp;&nbsp;Jugendgruppe</p>", "window.open('jugendgruppe.html', '_self')", 160, 98);
 
l4=addMenu(1, "<p align='left'>&nbsp;&nbsp;Musiker</p>", "window.open('musikgruppen.html', '_self')", 130, 65);
l4.addMenuItem("&nbsp;&nbsp;Musikgruppen", "window.open('musikgruppen.html', '_self');");

l5=addMenu(1, "<p align='left'>&nbsp;&nbsp;Tracht</p>", "window.open('tracht.html', '_self')", 160, 55);

l6=addMenu(1, "<p align='left'>&nbsp;&nbsp;&uuml;ber uns</p>", "window.open('ueber-uns.html', '_self')", 160, 74);
l6.addMenuItem("<p align='left'>&nbsp;&nbsp;&Uuml;ber uns</p>", "window.open('ueber-uns.html', '_self');");
l6.addMenuItem("<p align='left'>&nbsp;&nbsp;Chronik des Vereins</p>", "window.open('chronik.html', '_self');");

l7=addMenu(1, "<p align='left'>&nbsp;&nbsp;Ansprechpartner</p>", "window.open('ansprechpartner.html', '_self')", 0, 110);

l8=addMenu(1, "<p align='left'>&nbsp;&nbsp;&nbsp;Kontakt</p>", "window.open('kontakt.html', '_self')", 0, 65);

myStatus = 1;
status = "Loaded";

}

function setmenuknopf(){
     if(NS && !DOM){
		 if(menukopfknopf == 1){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemnmOnColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		if(menukopfknopf == 2){
			leiar0.bgColor=itemnmOnColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
// Muster wenn chronik aktiv
// 			leiar12.bgColor=itemOffColor;
// 			leiar14.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 3){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemnmOnColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 4){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemnmOnColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 5){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemnmOnColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 6){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemnmOnColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 7){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemnmOnColor;
			leiar13.bgColor=itemOffColor;
		 }
		 if(menukopfknopf == 8){
			leiar0.bgColor=itemOffColor;
			leiar2.bgColor=itemOffColor;
			leiar4.bgColor=itemOffColor;
			leiar7.bgColor=itemOffColor;
			leiar9.bgColor=itemOffColor;
			leiar11.bgColor=itemOffColor;
			leiar13.bgColor=itemnmOnColor;
		 }
     }
     else{
		if(menukopfknopf == 1){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemnmOnColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 2){
			leiar0.style.backgroundColor=itemnmOnColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 3){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemnmOnColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 4){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemnmOnColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 5){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemnmOnColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 6){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemnmOnColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 7){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemnmOnColor;
			leiar13.style.backgroundColor=itemOffColor;
		}
		if(menukopfknopf == 8){
			leiar0.style.backgroundColor=itemOffColor;
			leiar2.style.backgroundColor=itemOffColor;
			leiar4.style.backgroundColor=itemOffColor;
			leiar7.style.backgroundColor=itemOffColor;
			leiar9.style.backgroundColor=itemOffColor;
			leiar11.style.backgroundColor=itemOffColor;
			leiar13.style.backgroundColor=itemnmOnColor;
		}
     }
}

function resetmenuknopf(){
     if(NS && !DOM){
//		leiar0.bgColor=itemOffColor;
//		leiar2.bgColor=itemOffColor;
//		leiar4.bgColor=itemOffColor;
//		leiar6.bgColor=itemOffColor;
//		leiar8.bgColor=itemOffColor;
//		leiar10.bgColor=itemOffColor;
//		leiar12.bgColor=itemOffColor;
     }
     else{
//		leiar0.style.backgroundColor=itemOffColor;
//		leiar2.style.backgroundColor=itemOffColor;
//		leiar4.style.backgroundColor=itemOffColor;
//		leiar6.style.backgroundColor=itemOffColor;
//		leiar8.style.backgroundColor=itemOffColor;
//		leiar10.style.backgroundColor=itemOffColor;
//		leiar12.style.backgroundColor=itemOffColor;
     }
}
