<!-- nav js start -->
<script>
window.οnlοad=function(){
//导航下子导航显示的加载js 2014 06 22
//var myURL1 = document.location.href;
if(window.location.href.indexOf("/cy/")>-1){
var ss2=document.getElementById("s_2");
ss2.style.display="block";
}else if(window.location.href.indexOf("/fz/")>-1){
var ss3=document.getElementById("s_3");
ss3.style.display="block";
}else if(window.location.href.indexOf("/jx/")>-1){
var ss4=document.getElementById("s_4");
ss4.style.display="block";
}else if(window.location.href.indexOf("/jj/")>-1){
var ss5=document.getElementById("s_5");
ss5.style.display="block";
}else if(window.location.href.indexOf("/sp/")>-1){
var ss6=document.getElementById("s_6");
ss6.style.display="block";
}else if(window.location.href.indexOf("/mr/")>-1){
var ss7=document.getElementById("s_7");
ss7.style.display="block";
}else if(window.location.href.indexOf("/bj/")>-1){
var ss8=document.getElementById("s_8");
ss8.style.display="block";
}else if(window.location.href.indexOf("/jy/")>-1){
var ss9=document.getElementById("s_9");
ss9.style.display="block";
}else if(window.location.href.indexOf("/wl/")>-1){
var ss10=document.getElementById("s_10");
ss10.style.display="block";
}else if(window.location.href.indexOf("/hb/")>-1){
var ss11=document.getElementById("s_11");
ss11.style.display="block";
}else{
var ss1=document.getElementById("s_1");
ss1.style.display="block";
}
///导航下子导航显示的结束js
///主导航高亮显示js start
var keyarr = new Array('cy','fz','jx','jj','sp','mr','bj','jy','wl','hb');
var vaarr = new Array('m_2','m_3','m_4','m_5','m_6','m_7','m_8','m_9','m_10','m_11');
for(var i=2;i<12;i++){
//alert(keyarr[i-2]);
if(window.location.href.indexOf("/"+keyarr[i-2]+"/")>-1){
document.getElementById(vaarr[i-2]).className ='m_li_a';
}
}
///主导航高亮显示js end
// 子导航点亮按钮 2014 06 22
var myNav = document.getElementById("kind_menu").getElementsByTagName("a");
//获取当前窗口的url
var myURL = window.location.href;
var arrUrl=myURL.split("/");
for(var i=0;i<myNav.length;i++){
myNav[i].className="";
}
// alert(arrUrl);
//循环div下面所有的链接,
for(var i=0;i<myNav.length;i++){
//获取每一个a标签的herf属性
var links = myNav[i].getAttribute("href");
var myURL = document.location.href;
//查看div下的链接是否包含当前窗口,如果存在,则给其添加样式
// if(myURL.indexOf(links) != -1){
if(myURL=="http://news.28.com/"){
for(var i=0;i<myNav.length;i++){
myNav[i].className="";
}
}else{
if(links.indexOf("/"+arrUrl[3]+"/") > -1){
myNav[i].className="cc";
// myNav[0].className="";
}
}
}
///点亮按钮结束
}
</script>