
var nombreFoto = 0;
var compteurTof = 0 ;
var nombreFotoVerti = 2;
var compteurTofVerti = 0 ;
var timer ;

function apparaitBarre(directionAppa)
{
	//alert('apparition');
	
	if(directionAppa == 'd')
	{
		Dom.setStyle('directionD','opacity',0.5);
		
	}
	else
	{
		Dom.setStyle('directionG','opacity',0.5);
	}
}

function disparaitBarre(directionAppa)
{
			
		if(directionAppa == 'g')
		{
			Dom.setStyle('directionG','opacity',0);
		}
		else 
		{
			Dom.setStyle('directionD','opacity',0);
		}
}

function animPlus()
{
	compteurTof++;
	if(compteurTof < nombreFoto)
	{
		var attributes = {
	        scroll: { to: [350*compteurTof, 0] }
	    };
	    var anim = new YAHOO.util.Scroll('scroller', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
	else
	{
		compteurTof = 0;
		var attributes = {
	        scroll: { to: [0, 0] }
	    };
	    var anim = new YAHOO.util.Scroll('scroller', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
}
function animMoins()
{
	compteurTof--;
	if(compteurTof > 1)
	{
		var attributes = {
			scroll: { to: [350*compteurTof, 0] }
		};
		var anim = new YAHOO.util.Scroll('scroller', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
	else
	{
		compteurTof = nombreFoto;
		var attributes = {
	        scroll: { to: [0, 0] }
	    };
	    var anim = new YAHOO.util.Scroll('scroller', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
}





function animPlusVerti()
{
	
	compteurTofVerti++;
	if(compteurTofVerti < nombreFotoVerti)
	{
		var attributes = {
	        scroll: { to: [0,198*compteurTofVerti] }
	    };
	    var anim = new YAHOO.util.Scroll('fondDiapoVerti', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
	else
	{
		compteurTofVerti = 0;
		var attributes = {
	        scroll: { to: [0, 0] }
	    };
	    var anim = new YAHOO.util.Scroll('fondDiapoVerti', attributes, 1, YAHOO.util.Easing.easeOut);
		anim.animate();
	}
	timer = setTimeout('animPlusVerti()',10000);
}
animPlusVerti();