



bAutoSwitch = true;
setTimeout("receiveTimer();",2000);

function receiveTimer()
{
	if (!bAutoSwitch)
		return;
	nextPic(true);

	if (bAutoSwitch)
		setTimeout("receiveTimer();",2000);
}

function setPic(num, bFromAutoSwitch)
{
	if (bFromAutoSwitch != true)
		bAutoSwitch = false;
	document.getElementById('promopic').src = picArray[num];
	currentPic = num;
	
	for (var i = 1; i <= picArray.length; i++ )
	{
			var picButton = document.getElementById("picButton_"+i);
			picButton.src = '/_content/_img/dot_inactive.png';
	}	
	
	num ++;
	var activeButton = document.getElementById("picButton_"+num);
	activeButton.src = '/_content/_img/dot_active.png';
}

function nextPic(bFromAutoSwitch) 
{
	currentPic ++;
	if (currentPic >= picArray.length)
		currentPic = 0;
	setPic(currentPic, bFromAutoSwitch);
}

