function ShowIndex (myIndex, modus, PorM) {
parent.navigator_frame.Menue1.style.visibility = 'hidden';
var layers = parent.navigator_frame.document.getElementsByTagName("div");
var aktLayer = layers [myIndex];
var parenttopdistance = Math.abs(aktLayer.style.top.substring(0,aktLayer.style.top.length-2));
parenttopdistance = parenttopdistance +Math.abs(aktLayer.style.height.substring(0,aktLayer.style.height.length-2));
var counter = 0;
var counter1 = 0;
var FinishIndex = layers.length - 1;
var tempTopdistance = 0;
var tempEbene = 0;
var tempEbene2 =0;
var tempEbene2 =0;
//hat der Knoten überhaupt Childs? - Test über Ebene von nachfolgendem Knoten
var aktLayerEbene = parent.navigator_frame.document.forms[myIndex].stufe.value;
var nextIndex = Math.abs(myIndex)+1;
var nextLayerEbene =parent.navigator_frame.document.forms[nextIndex].stufe.value;
for (s=0;s<layers.length;s++) {
parent.navigator_frame.MM_swapImage("pic" +s,'','bilder/pic_folderclosed.gif',1);
}
parent.navigator_frame.MM_swapImage("pic" +myIndex,'','bilder/pic_folderactive.gif',1);
if (nextLayerEbene > aktLayerEbene) {
//Childs geschlossen?
if (layers[nextIndex].style.visibility == 'hidden') {
// Bild von Plus auf Minus(SwapImage + -> -)
parent.navigator_frame.MM_swapImage("plusminus" +myIndex,'','bilder/pic_minus.gif',1);
// bis zum nächsten Knoten mit gleicher oder kleinerer Ebene alle divs einblenden
for (i=nextIndex; i<layers.length;i++) {
if (layers[i].id.substring(0,1) =="d") {
tempEbene = parent.navigator_frame.document.forms[i].stufe.value;
if (tempEbene == nextLayerEbene) {
// Childs einblenden
var aktLayer2 = layers[i];
aktLayer2.style.visibility = 'visible';
aktLayer2.style.zIndex = 200 ;
tempTopdistance = counter +parenttopdistance;
aktLayer2.style.top = tempTopdistance+"px";
counter = counter + 18;
}
else if (tempEbene > nextLayerEbene) {
// // SubChilds ausblenden
// // topdistance dekrement
}
else {
FinishIndex = i;
break;
}
}
}
//Knoten ab dem nächsten auf der aktlayer- Ebene nach unten rücken
for (j=FinishIndex;j<layers.length;j++) {
if (layers[j].id.substring(0,1) =="d") {
var aktLayer3 = layers[j];
tempTopdistanceString = aktLayer3.style.top;
tempTopdistanceString = tempTopdistanceString.substring(0,tempTopdistanceString.length-2);
tempTopdistance = Math.abs(tempTopdistanceString);
tempTopdistance = tempTopdistance + counter;
aktLayer3.style.top = tempTopdistance+"px";
}
}
}
//Childs offen?
else if (layers[nextIndex].style.visibility == 'visible') {
var OverNextIndex = 0;
//Bild von Minus auf Plus(SwapImage + -> -)
parent.navigator_frame.MM_swapImage("plusminus" +myIndex,'','bilder/pic_plus.gif',1);
// bis zum nächsten Knoten mit gleicher oder kleinerer Ebene alle divs ausblenden
for (i=nextIndex; i<layers.length;i++) {
if (layers[i].id.substring(0,1) =="d") {
tempEbene = parent.navigator_frame.document.forms[i].stufe.value;
if (tempEbene > nextLayerEbene) {
OverNextIndex = i;
}
if (tempEbene == nextLayerEbene) {
// Childs ausblenden
parent.navigator_frame.MM_swapImage("plusminus" +i,'','bilder/pic_plus.gif',1);
var aktLayer2 = layers[i];
aktLayer2.style.visibility = 'hidden';
aktLayer2.style.zIndex = -3 ;
tempTopdistance = counter - parenttopdistance;
aktLayer2.style.top = tempTopdistance+"px";
counter = counter + 18;
}
else if (tempEbene > nextLayerEbene &&OverNextIndex != 0) {
if (layers[OverNextIndex].style.visibility == 'visible') {
parent.navigator_frame.MM_swapImage("plusminus" +i,'','bilder/pic_plus.gif',1);
var aktLayer3 = layers[i];
aktLayer3.style.visibility = 'hidden';
aktLayer3.style.zIndex = -3 ;
tempTopdistance = counter - parenttopdistance;
aktLayer3.style.top = tempTopdistance+"px";
counter = counter + 18;
}
}
else {
FinishIndex = i;
break;
}
}
}
//Knoten ab dem nächsten auf der aktlayer- Ebene nach oben rücken
for (j=FinishIndex;j<layers.length;j++) {
if (layers[j].id.substring(0,1) =="d") {
var aktLayer3 = layers[j];
tempTopdistanceString = aktLayer3.style.top;
tempTopdistanceString = tempTopdistanceString.substring(0,tempTopdistanceString.length-2);
tempTopdistance = Math.abs(tempTopdistanceString);
tempTopdistance = tempTopdistance - counter;
aktLayer3.style.top = tempTopdistance+"px";
}
}
}
}
else if (!nextLayerEbene) {
parent.navigator_frame.MM_swapImage("plusminus" +myIndex,'','bilder/pic_blank.gif',1);
}
else {
parent.navigator_frame.MM_swapImage("plusminus" +myIndex,'','bilder/pic_blank.gif',1);
}
//Funktionalität aufrufen
if (modus == "leftClick") {
if (PorM == 'M') {
CallContent(myIndex,'Media');
}
else if (PorM == 'P') {
}
}
else if (modus == "rightClick") {
CallContent(myIndex,'Menu');
}
}