cms菜单中当前频道重点显示

<DIV align=center>
<DIV id=menuarea>
<UL>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_10.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_20.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_30.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_40.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_50.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_60.gif" border=0></A>
<LI><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_70.gif" border=0></A>
<LI class=last><A href="javascript:void(0);"><IMG src="/bjbxp/lib/template/images/menu_80.gif" border=0></A> </LI></UL></DIV></DIV>
<SCRIPT> 
 qh("menuarea","IMG",0);

 

function qh(a_id,a_tag,id)  { 
var aName = new Array();      
aName[0]="B";      
aName[1] = "A0101" ;      
aName[2] = "A0102";      
aName[3] = "A0103";      
aName[4] = "A0104";      
aName[5] = "A0105";      
aName[6] = "A0107";      
aName[7] = "A0108";   
var aNamelen=aName.length;
var urlvalue=window.location.href;
var flag=-1;  
        var Tags=document.getElementById(a_id).getElementsByTagName(a_tag);               
        var len=Tags.length;  
           for (j=0;j<=aNamelen;j++) {  
              if (urlvalue.indexOf(aName[j])>=0) {                        
                  changeNav(Tags[j]); 
                  flag=j;
              } 
            }
        for(i=0;i<len;i++){ 

            if (flag!=i) { 
                  Tags[i].onmouseover=function(){changeNav(this)};    
                  Tags[i].onmouseout=function(){changeNav(this)};
          }

        }
}
function changeNav(v) {
            var tmp=v.src;
            var startchar=tmp.indexOf("_")+1; 
            var endchar=tmp.indexOf(".gif"); 
            tmp=tmp.substring(startchar,endchar);

            if (tmp.slice(-1)=="0") tmp= parseInt(tmp)+parseInt("1"); 
            else tmp= parseInt(tmp)-parseInt("1");  
            v.src="/bjbxp/lib/template/images/menu_"+tmp+".gif";
}

</SCRIPT> 

你可能感兴趣的:(cms菜单中当前频道重点显示)