/* Funktionen zur Flashsteuerung*/ function setFlash (nr) { var objSwf = document.getElementById( "flashbubbles"); if ( objSwf ) { objSwf.SetVariable( "newPos", nr ); objSwf.TCallLabel( "/", "switchLabel" ); return; } var objImg = document.getElementById( "imgbubbles" ); if ( objImg ) objImg.src = urlBase + "VNF/bubbles_nf" + nr + ".jpg/$file/bubbles_nf" + nr + ".jpg"; } /* Funktionen zur Objektsteuerung*/ function ctrlMenu( nrMenu, dir ) { if (!aL2Menu) return; for ( var layer in aL2Menu ) { if( aL2Menu[layer].dNr != nrMenu ) aL2Menu[layer].scrollIn(); } if ( aL2Menu[nrMenu] ) aL2Menu[nrMenu].scrollMenu( dir ); } function setTimer( nrMenu ) { if ( aL2Menu[nrMenu] ) aL2Menu[nrMenu].startTimer( nrMenu ); } function killTimer( nrMenu ) { if ( aL2Menu[nrMenu] ) aL2Menu[nrMenu].resetTimer( nrMenu ); } /* Anfang - Menuklasse */ function menuLayer( divNr, strId, activeColor, anzSub ) { // Membervariablen this.dNr = divNr; // lfd. Nummer des Layers this.strId = strId; // ID des Layers this.dAnzSub = anzSub; // Anzahl der Level 2 Einträge this.strActColor = activeColor; // Aktive Farbe this.dInterval = 0; // Scroll-Intervall this.dTimer = 0; // Ausschalt Timer für Menu this.objLayer = document.getElementById( this.strId ); // Layer als Objekt this.divHeight = dLineHeight * this.dAnzSub + this.dAnzSub + 1; // Gesamthöhe Layer this.startPos = 0; // Anfangsposition zum Scrollen if ( this.divHeight % dStep == 0 ) this.startPos = dEndPos - this.divHeight; else this.startPos = dEndPos - this.divHeight - (this.divHeight % dStep); this.startPos -= dStep; // Funktionen this.scrollMenu = scrollMenu; this.performScroll = performScroll; this.startTimer = startTimer; this.resetTimer = resetTimer; this.scrollIn = scrollIn; this.highLight = highLight; // neue Menüposition setzen und Menü sichtbar machen if (this.objLayer.style) { this.objLayer.style.top = this.startPos; this.objLayer.style.visibility = "visible"; } return this; } function scrollMenu( dir ) { this.resetTimer(); if ( this.dInterval ) window.clearInterval( this.dInterval ); this.dInterval = window.setInterval("aL2Menu['" + this.strId + "'].performScroll(\"" + dir + "\")", dAbsInterval); } function startTimer() { this.resetTimer(); this.dTimer = window.setTimeout( "aL2Menu['" + this.strId + "'].scrollMenu( \"out\" )", dAbsTimer); } function resetTimer() { if ( this.dTimer ) window.clearTimeout(this.dTimer); } function scrollIn() { this.resetTimer(); this.scrollMenu("out"); } function performScroll( dir ) { var actPos = parseInt( this.objLayer.style.top ); if ( (dir=="in" && actPos >= dEndPos) ||(dir=="out" && actPos <= this.startPos) ) window.clearInterval(this.dInterval); else dir=="in" ? this.objLayer.style.top = actPos + dStep : this.objLayer.style.top = actPos - dStep; } function highLight( cmd ) { objLink = document.getElementById( "lnk" + this.strId ); objBubble = document.getElementById( "bubble" + this.dNr ); if ( objLink ) objLink.style.color = (cmd == "on" ? this.strActColor : lowLightColor); if ( objBubble ) objBubble.style.visibility = ( cmd == "on" ? "visible" : "hidden" ); if ( cmd == "on" ) setFlash( this.dNr ); } /* Ende - Menuklasse */