﻿// JavaScript Document
function AddFavorite(sURL, sTitle)
{
 try
 {
  window.external.addFavorite(sURL, sTitle);
 }
 catch (e)
 {
  try
  {
   window.sidebar.addPanel(sTitle, sURL, "");
  }
  catch (e)
  {
   alert("加入收藏失败，请使用Ctrl+D进行添加");
  }
 }
}
function SetHome(obj,vrl){
  try{
    obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
  }
  catch(e){
    if(window.netscape) {
      try {
        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
      }
      catch (e) {
        alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
      }
      var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
      prefs.setCharPref('browser.startup.homepage',vrl);
     }
  }
}
function loadcode(){
  var obj=document.getElementById("verfycode");
  obj.src="../Include/VerifyCode.asp";	 
}
function change(){
if($i==3){
$i=0;
}
$j=$i;
$(".num a").eq($j).attr("class","num_on").siblings().removeClass("num_on");
$(".pic a").eq($j).fadeIn(1000);
$(".pic a").eq($j).siblings().css("display","none");
$i=$i+1;
}
$(function(){
$i=0;
change();
$set=setInterval("change()",4000);
$(".num a").click(function(){
clearInterval($set);
$i=$(".num a").index(this);
change();
$set=setInterval("change()",4000);
})
$(".menu a").hover(function(){
$index=$(".menu a").index(this)+1;
if($(".nav_"+$index).length==1){
$(".nav_next").css("display","block");
$(".nav_"+$index).css("display","block").siblings().css("display","none");
$(this).addClass("hover");
}
else{
$(".nav_next ul").css("display","none");
$(".nav_next").css("display","none");
}
},
function(){
$index=$(".menu a").index(this)+1;
$(this).removeClass("hover");
$(".nav_next").css("display","none");
if($(".nav_"+$index).length==1){
$(".nav_"+$index).css("display","none");
$(".nav_"+$index).hover(function(){
$(".nav_next").css("display","block");
$(this).css("display","block");
$(".menu a").eq($index-1).addClass("hover");
},
function(){
$(this).css("display","none");
$(".nav_next").css("display","none");
$(".menu a").eq($index-1).removeClass("hover");
})
}
})
$(".news_front").eq(0).css("display","block");
$(".news_nav a").hover(function(){
$index=$(".news_nav a").index(this);
$(this).addClass("news_home").end();
$(this).siblings().removeClass("news_home");
$(".news_front").eq($index).css("display","block");
$(".news_front").eq($index).siblings(".news_front").css("display","none");
},
function(){
})
$(".more_web a").hover(function(){
$(".web_list").slideDown("slow");
},
function(){
$(".web_list").hover(function(){
$(this).slideDown(500);
},function(){
$(this).slideUp(500);
});
})
})
document.onclick = function(){
$(".web_list").slideUp(500);
}
