|
Hello everyone,
I`m using a fold out menu for navigating, i have a problem with the sub-menues.
Basically, the menu has 2 levels, top menu and sub menues.
I have about 17 top-menues with about 5 sub-menues on each top-menues.
The problem is the 12th top-menu displays the 2nd sub-menues, 13th top displayed 3rd sub and so forth...
Up to 11th top level works fine...
I think the below string controls this...
=====================================================
function menu(num){
if(bw.bw){
if (!stayFolded){
for (var i=0; i<oSub.length; i++){
if (i!=num){
oSub.hideIt()
if (foldImg)oTop.ref["imgA"+i].src = unImg.src
}
}
for(var i=1; i<oTop.length; i++){
oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h)
}
}
if (oSub[num].vis()){
oSub[num].showIt()
if (foldImg)oTop[num].ref["imgA"+num].src = exImg.src
}else{
oSub[num].hideIt()
if(foldImg)oTop[num].ref["imgA"+num].src = unImg.src
}
for(var i=1; i<oTop.length; i++){
if (!oSub[i-1].vis()) oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h+oSub[i-1].h+mainOffsetY)
else oTop.moveIt(0,oTop[i-1].y+oTop[i-1].h+mainOffsetY)
}
}
}
===========================================
Each of the sub-menu has these strings:
=============================================
<div id="divTop6" class="clTop"><a href="#" onclick="menu(6); return false" onfocus="this.blur()"><img src="/images/foldoutmenu_arrow.gif" name="imgA6" width=12 height=12 alt="" border="0"> Hyundai Excel</a><br>
<div id="divSub6" class="clSub">
==============================================
The above string works fine, its only after name="imgA9" and when the code changes to name="imgA10", the problem occurs.
I think the double digit in the code.
Can you help?
Any help will be greatly appreciated.
Cheers,
Alex
|
|
|
|
|
|
|
|