function zoom(num){
	cz = $('zoom');
	
	if (document.images["image_zoom"]) document.images["image_zoom"].src = repertoire_images + "/zoom_" + num + ".jpg";
	if (typeof(window['galerie']) != 'undefined'){
		if (galerie=='fiche_identite'){
			if (num>4 && num<10){
				cz.style.top='530px';
			} else {
				cz.style.top='404px';
			}
		}
		if (galerie=='hippodrome'){
			if (num>1 && num<10){
				cz.style.top='530px';
			} else {
				cz.style.top='404px';
			}
		}
		if (galerie=='qualif'){
			if (num>2 && num<10){
				cz.style.top='530px';
			} else {
				cz.style.top='404px';
			}
		}
		if (galerie=='tshirt'){
			if (num>7 && num<13){
				cz.style.top='517px';
			} else {
				cz.style.top='404px';
			}
		}
	}
	new Effect.Appear(cz, {duration:0.4, afterFinish:function(){activeFermer();} });
}
function zoom2(num){
	cz = $('zoom');
	fermeZoom();
	zoom(num);
}
function fermeZoom(){
	new Effect.Fade(cz, {duration:0.4 , afterFinish:function(){document.images["image_zoom"].src=''; } })
	stopFermer();
}
function activeFermer(){
	Event.observe(document,'click',fermeZoom);
}
function stopFermer(){
	Event.stopObserving(document, 'click',fermeZoom); 
}


function affiche(num){
	cz = $('zoomAff');
	
	if (document.images["image_zoomAff"]) document.images["image_zoomAff"].src = '../../img/' + "zoomAff_" + num + ".jpg";
	if (typeof(window['galerie']) != 'undefined'){
	}
	new Effect.Appear(cz, {duration:0.4, afterFinish:function(){activeFermer();} });
}
function fermeZoomAff(){
	new Effect.Fade(cz, {duration:0.4 , afterFinish:function(){document.images["image_zoomAff"].src=''; } })
	stopFermer();
}
function activeFermerAff(){
	Event.observe(document,'click',fermeZoom);
}
function stopFermerAff(){
	Event.stopObserving(document, 'click',fermeZoom); 
}
