//Ext.onReady(function(e){
// Initialisation
var slider = "";
function Diaporama(id) {
	// Configuration
	//ScaleRatioUp = 110; // Grossissement de l'aperçu (%)
	
	// Initialisation
	//	ImgCurrent = 0;
	//	ImgCurrentNew = 0;
	//ScaleRatioDown = eval(eval(100/ScaleRatioUp)*100);
  	//ScaleThem(Imgs[ImgCurrentNew], Imgs[ImgCurrent]);
	//ImgCurrent = ImgCurrentNew;
	ImgCurrent = id;
	ImgCurrentNew = id;
	Imgs = document.getElementById("defilement").getElementsByTagName("img");
	ShowIt(ImgCurrent);
}

// Affichage en grand format de l'image
function ShowIt(Id) {
	ImgCurrent = Id;
	document.getElementById('grand_format').src = Imgs[Id].src;
}

// Focus sur une image
function FocusIt(Id) {
	if(typeof(ImgCurrent)=='undefined'){
		Diaporama(Id);	
	}else{
		Imgs = document.getElementById("defilement").getElementsByTagName("img");
		ImgCurrentNew = Id;
		if(ImgCurrent != ImgCurrentNew)
		{
		//	ScaleThem(Imgs[ImgCurrentNew], Imgs[ImgCurrent]);
			ImgCurrent = ImgCurrentNew;
			ShowIt(ImgCurrent);
   		}
	}
}


// FONCTION INUTILE sauf si effet de grossisement.
// Image Précédente

// Mises à echelle
function ScaleThem(Up, Down) {
	if(Down.id == Up.id)
		{
		ScaleIt(Up.id, ScaleRatioUp);
		}
	else
		{
		ScaleIt(Down.id, ScaleRatioDown);
		ScaleIt(Up.id, ScaleRatioUp);
		}
}

// Effets Script.aculo.us
function ScaleIt(Id, Size)	{
	new Effect.Scale(Id, Size, { duration: 0.3, queue:'end' } );
}


//});