function init(){
$('ballon').observe('click' , function(){

var leftE = parseInt($('content').getStyle('left')) + parseInt($('content').getStyle('width')) - 66;

if($('personage').getStyle('left') == null){
	$('personage').setStyle({
	left : leftE+'px',
	top : '10px'
	});
}


new Effect.Move('personage', {x: 0 , y:-230 , duration : 1.5 ,  mode: 'relative'});

new Effect.Fade('personage' , {duration : 1.5 });
});


if($('gallerie'))
 			$$("#listImage li img").each(function(element ,a ){

				element.observe('click', function(){
					//var reg = new RegExp('img\/'+nom+'\/image([0-9]+).jpg' , "g");	
					index = element.readAttribute('src');

					//index = index.replace(reg , "$1");

					//new Effect.Appear('gallerie' , {duration : 1.0 });
					//$('gallerie').style.visibility = 'visible';							
					//new Effect.Fade('conteneurA' , {duration : 1.0 });					
					$('gallerie').writeAttribute('src', element.readAttribute('src'));
					//$('comment').update(tabNomImage[index]);
					//$('content').style.background = "black url('img/lampeon.png') top center no-repeat";
					//document.body.style.background = "black";
				});
			});	
		
}


var n = 0;
var m = 0;
var p = 0;

var tab_image1 = new Array(4);
for (var i=0; i< tab_image1.length;i++)
    tab_image1[i]= new Image();
	
tab_image1[0].src='img/touillette/A1.JPG';

tab_image1[1].src='img/touillette/B1.JPG';

tab_image1[2].src='img/touillette/C1.JPG';

tab_image1[3].src='img/touillette/D1.JPG';


var tab_image2 = new Array(4);
for (var j=0; j< tab_image2.length;j++)
    tab_image2[j]= new Image();

tab_image2[0].src='img/touillette/A2.JPG';

tab_image2[1].src='img/touillette/B2.JPG';

tab_image2[2].src='img/touillette/C2.JPG';

tab_image2[3].src='img/touillette/D2.JPG';

var tab_image3 = new Array(4);
for (var k=0; k< tab_image3.length;k++)
    tab_image3[k]= new Image();

tab_image3[0].src='img/touillette/A3.JPG';

tab_image3[1].src='img/touillette/B3.JPG';

tab_image3[2].src='img/touillette/C3.JPG';

tab_image3[3].src='img/touillette/D3.JPG';


function change1(image) {

var numimage = $(image) ;
n= n + 1;
if (n == tab_image1.length) n=0;

numimage.src = tab_image1[n].src;
}

function change2(image) {

var numimage = $(image) ;
m= m + 1;
if (m == tab_image2.length) m=0;

numimage.src = tab_image2[m].src;
}
function change3(image) {

var numimage = $(image) ;
p= p + 1;
if (p == tab_image3.length) p=0;

numimage.src = tab_image3[p].src;
}




// function initDessin(){
// window.onload = displayPics;
////Il ne reste plus qu'à appeler notre fonction au chargement de la page
// }


