树形导航菜单即用Javascript语句编写的在屏幕右边可以伸缩的菜单,但在网页上加入了FLASH之后,菜单伸出来之后就被FLASH遮住了,FLASH在菜单上面,请问这个问题如何解决? 我的Javascript语句如下: <script language="JavaScript" type="text/JavaScript"> //树形导航的JS代码 document.write("<style type=text/css>#master {LEFT: -170px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; Z-INDEX: 999}</style>") document.write("<table id=master width='170' border='0' cellspacing='0' cellpadding='0'><tr><td><img border=0 height=6 src=../../images/index/top.gif width=170></td><td rowspan='2' valign='top'><img id=menu onMouseOver=javascript:expand() border=0 height=70 name=menutop src=../../images/index/menu2.gif width=18></td></tr>"); document.write("<tr><td valign='top'><table width='150' border='0' cellspacing='5' cellpadding='0'><tr><td height='400' valign='top'><table width=100% height='100%' border=0 cellpadding=0 cellspacing=5 bgcolor='#ffffff' style=FILTER: alpha(opacity=30)><tr>"); document.write("<td height='10' align='left' bordercolor='#ecf6f5'><font color=A688FF>这里可以写自己的内容。</font></td></tr><tr valign='top'><td background=../../images/index/leftmenu_bg.gif valign='top' align='center' bordercolor='#ecf6f5'>"); document.write("<iframe width=150 height=280 src='links.htm' frameborder=0></iframe></td></tr></table></td></tr></table></td></tr></table>");
var ie = document.all ? 1 : 0 var ns = document.layers ? 1 : 0 var master = new Object("element") master.curLeft = -165; master.curTop = 10; master.gapLeft = 0; master.gapTop = 0; master.timer = null;
if(ie){var sidemenu = document.all.master;} if(ns){var sidemenu = document.master;} setInterval("FixY()",100);
function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){ clearTimeout(eval(layerName).timer) if(eval(layerName).curLeft != fromLeft){ if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft} else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft} else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft} if(ie){document.all[layerName].style.left = eval(layerName).curLeft} if(ns){document[layerName].left = eval(layerName).curLeft} } if(eval(layerName).curTop != fromTop){ if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop} else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop} else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop} if(ie){document.all[layerName].style.top = eval(layerName).curTop} if(ns){document[layerName].top = eval(layerName).curTop} } eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30) }
function setPace(layerName, fromLeft, fromTop, motionSpeed){ eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop) }
var expandState = 0
function expand(){ if(expandState == 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src = "../../images/index/menub2.gif"}; expandState = 1;} else{setPace("master", -170, 10, 10); if(ie){document.menutop.src = "../../images/index/menu2.gif"}; expandState = 0;} }
function FixY(){ if(ie){sidemenu.style.top = document.body.scrollTop+10} if(ns){sidemenu.top = window.pageYOffset+10} } </script>