var t;
var timer_is_on=0;
var banniere = 0;
var totalBannieres = images.length;

$('document').ready(function ()
	{
		if(totalBannieres > 1)
			{
				verifTimer();
			}
	}
);

function execTimer()
	{
		if(banniere >= totalBannieres - 1 )
			{
				banniere = 0;
			}
		else
			{
				banniere ++;
			}
		switchBannieres(banniere);
	}
	
function switchBannieres(id)
	{
		$('.contentAlaUne > div').fadeOut(500, function()
			{
				$('.contentAlaUne > div').html(images[id]);
				$('.contentAlaUne > div').fadeIn(1000, function()
					{
						t=setTimeout("execTimer()", ROTATION_TIME);
					}
				);
			}	
		);
	}
	
function verifTimer()
	{
		if(!timer_is_on)
			{
				timer_is_on = 1;
				t=setTimeout("execTimer()", ROTATION_TIME);
			}
	}
	

