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

imgUrl[1]="imges/overview.gif"; 
imgUrl[2]="imges/hometour-processes.gif"; 
imgUrl[3]="imges/hometour-services.gif"; 
imgUrl[4]="imges/hometour-tcpip.gif"; 
imgUrl[5]="imges/hometour-shares.gif"; 

var jj=0; 
for (i=1;i<=5;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 <= 5; 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 <= 5; 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";
	}
}

// function homepage_tour_begin()
// {
	adNum =0;
	bloop = true;
	theTimer=setTimeout("nextAd()", 3000); 
// }


