simon: menu erweitern!

Beitrag lesen

ich habe ein problem, welches ich zimlich rasch gelöst haben sollte. und zwar habe ich folgendes menu:

<html>
<head>
<title>JO-SAC Rorschach</title>
<base target="win">
<style>
<!--
DIV.clTop{position:absolute; width:170}
DIV.clSub{position:absolute; left:10; width:170}
#divCont{position:relative; left:10; top:0; height:400; width:170;}
A.clMain{font-family:Arial, Verdana, Helvetica, Helv; font-size:14px; text-decoration:none; font-weight:bold; color:black}
A.clSubb{font-family:Arial, Verdana, Helvetica, Helv; font-size:14px; text-decoration:none; color:black}
#divMain{position:absolute}
//-->
</style>
<style type="text/css">
a:link { font-weight:bold; color:#0000E0; text-decoration:none }
a:visited { font-weight:bold; color:#000080; text-decoration:none }
a:hover { font-weight:bold; color:#E00000; text-decoration:none }
a:active { font-weight:bold; color:#E00000; text-decoration:underline }
a:focus { font-weight:bold; color:#00E000; text-decoration:underline }
</style>

<script language="JavaScript">
/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts.
This may be used freely as long as this msg is intact!
update by simon.bruggmann@bluewin.ch
********************************************************************************/

var stayFolded=false
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var browser=((n || ie) && parseInt(navigator.appVersion)>=4)

function makeMenu(obj,nest){
 nest=(!nest) ? '':'document.'+nest+'.'
 this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
    this.ref=(n) ? eval(nest+'document.'+obj+'.document'):eval('document');
 this.height=n?this.ref.height:eval(obj+'.offsetHeight')
 this.x=(n)? this.css.left:this.css.pixelLeft;this.y=(n)? this.css.top:this.css.pixelTop;
 this.hideIt=b_hideIt; this.showIt=b_showIt; this.vis=b_vis; this.moveIt=b_moveIt
 return this
}
function b_showIt(){this.css.visibility="visible"}
function b_hideIt(){this.css.visibility="hidden"}
function b_vis(){if(this.css.visibility=="hidden" || this.css.visibility=="hide") return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

function init(){
 oTop=new Array()
 oTop[0]=new makeMenu('divTop1','divCont')
 oTop[1]=new makeMenu('divTop2','divCont')
 oTop[2]=new makeMenu('divTop3','divCont')
 oTop[3]=new makeMenu('divTop4','divCont')
 oTop[4]=new makeMenu('divTop5','divCont')
 oTop[5]=new makeMenu('divTop6','divCont')

oSub=new Array()
 oSub[0]=new makeMenu('divSub1','divCont.document.divTop1')
 oSub[1]=new makeMenu('divSub2','divCont.document.divTop2')
 oSub[2]=new makeMenu('divSub3','divCont.document.divTop3')
 oSub[3]=new makeMenu('divSub4','divCont.document.divTop4')
 oSub[4]=new makeMenu('divSub5','divCont.document.divTop5')
 oSub[5]=new makeMenu('divSub6','divCont.document.divTop6')
for(i=0;i<oSub.length;i++){ oSub[i].hideIt() }
 for(i=1;i<oTop.length;i++){ oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height) }
}

function menu(num){
 if(browser){
  if(!stayFolded){
   for(i=0;i<oSub.length;i++){
    if(i!=num) oSub[i].hideIt()
   }
   for(i=1;i<oTop.length;i++){
    oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height)
   }
  }
  oSub[num].vis()?oSub[num].showIt():oSub[num].hideIt()
  for(i=1;i<oTop.length;i++){
   if(!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height+oSub[i-1].height)
   else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height)
  }
 }
}
//Initiating the menus onload, if it's a 4.x+ browser.
if(browser) onload=init;

</script>

</HEAD>
<BODY background="img\bg.jpg">
<div id="divCont">
 <div id="divTop1" class="clTop"><a href="#" onclick="menu(0); return false" class="clMain">[Home]</a><br>
  <div id="divSub1" class="clSub"><br>
   <a href="index.html" target=_top class="clSubb">Startseite</a><br>

</div><br>
 </div>
 <div id="divTop2" class="clTop"><a href="#" onclick="menu(1); return false" class="clMain">[choice 1]</a><br>
  <div id="divSub2" class="clSub"><br>
   <a href="#" class="clSubb">-Sub 1</a><br>
   <a href="#" class="clSubb">-Sub 2</a><br>
  </div><br>
 </div>
 <div id="divTop3" class="clTop"><a href="#" onclick="menu(2); return false" class="clMain">[Bilder]</a><br>
  <div id="divSub3" class="clSub"><br>
   <a href="img\hochtouren01\hochtouren01.html" class="clSubb">Hochtouren 2001</a><br>
   <a href="img\hochtouren02\1\02.html" class="clSubb">Hochtouren 2002-1</a><br>
   <a href="img\hochtouren02\2\02.html" class="clSubb">Hochtouren 2002-2</a><br>
   <a href="img\suedfrankreich02\1\02.html" class="clSubb">Südfrankreich 02</a><br>
   <a href="img\alpstein\alpstein.html" class="clSubb">Alpstein</a><br>
   <a href="img\tessin\tessin.html" class="clSubb">Tessin</a><br>
  </div><br>
 </div>

<div id="divTop4" class="clTop"><a href="" onclick="menu(3); return false" class="clMain">[Berichte]</a><br>
  <div id="divSub4" class="clSub"><br>
   <a href="infos\suedfrankreich01.html" class="clSubb">Südfrankreich 2001</a><br>
   <a href="infos\suedfrankreich02.html" class="clSubb">Südfrankreich 2002</a><br>
   <a href="infos\herbst00.html" class="clSubb">Herbst 2000</a><br>
   <a href="infos\jura.html" class="clSubb">Jura 2000</a><br>
   <a href="infos\sommer02.html" class="clSubb">Sommerlager 2002</a><br>
   <a href="infos\6_monate_2000.html" class="clSubb">1. Teil 2000</a><br>
   <a href="infos\auffahrt01.html" class="clSubb">Auffahrt</a><br>
   <a href="infos\2000.html" class="clSubb">Jahr 2000</a><br>

</div><br>
 </div>
 <div id="divTop5" class="clTop"><a href="" onclick="menu(4); return false" class="clMain">[Mitglieder]</a><br>
  <div id="divSub5" class="clSub"><br>
   <a href="mtg/login.html" class="clSubb">Login</a><br>
     </div><br>
 </div>
 <div id="divTop6" class="clTop"><a href="" onclick="menu(5); return false" class="clMain">[Markt]</a><br>
  <div id="divSub6" class="clSub"><br>
   <a href="infos_markt.html" class="clSubb">Infos</a><br>
   <a href="inserat_markt.html" class="clSubb">Inserat aufgeben</a><br>
   <a href="markt.html" class="clSubb">Anschauen</a><br>
  </div><br>
 </div>
</div>

<a href="links/links.html">Links</a>
</body>
</html>

und nun möchte ich ein weiterer menupunkt hinzufügen.
ich habe schon x varianten versucht, doch nie hat eine funktioniert!
ich hoffe mal, es kann mir jemand von euch helfen...

mfg simon