
banners = new Array ()
Indice  = 0
Dt_Inicial = new Date ()
Dt_Inicial_Sec = Dt_Inicial.getTime ()

function adiciona_figura (Indice, Arquivo, Caixinha, Parametros)
{
	this.Indice = Indice
	this.Arquivo = Arquivo
	this.Caixinha = Caixinha
	this.Parametros = Parametros
}

function roda_banners (Tempo)
{

	// setTimeout ( 'window.document.banner.src = "' + banners[Indice].Arquivo + '"' , Tempo )
	
	Dt_Agora = new Date ()
	Dt_Agora_Sec = Dt_Agora.getTime ()
	
	if (Dt_Agora_Sec >= (Dt_Inicial_Sec + Tempo) )
	{
		if ( Indice < banners.length - 1)
		{	Indice = Indice + 1		}
		else
		{	Indice = 0	}
		
		window.document.banner.src = banners[Indice].Arquivo 
		
		Dt_Inicial = new Date ()
		Dt_Inicial_Sec = Dt_Inicial.getTime ()		
	}
	
	setTimeout( "roda_banners (" + Tempo + ")", Tempo )
}

function abre ( Indice_Abre )
{
	if ( banners[Indice_Abre].Caixinha != "#")
	{
	    if ( banners[Indice_Abre].Parametros != "#" )
		{
			wind = window.open ( banners[Indice_Abre].Caixinha , 'Wind',  banners[Indice_Abre].Parametros )
		}
		else
		{
			top.location.href = banners[Indice_Abre].Caixinha
		}
	}

}

banners[0] = new adiciona_figura (0, 'img/b1.gif','samsung.cfm','#')
banners[1] = new adiciona_figura (1, 'img/b2.gif','condutti.cfm','#')
banners[2] = new adiciona_figura (2, 'img/b5.gif','pelco.cfm','#')
banners[3] = new adiciona_figura (3, 'img/b6.gif','nvt.cfm','#') 
banners[4] = new adiciona_figura (4, 'img/b8.gif','bosch.cfm','#')
banners[5] = new adiciona_figura (5, 'img/b9.gif','tecvoz.cfm','#') 
banners[6] = new adiciona_figura (6, 'img/b14.gif','geovision.cfm','#')
banners[7] = new adiciona_figura (7, 'img/b13.gif','morey.cfm','#')
banners[8] = new adiciona_figura (8, 'img/b16.gif','intelbras.cfm','#')
