var nPics = 7;
var aSlidePicSrc = new Array(nPics);

for (var n = 0; n < nPics; n++) 
{
   aSlidePicSrc[n] = new Array(2);
}

var n = 0;
aSlidePicSrc[n][1] = "/images/flash/slide01.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide02.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide03.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide04.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide05.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide06.jpg";

n++;
aSlidePicSrc[n][1] = "/images/flash/slide07.jpg";


var aSlide = new Array(nPics);
var aPic = new Array(nPics);
var nPicsUBound = nPics - 1;
var nView = -1;
var oAuto;
var sFlipFlopFunct = "auto";
var bFlipFlopAlight = false;
var nStartPic = 0;
var n;

var bAutoOff = false;
if (bAutoOff == null) bAutoOff = true;


for (n = 0; n < nPics; n++)
{
	aSlide[n] = new Image();
}

function Pic(n)
{
	if (aPic[n] == null)
	{
		aPic[n] = new Image();
		aPic[n].src = aSlidePicSrc[n][1];
	}
}	

function LoadFlipFlop(sFunct, bAlight)
{
	var sState = (bAlight) ? "Al" : "";
}

function ShowPic(n)
{
	nView = n;
	Pic(n);

	if (document.getElementById.main) 
	{
	    if (document.main) document.main.filters.blendTrans.Apply();
	    document.main.src = aPic[n].src;
	    if (document.main) document.main.filters.blendTrans.Play();
	}
	else 
	{
	    window.clearTimeout(oAuto);
	}
}

function Stop()
{ 
	window.clearTimeout(oAuto);
	sFlipFlopFunct = "auto";
	ChangeCursor();
	LoadFlipFlop(sFlipFlopFunct, bFlipFlopAlight);	
}

function Auto()
{ 
	if (bAutoOff && nView == nPicsUBound - 1)					
	{								
		sFlipFlopFunct = "auto";
		ChangeCursor();					
		LoadFlipFlop(sFlipFlopFunct, bFlipFlopAlight);		
		ShowPic(nView+1);							
		window.clearTimeout(oAuto);
	}
	else
	{
		if (sFlipFlopFunct == "auto")
		{
			sFlipFlopFunct = "stop";
			ChangeCursor();
			LoadFlipFlop(sFlipFlopFunct, bFlipFlopAlight);
		}
		if (nView == nPicsUBound) ShowPic(0);
		else ShowPic(nView+1);
		oAuto = window.setTimeout("Auto();", 7000);
	}
}

function AutoStop()
{
	if (sFlipFlopFunct == "auto") Auto();
	else Stop();
}

function Pause()
{
}

function ChangeCursor()
{
	if (document.getElementById.main)
	{
		if (sFlipFlopFunct == "stop") document.getElementById("main").style.cursor = "pointer";
		else document.getElementById("main").style.cursor = "default";
	}
}

function Init() 
{
    if (nPics > 0) 
	{
		ShowPic(nStartPic);
		if (nPics > 1) LoadFlipFlop(sFlipFlopFunct, bFlipFlopAlight);
    }
    oAuto = window.setTimeout("Auto();", 3000);
}