Happen Zwei:
function newPosition(id) { // hide the description in case it was showing hideDiv(this.tipId); //find the final Y pos where the menu is moving to posY=this.Ytop; for (var i=0;i<=this.id-1;i++) { posY += parseInt(mainMenuH[i]) + this.space; } // we check if it is the last menu // if it is, then we create a new method that will show the selected description after all menuSetup have animated down: if (this.id == mainMenuH.length-1) { var f="openTip(" + id + ")"; // declare the method that will move all the topnavs to make space for the description; show descriptions } this.finish = new Function(f); // created the new method // animate the menu down to posY, in steps of -5px: this.layerMove(posY,-5) }
function layerMove(posY,moveY) { // animate the menu to posY, in steps of moveY if (moveY>0) { // we're moving up var a=posY-this.posY; // this.posY is the current position of the menu, so compare that one to the destination } else { // moving down var a=this.posY-posY; } if (a>0) { // destination is not yet reached: this.posY = this.posY + moveY; // 'remember' the menu's position showDiv(this.mainId,this.posX,this.posY); // move the layer to that new position if(this.timer) { clearTimeout(this.timer); // clear the existing timer } //repeat this method after the set delay: eval("theMenu[" + this.id + "].timer = setTimeout("theMenu[" + this.id + "].layerMove("+posY+","+moveY+","+this.delay+")"," + this.delay + ")"); } else { // we have reached the destination, so run the finish method this.finish(); } }
function openTip(id) { for (var i=0;i<theMenu.length-1;i++) { //runs through all menus if (id <= theMenu[i].id) { theMenu[i+1].slideMenu(id); //move (animate) the next menu } } if (id == theMenu.length-1) {//if the chosen menu is the last one, then we don't have to move the next, as there or none theMenu[theMenu.length-1].showTip();//just show description } }
function slideMenu(id) { posY = this.Ytop; //find the Y pos posY+=theTipH[id]+this.space;//add space for descriptions for (var i=0;i<=this.id-1;i++) {//loop through the array posY += parseInt(mainMenuH[i]) + this.space; } //slide: var f="theMenu[" + id + "].showTip()";//show descriptions this.finish = new Function(f);// set the method this.layerMove(posY,5) }
function showTip() { posY = this.Ytop; // find the Y pos for (var i=0;i<=this.id;i++) { posY += parseInt(mainMenuH[i]) + this.space; // find top menu positions } // put under the top menu showDiv(this.tipId,this.posX,posY); //Show the layers }
function openMenu(id) { for (var i=0;i<theMenu.length;i++) { theMenu[i].newPosition(id); } }
var rubrik = "";
function standort1() { if (rubrik != "unternehmen") { openMenu('1'); rubrik = "unternehmen"; } }
function standort2() { if (rubrik != "aktuelles") { openMenu('2'); rubrik = "aktuelles"; } }
function standort3(){ if (rubrik != "produkte") { openMenu('3'); rubrik = "produkte"; } }
function standort4(){ if (rubrik != "anwendungen") { openMenu('4'); rubrik = "anwendungen"; } }
function standort5(){ if (rubrik != "bezugsquellen") { openMenu('5'); rubrik = "bezugsquellen"; } }
function standort6(){ if (rubrik != "service") { openMenu('6'); rubrik = "service"; } }
function standort7(){
openMenu('11'); rubrik = ""; }
function start() { // create menu objects and position them: theMenu[0] = new menuSetup(0,119); theMenu[1] = new menuSetup(1,119); theMenu[2] = new menuSetup(2,119); theMenu[3] = new menuSetup(3,119); theMenu[4] = new menuSetup(4,119); theMenu[5] = new menuSetup(5,119); theMenu[6] = new menuSetup(6,119); theMenu[7] = new menuSetup(7,119); theMenu[8] = new menuSetup(8,119); theMenu[9] = new menuSetup(9,119); theMenu[10] = new menuSetup(10,119);
// show start for (var i=0;i<theMenu.length;i++) { //loop through the array of objects, and show the menus // measure menu theMenu[i].measure(); // show menu theMenu[i].showMenu(); } }
</script>
<style type="text/css">
body {font-family: Arial, sans-serif; font-size: 8pt; font-weight: bold; color: #727272; text-decoration: none; text-align: right;}
.menu { font-family: Arial, sans-serif; font-size: 8pt; font-weight: bold; color: #727272; position: absolute; z-index: 2; width: 150px; cursor:pointer; text-align: right; }
.menudesc { font-family: Arial, sans-serif; font-size: 7.5pt; position: absolute; z-index: 2; visibility: hidden; width: 150px; line-height:15px; cursor:pointer; text-align: right; }
a:active { font-family: Arial, sans-serif; font-weight: bold; font-size: 8pt; color: #727272; text-decoration: none; text-align: right; font-style: normal; } a:hover { font-family: Arial, sans-serif; font-weight: bold; font-size: 8pt; color: #727272; text-decoration: none; text-align: right; font-style: normal; } a:link { font-family: Arial, sans-serif; font-size: 8pt; font-weight: bold; color: #727272; text-decoration: none; text-align: right; font-style: normal; } a:visited { font-family: Arial, sans-serif; font-weight: bold; font-size: 8pt; color: #727272; text-decoration: none; text-align: right; font-style: normal; }
a.submenue:active { font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt; color: #999999; text-decoration: none; text-align: right; font-weight: normal; } a.submenue:hover { font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt; color: #999999; text-decoration: none; text-align: right; font-weight: normal; } a.submenue:link { font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt; color: #999999; text-decoration: none; text-align: right; font-weight: normal; } a.submenue:visited { font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt; color: #999999; text-decoration: none; text-align: right; font-weight: normal; }
</style> </head>
<body onload="start()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- MENU -->
<div id="mainMenu0" class="menu"> <a href="http://www.Firmenname.com/germany/" target="_top" onfocus="this.blur()">Startseite</a> </div> <div id="mainMenu1" class="menu" onClick="standort1()">Unternehmen</div> <div id="mainMenu2" class="menu" onClick="standort2()">Aktuelles</div> <div id="mainMenu3" class="menu" onClick="standort3()">Produktübersicht</div> <div id="mainMenu4" class="menu" onClick="standort4()">Anwendungen</div> <div id="mainMenu5" class="menu" onClick="standort5()">Bezugsquellen</div> <div id="mainMenu6" class="menu" onClick="standort6()">Service</div> <div id="mainMenu7" class="menu" style="margin-top:20px;"><a href="http://www.Firmenname.com/germany/14/" onclick="standort7()" onfocus="this.blur()" target="mainFrame">Suchen & Finden</a></div> <div id="mainMenu8" class="menu" style="margin-top:20px;"><a href="http://www.Firmenname.com/germany/15/" onclick="standort7()" onfocus="this.blur()" target="mainFrame">Rückruf vereinbaren</a></div> <div id="mainMenu9" class="menu" style="margin-top:20px;"><a href="http://www.Firmenname.com/germany/16/" onclick="standort7()" onfocus="this.blur()" target="mainFrame">Allgemeine Anfrage</a></div> <div id="mainMenu10" class="menu" style="margin-top:20px;"><a href="http://www.Firmenname.com/germany/17/" onclick="standort7()" onfocus="this.blur()" target="mainFrame">Impressum</a></div>
<span id="theTip0" class="menudesc"></span> <div id="theTip1" class="menudesc" style="margin-top: -5px;"> <a href="http://www.Firmenname.com/germany/company/4/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Über Firmenname</a><br> <a href="http://www.Firmenname.com/germany/company/1/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Jobs und Karriere</a><br> <a href="http://www.Firmenname.com/germany/company/0/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Presse Forum</a><br> </div>
<div id="theTip2" class="menudesc" style="margin-top: -5px;"> <a href="http://www.Firmenname.com/germany/aktuell/0/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()">Pressemitteilungen<br> <a href="http://www.Firmenname.com/germany/aktuell/1/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Stories</a><br> <a href="http://www.Firmenname.com/germany/aktuell/2/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()">Veranstaltungen<br> </div>
<div id="theTip3" class="menudesc" style="margin-top: -5px;"> <a href="http://www.Firmenname.com/germany/produkte/B/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Für zu Hause</a><br> <a href="http://www.Firmenname.com/germany/produkte/4/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Für kleine Büros</a><br> <a href="http://www.Firmenname.com/germany/produkte/8/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Für Unternehmen</a><br> </div>
<div id="theTip4" class="menudesc" style="margin-top: -5px;"> <a href="http://www.Firmenname.com/germany/6/0/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Kommunikation</a><br> <a href="http://www.Firmenname.com/germany/6/2/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Mobilität</a><br> <a href="http://www.Firmenname.com/germany/6/1/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Organisation</a><br> </div>
<div id="theTip5" class="menudesc" style="margin-top: -5px;"> <a href="http://www.Firmenname.com/germany/vertrieb/4/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Für Kunden</a><br> <a href="http://www.Firmenname.com/germany/vertrieb/5/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Für Fachhändler</a><br> <a href="javascript:win=NewWindow('http://www.Firmenname.com/tpn/0/','register','850','630','no');win.focus()" class="submenue" style="margin-right: 2px" onfocus="this.blur()">Partner-Programm</a><br> </div>
<div id="theTip6" class="menudesc" style="margin-top: -5px"> <a href="http://www.Firmenname.com/germany/service/5/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Support</a><br> <a href="http://www.Firmenname.com/germany/service/6/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Download</a><br> <a href="http://www.Firmenname.com/germany/11/" target="mainFrame" class="submenue" style="margin-right: 2px" onfocus="this.blur()"> Fragen und Antworten</a><br> </div>
<div id="theTip7" class="menudesc"> </div>
<div id="theTip8" class="menudesc"> </div>
<div id="theTip9" class="menudesc"> </div>
<div id="theTip10" class="menudesc"> </div>
<!--MENU ENDE -->
<p style="margin-top: 50px; margin-bottom: 0px"> <img src="if6b80a4-002.apd/1pgrey.gif" width="1" height="2000" align="right">
<table height="100%" width="166" cellpadding="0" cellspacing="0" border="0"> <tr><td valign="top" align="right">
<table border="0" cellpadding="0" cellspacing="0" border=1> <tr><td align="right"><img src="if6b80a4-001.apd/ts-small.gif" hspace="12" vspace="5" width="106" height="20" border=0></td></tr> <tr><td> </td></tr> </table>
</td></tr> </table> </p>
<table><tr><td>
</td></tr></table> </body> </html>