function showtab(m,n,count){
 var strPic1;
 var strPic2;
 var tdcolor;
 var strPic3
 

 
 if(m==1){
  for(var i=1;i<=count;i++){
  if (i==n){   
   getObject('td_'+m+'_'+i).className = 'ind_wzdh_bq1';
   getObject('tab_'+m+'_'+i).style.display='';
   }
  else {
   getObject('td_'+m+'_'+i).className = 'ind_wzdh_bq2';
   getObject('tab_'+m+'_'+i).style.display='none';
   }
 }
 }
 if(m==2){
  for(var i=1;i<=count;i++){
  if (i==n){   
   getObject('td_'+m+'_'+i).className = '';
   getObject('s_'+m+'_'+i).className = 'or';
   getObject('tab_'+m+'_'+i).style.display='';
   }
  else {
   getObject('td_'+m+'_'+i).className = '';
   getObject('s_'+m+'_'+i).className = '';
   getObject('tab_'+m+'_'+i).style.display='none';
   }
 }
 } 
}
function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
 // W3C DOM
 return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
 // MSIE 4 DOM
 return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
 // NN 4 DOM.. note: this won't find nested layers
 return document.layers[objectId];
    } else {
 return false;
    }
} // getObject


//公告通知——定时切换
var count=5;
var x=1;
function selectTag(selfObj,showContent){                              
	zhuan();
	for(i=1; i<=count; i++){
	document.getElementById("s_2_"+i).className = "";
	}
	document.getElementById(selfObj).className = "or";
	for(i=1; i<=count; i++){
		document.getElementById("tab_2_"+i).style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
	x=parseInt(selfObj.substr(4,1));
}

function scrollTag(){
	if(x<count){
		x=x+1
	}else{
	x=1;
	}
	for(i=1; i<=count; i++){
	document.getElementById("s_2_"+i).className = "";
	}
	document.getElementById("s_2_"+x).className = "or";
	for(i=1; i<=count; i++){
		document.getElementById("tab_2_"+i).style.display = "none";
	}
	document.getElementById("tab_2_"+x).style.display="block";
}
var scrolll=setInterval(scrollTag,5000);
function zhuan(){
   clearInterval(scrolll);
}
function jixu(){
   scrolll=setInterval(scrollTag,5000);
}
//文件_定时切换
var wj_count=7;
var wj_x=1;
function wj_selectTag(wj_showContent,wj_selfObj){ 

	wj_zhuan();
	for(i=1; i<=wj_count; i++){
	document.getElementById("td_wj_tag"+i).className = "ind_bq1_gm";
	}
	document.getElementById(wj_selfObj).className = "ind_bq1_ym";
	for(i=1; i<=wj_count; i++){
		document.getElementById("table_wj"+i).style.display = "none";
	}
	document.getElementById(wj_showContent).style.display = "block";
	wj_x=parseInt(wj_selfObj.substr(9,1));
	
}

function wj_scrollTag(){
	if(wj_x<wj_count){
		wj_x=wj_x+1
	}else{
	wj_x=1;
	}
	for(j=1; j<=wj_count; j++){
	document.getElementById("td_wj_tag"+j).className = "ind_bq1_gm";
	}
	document.getElementById("td_wj_tag"+wj_x).className = "ind_bq1_ym";
	for(j=1; j<=wj_count; j++){
		document.getElementById("table_wj"+j).style.display = "none";
	}
	document.getElementById("table_wj"+wj_x).style.display="block";
}
var wj_scrolll=setInterval(wj_scrollTag,5000);
function wj_zhuan(){
   clearInterval(wj_scrolll);
}
function wj_jixu(){
   wj_scrolll=setInterval(wj_scrollTag,5000);
}


//文章_定时切换
var ph_count=3;
var ph_x=1;
function ph_selectTag(ph_showContent,ph_selfObj){ 

	ph_zhuan();
	for(i=1; i<=ph_count; i++){
	document.getElementById("s_ph"+i).className = "";
	}
	document.getElementById(ph_selfObj).className = "tor";
	for(i=1; i<=ph_count; i++){
		document.getElementById("t_ph"+i).style.display = "none";
	}
	document.getElementById(ph_showContent).style.display = "block";
	  ph_x=parseInt(ph_selfObj.substr(4,1));
	  
  }
  
function ph_scrollTag(){
	  if(ph_x<ph_count){
		  ph_x=ph_x+1
	  }else{
	  ph_x=1;
	  }
	  for(j=1; j<=ph_count; j++){
	  document.getElementById("s_ph"+j).className = "";
	  }
	  document.getElementById("s_ph"+ph_x).className = "tor";
	  for(j=1; j<=ph_count; j++){
		  document.getElementById("t_ph"+j).style.display = "none";
	  }
	  document.getElementById("t_ph"+ph_x).style.display="block";
  }
  var ph_scrolll=setInterval(ph_scrollTag,5000);
  function ph_zhuan(){
	 clearInterval(ph_scrolll);
  }
  function ph_jixu(){
	 ph_scrolll=setInterval(ph_scrollTag,5000);
  } 




//首页上下滚动
//上下滚动开始
function ScrollText(content,btnPrevious,btnNext,autoStart,timeout,isSmoothScroll)
{
    this.Speed = 10;
    this.Timeout = timeout;
	this.stopscroll =false;//是否停止滚动的标志位
	this.isSmoothScroll= isSmoothScroll;//是否平滑连续滚动
    this.LineHeight = 20;//默认高度。可以在外部根据需要设置
    this.NextButton = this.$(btnNext);
    this.PreviousButton = this.$(btnPrevious);
    this.ScrollContent = this.$(content);
    this.ScrollContent.innerHTML += this.ScrollContent.innerHTML;//为了平滑滚动再加一遍
 
	if(this.PreviousButton)
 
	{
		this.PreviousButton.onclick = this.GetFunction(this,"Previous"); 
		this.PreviousButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.PreviousButton.onmouseout = this.GetFunction(this,"MouseOut");
	}
	if(this.NextButton){
		this.NextButton.onclick = this.GetFunction(this,"Next");
		this.NextButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.NextButton.onmouseout = this.GetFunction(this,"MouseOut");
    }
    this.ScrollContent.onmouseover = this.GetFunction(this,"MouseOver");
    this.ScrollContent.onmouseout = this.GetFunction(this,"MouseOut");
 
    if(autoStart)
    {
        this.Start();
    }
}
 
ScrollText.prototype = {
 
	$:function(element)
	{
		return document.getElementById(element);
	},
	Previous:function()
	{
		this.stopscroll = true;
		this.Scroll("up");
	},
	Next:function()
	{
		this.stopscroll = true;
		this.Scroll("down");
	},
	Start:function()
	{
		if(this.isSmoothScroll)
		{
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"SmoothScroll"), this.Timeout);
		}
		else
		{		
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	Stop:function()
	{
		clearTimeout(this.AutoScrollTimer);
		this.DelayTimerStop = 0;
	},
	MouseOver:function()
	{	
		this.stopscroll = true;
	},
	MouseOut:function()
	{
		this.stopscroll = false;
	},
	AutoScroll:function()
	{
		if(this.stopscroll) 
		{
			return;
		}
		this.ScrollContent.scrollTop++;
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
		{
			this.ScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Speed);
		}
		else
		{
			if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
			{
				this.ScrollContent.scrollTop = 0;
			}
			clearTimeout(this.ScrollTimer);
			//this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	SmoothScroll:function()
	{
		if(this.stopscroll) 
		{
			return;
		}
		this.ScrollContent.scrollTop++;
		if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
		{
			this.ScrollContent.scrollTop = 0;
		}
	},
	Scroll:function(direction)
	{
 
		if(direction=="up")
		{
			this.ScrollContent.scrollTop--;
		}
		else
		{
			this.ScrollContent.scrollTop++;
		}
 
		if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
		{
			this.ScrollContent.scrollTop = 0;
		}
		else if(parseInt(this.ScrollContent.scrollTop)<=0)
		{
			this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2;
		}
		
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
		{
			this.ScrollTimer = setTimeout(this.GetFunction(this,"Scroll",direction), this.Speed);
		}
	},
	GetFunction:function(variable,method,param)
	{
		return function()
		{
			variable[method](param);
		}
	}
}
 
function ignoreError() {
  return true;
}
window.onerror = ignoreError; 
//上下滚动结束

