// JavaScript Document
var imgUrl=new Array(); 
var adNum=1; 
var it=1; 
var bloop = true;

imgUrl[1]="../imges/tour-clock.gif"; 
imgUrl[2]="../imges/tour-countdown.jpg"; 
imgUrl[3]="../imges/tour-draw.gif"; 
imgUrl[4]="../imges/tour-screen-draw.jpg"; 
imgUrl[5]="../imges/tour-spotlight.jpg"; 
imgUrl[6]="../imges/tour-electronic-board.gif"; 
imgUrl[7]="../imges/tour_music.jpg"; 

var jj=0; 
for (i=1;i<=7;i++) 
{ 
	if( (imgUrl[i]!="") ) 
	{ 
		jj++; 
	} 
	else 
	{  
		break; 
	} 
} 

function nextAd()
{ 
try
{
if (!bloop)
return;

if(adNum<jj)adNum++ ; 
else adNum=1; 


document.images.imgInit.src=imgUrl[adNum]; 
document.getElementById('homepage-tour-text').innerHTML =  document.getElementById('homepage-tour-'+adNum).title;
for (i = 1; i <= 7; i++)
{
document.getElementById('homepage-tour-' + i).className = '';
}
document.getElementById('homepage-tour-' + adNum).className ='active';

}
catch(e) 
{
}
theTimer=setTimeout("nextAd()", 2000); 
} 

function homepage_tour_set(index)
{
adNum = index;
if (bloop) 
{
	homepage_tour_toggleplay();
}

document.images.imgInit.src=imgUrl[adNum]; 
document.getElementById('homepage-tour-text').innerText = document.getElementById('homepage-tour-'+adNum).title;

for (i = 1; i <= 7; i++)
{
document.getElementById('homepage-tour-' + i).className = '';
}
document.getElementById('homepage-tour-' + adNum).className ='active';

}

function homepage_tour_toggleplay()
{
	bloop = !bloop;
	if (bloop)
	{
		theTimer=setTimeout("nextAd()", 2000); 
		document.getElementById('homepage-tour-control').src = "../imges/pause.png";
	}
	else
	{
		document.getElementById('homepage-tour-control').src = "../imges/play.png";
	}
}

adNum =0;
bloop = true;
theTimer=setTimeout("nextAd()", 2000); 
// document.getElementById('homepage-tour-control').src = "../imges/pause.png";



