/*-----------------------------------------------------------*/		
function banner_start()
{
	banner_u();banner_dos();
}
/*-----------------------------------------------------------*/		
function banner_u()
{
	var delay=5000;
	bannerIndx = rota_imatge('banner_1',bannerImg,bannerIndx,2);
	setTimeout("banner_dos()",delay);
	setTimeout("banner_u()",delay*2);
}
/*-----------------------------------------------------------*/		
function banner_dos()
{
	bannerIndx = rota_imatge('banner_2',bannerImg,bannerIndx,2);
}
/*-----------------------------------------------------------*/
// Rotador generic d'imatges.
function rota_imatge(id_imatge,vector_imatges,punter_imatges,duracio_transicio)
{
	// Probem de canviar la imatge fent un fade.			
	try 
	{
		with (document.getElementById(id_imatge))			
		{
			style.filter='blendTrans(duration='+duracio_transicio+')';
			filters.blendTrans.Apply();
			src=vector_imatges[punter_imatges];
			filters.blendTrans.Play();
		}
	}
	// Si el fade falla, ho fem amb el métode normal i corrent.
	catch(e)
	{
		try {document.getElementById(id_imatge).src=vector_imatges[punter_imatges];} catch (e){}
	}

	// Avancem el punter de les imatges
	punter_imatges++;
			
	// Si arribem a l'ultima foto del banner, resetejem.
	if (punter_imatges>=vector_imatges.length){punter_imatges=0;}
	
	// Retornem la posició actual del vector.
	return punter_imatges;
}
/*-----------------------------------------------------------*/