﻿// JScript 文件
    var strNavSelected;
    function changeImg(id,url){
        document.getElementById(id).src = url;
    }
    function isShow(id){
        if(document.getElementById('ac_'+id).style.display == 'block'){
            document.getElementById('ac_'+id).style.display = 'none';
            document.getElementById('img_'+id).src = 'image/open.gif';
            document.getElementById('img_'+id).alt = '点击展开';
            }
        else{
            document.getElementById('ac_'+id).style.display = 'block';
            document.getElementById('img_'+id).src = 'image/close.gif';
            document.getElementById('img_'+id).alt = '点击折叠';
            }
    }
    function isShowAll(isShow,strId,strNo){
        var i;
        if(isShow)
            for(i=1;i<=strNo;i++)
                document.getElementById(strId+i).style.display = 'block';
        else
            for(i=1;i<=strNo;i++)
                document.getElementById(strId+i).style.display = 'none';
    }
    //点击后设置
    function setNavItem(id){
        strNavSelected = id;
        document.getElementById('a_'+id).src = '/image/'+id+'_mouseout.gif';
    }
    //鼠标离开后激发
    function getNavByItem(id){
        if(id==strNavSelected)
            return '/image/'+id+'_mouseout.gif';
        else
            return '/image/'+id+'_nosel.gif';
    }
    
    document.onreadystatechange=function(){
        if(document.readyState=="complete"){
            if(strNavSelected != undefined)  //把这里改为!=且注释下行，用于不在五个栏目的页面时，不显示选中某一项
                //strNavSelected = 'blog';
                setNavItem(strNavSelected);
        }
    }