// From http://www.badboy.ro/

function slideShow(no, blocVisuel, largeurBloc, Vitesse, Orientation) {
	// Supression du style "active" du lien précédent
	laListe = $('slide' + blocVisuel);
	
	if(laListe.getStyle('marginLeft') != 0) {
		var x = parseInt(laListe.getStyle('marginLeft').replace(/px/g, "")); 
		x = -x;
	}
	else {
		var x = laListe.getStyle('marginLeft');
	}
	--no;
	
	var newx = no * largeurBloc;
	
	slideIt(x, newx, blocVisuel, Vitesse);
}

function slideIt(x, newx, blocVisuel, Vitesse) { //inspired by Jeremy Keith - www.adactio.com
	if (newx > x) {
		x += Math.ceil((newx-x)/2);
	}
	else if (newx < x) {
		x += Math.floor((newx-x)/2);
	}
	else if (newx == x) {
		return true;
	}
	nouvelleMargin = -x + 'px';
	$('slide' + blocVisuel).setStyle({marginLeft : nouvelleMargin});
	var time = setTimeout("slideIt("+x+", "+newx+", '"+blocVisuel+"', "+Vitesse+")", Vitesse);
}
