﻿
var InterValObj; //定义定时器
var mycount=1;

//案例详情选项卡
function ShowBannerViewTab(n){
	for(var i=0; i< 4; i++){
		document.getElementById("bannImg"+i).className="none";
		document.getElementById("bannTitile"+i).className=("fp_"+i);
	}
    document.getElementById("bannImg"+n).className="block";
    document.getElementById("bannTitile"+n).className=("fp_"+n+" fp_now");
    window.clearInterval(InterValObj);
}

//自动
function ShowBannerViewTabAuto(n){
	for(var i=0; i< 4; i++){
		document.getElementById("bannImg"+i).className="none";
		document.getElementById("bannTitile"+i).className=("fp_"+i);
	}
    document.getElementById("bannImg"+n).className="block";
    document.getElementById("bannTitile"+n).className=("fp_"+n+" fp_now");
}
function ShowBannerViewTabTime(j){
mycount=j;
InterValObj = window.setInterval(SetRemainTime, 5000); // 间隔函数，1秒执行 
}

//代理 
function SetRemainTime() { 
ShowBannerViewTabAuto(mycount);
mycount++;
if(mycount==4){
mycount=0;
}
}
$(document).ready(function() { 
InterValObj = window.setInterval(SetRemainTime, 5000); // 间隔函数，1秒执行 
});



var InterValObj2; //定义定时器
var mycount2=1;

//案例详情选项卡
function ShowAdViewTab(n){
	for(var i=0; i< 3; i++){
		document.getElementById("rightAdImg"+i).className="none";
		document.getElementById("rightadTitile"+i).className=("");
	}
    document.getElementById("rightAdImg"+n).className="block";
    document.getElementById("rightadTitile"+n).className=("now");
     window.clearInterval(InterValObj2);
}

//自动
function ShowAdViewTabAuto(n){
//	for(var i=0; i< 3; i++){
//		document.getElementById("rightAdImg"+i).className="none";
//		document.getElementById("rightadTitile"+i).className=("");
//	}
//    document.getElementById("rightAdImg"+n).className="block";
//    document.getElementById("rightadTitile"+n).className=("now");
}
function ShowAdViewTabTime(j){
mycount2=j;
InterValObj2 = window.setInterval(SetRemainTime2, 2000); // 间隔函数，1秒执行 
}

//代理 
function SetRemainTime2() { 
ShowAdViewTabAuto(mycount2);
mycount2++;
if(mycount2==3){
mycount2=0;
}
}
$(document).ready(function() { 
InterValObj2 = window.setInterval(SetRemainTime2, 2000); // 间隔函数，1秒执行 
});


//新闻详情选项卡
function ShowNewsViewTab(n){
	for(var i=0; i< 2; i++){
		document.getElementById("tabTitle_xw"+i).className="";
		document.getElementById("tabCon_xw"+i).className="none";
	}
    document.getElementById("tabTitle_xw"+n).className="now";
    document.getElementById("tabCon_xw"+n).className=("xkn_con block");
}



