﻿t_u = null;
t_u_old = null;
maxPic = 3;
showPic = 0;
function switchPic(id)
{
 if(id >= maxPic)
  {showPic = 1;}
 else
  {showPic = showPic + 1;}
	for(i=1; i<=maxPic; i++)
	{
		if(i==id)
			document.getElementById("content_part4_"+i).style.display = "block";
		else
			document.getElementById("content_part4_"+i).style.display = "none";
	}
}
function reSwitchPic()
{ 
 clearTimeout(t_u);
 if(showPic <= 0)
 	{showPic = 1;}
 switchPic(showPic);
 t_u = setTimeout('reSwitchPic();', 2000);
}
//停止滚动
function pauseSwitch()
{ 
 clearTimeout(t_u);
 t_u_old = t_u;
}
function showDivPart4(id)
{
 if(id >= maxPic)
  {showPic = 1;}
 else
  {showPic = showPic + 1;}
	for(i=1;i<=maxPic;i++)
	{
		if(i==id)
			document.getElementById("content_part4_"+i).style.display = "block";
		else
			document.getElementById("content_part4_"+i).style.display = "none";
	}
}
//开始滚动
function goonSwitch()
{
 clearTimeout(t_u);
  if(showPic == "")
 	{showPic = 1;}
 else if(showPic <= 0)
  {showPic = 1;}
 t_u = setTimeout('reSwitchPic();', 2000);
}
