﻿var Alpha=0;
var ShowMove;
var Runing=0;
function HideAll()
{
	
	Runing=0;
	window.clearInterval(ShowMove);
	document.getElementById("apDiv"+"1").style.display="none";
	//document.getElementById("apDiv"+"1").style.left=(document.body.scrollWidth/2-376)+"px";
	document.getElementById("apDiv"+"2").style.display="none";
	//document.getElementById("apDiv"+"2").style.left=(document.body.scrollWidth/2-269)+"px";
	document.getElementById("apDiv"+"3").style.display="none";
	//document.getElementById("apDiv"+"3").style.left=(document.body.scrollWidth/2-162)+"px";
	document.getElementById("apDiv"+"4").style.display="none";
	//document.getElementById("apDiv"+"4").style.left=(document.body.scrollWidth/2-55)+"px";
	document.getElementById("apDiv"+"5").style.display="none";
	//document.getElementById("apDiv"+"5").style.left=(document.body.scrollWidth/2+159)+"px";
	document.getElementById("apDiv"+"6").style.display="none";
	//document.getElementById("apDiv"+"6").style.left=(document.body.scrollWidth/2+266)+"px";

}
function ShowDiv(i)
{
    
	if (Runing!=i)
	{	
//	alert(i);
		HideAll();
		
		window.clearInterval(ShowMove);
		Runing=i;
		Alpha=0;
		
		document.getElementById("apDiv"+i).style.filter="Alpha(Opacity=0)";
		document.getElementById("apDiv"+i).style.display="";	
		ShowMove=setInterval("Showing("+i+")",50);
		//alert(i);
	}
}
function Showing(i)
{
    
	Alpha+=10;
	
	document.getElementById("apDiv"+i).style.filter="Alpha(Opacity="+Alpha+")";
//	alert("Alpha(Opacity="+Alpha+")");
	if (Alpha>=100)
	{
		window.clearInterval(ShowMove);
		Runing=i;
		//return;
		
	}
//	document.getElementById("img"+i).src="Images/d2_0"+(i+1)+".jpg";
	
}
function OK(i)
{
	document.getElementById("apDiv"+i).style.filter="Alpha(Opacity=100)";
	window.clearInterval(ShowMove);
	Runing=0;
	
//	document.getElementById("img"+i).src="Images/d1_0"+(i+1)+".jpg";
}
