/* 没 */
//////////JavaScript to Flash Function////////////
function getFlashMovieObject(movieName){
	if (window.document[movieName]) {
		return window.document[movieName];
	}
	
	if (navigator.appName.indexOf("Microsoft Internet") == -1) {
		if (document.embeds && document.embeds[movieName])
		return document.embeds[movieName];
	}
	else {
		return document.getElementById(movieName);
	}
}

function SetTab(index){
	if (!index) index = 0;
	getFlashMovieObject("tabFlash").SetFlashTab(index);
}
	
/////////Flash to JavaScript Function ///////////
function ChangeTab(index){
	$(".tabcontent:visible").hide();
	$("#tab" + index).show();
}

////////Tab links cursor effect///////////////////
$(document).ready( function() {
	// 首页Tab Flash 切换效果
	$(".tabcontent a img").hover(
		function() {
			$(this).css("opacity", 0.8);
		},
		function() {
			$(this).css("opacity", 1);
		}
	);
	
	// 保护区域4格效果
	$(".zg-4-left").hover(
		function() {
			$(this).stop().animate({"backgroundColor" : "#71b83f"}, 500);
			$(this).children("span").stop().animate({"color" : "#fff" }, 500);
		},
		function() {
			$(this).stop().animate({"backgroundColor" : "#fff"}, 500);
			$(this).children("span").stop().animate({"color" : "#000" }, 500);
		}
	);
	$(".zg-4-left").click(
		function () {
			document.location.href = $(this).attr("href");
		}
	);
});
/////////News list show or hide ////////////////
var bFirstRemoved = false;
function ShowNews(){
	var b	= $("#btnNewsList");
	var l	= $("#news_list");
	
	if(b.html() == "打开列表"){
		b.html("关闭列表");
		
		if(!bFirstRemoved && l.children("div").length > 0) {
			l.children("div:eq(0)").remove();
			bFirstRemoved = true;
		}
		
		l.show();
	}
	else{
		b.html("打开列表");
		l.hide();
	}
}

