function addCookie(){　 // 加入收藏夹   
    if (document.all){   
        window.external.addFavorite('http://www.gzbjshatu.gov.cn', '金沙县沙土镇人民政府');   
    }else if (window.sidebar){   
        window.sidebar.addPanel('金沙县沙土镇人民政府', 'http://www.gzbjshatu.gov.cn', "");   
    }   
}   
  
function addCookie2(){   
    try{   
        window.external.AddFavorite('http://www.gzbjshatu.gov.cn','金沙县沙土镇人民政府');    
    }catch(e){   
        (window.sidebar)?window.sidebar.addPanel('金沙县沙土镇人民政府','http://www.gzbjshatu.gov.cn',''):alert('请使用按键 Ctrl+d，收藏本站');    
    }   
}   
  
function setHomepage(){　 // 设置首页   
    if (document.all){   
        document.body.style.behavior = 'url(#default#homepage)';   
        document.body.setHomePage('http://www.gzbjshatu.gov.cn');   
    }else if (window.sidebar){   
        if (window.netscape){   
            try {   
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");   
            }catch (e) {   
                alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true");   
            }   
        }   
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);   
        prefs.setCharPref('browser.startup.homepage', 'http://www.gzbjshatu.gov.cn');   
    }   
}    

//--------时间显示

      var week,day,month,year,currenty,currentm
      function initArray(){
      this.length = initArray.arguments.length
      for (var i = 0; i < this.length; i++)
      this[i+1] = initArray.arguments[i]
      } 
      var LastModDate = new Date();
      var WeekArray = new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
      var MonthArray = new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
      day = LastModDate.getDate() +"日";
      year = LastModDate.getFullYear() +"年";
      week = WeekArray[(LastModDate.getDay()+1)];
      month = MonthArray[(LastModDate.getMonth()+1)]; 
      currenty = LastModDate.getFullYear();
      currentm = LastModDate.getMonth()+1;
      function CurentTime(){
      var now = new Date();
      var hh = now.getHours();
      var mm = now.getMinutes();
      var ss = now.getTime() % 60000;
      ss = (ss - (ss % 1000)) / 1000;
      var clock = hh+':';
      if (mm < 10) clock += '0';
      clock += mm+':';
      if (ss < 10) clock += '0';
      clock += ss;
      return(clock); 
      } 
      function refreshCalendarClock(){
      document.getElementById("calendarClock").innerHTML = CurentTime(); 
      }
	  
//切换代码开始------------------------------------------------------------
function ShowTabs(tabTitle,tabContent,tabNo,tabCount,overTabClass,outTabClass){   
    for(i=1;i<=tabCount;i++){   
        if(document.getElementById(tabContent+i) == null)   
            continue;   
        if(i==tabNo){   
            document.getElementById(tabContent+i).style.display='block';   
            document.getElementById(tabTitle+i).className = overTabClass;   
        }   
        else{   
            document.getElementById(tabContent+i).style.display='none';   
            document.getElementById(tabTitle+i).className = outTabClass;   
        }   
    }   
}   
//切换代码结束-----------------------------------------------------------
