var zoom=false;
var tempo=null;       
function afficheZoom(img){
	clearTimeout(tempo);
	temp=document.getElementById('zoom').style.height.match(/^[0-9]+/g);
	h=temp[0]-0;
	if(!zoom && h<360){
		if(h==0){
			document.getElementById('zoom').style.display='block';
			document.getElementById('zoom').style.height='10px';
			document.getElementById('zoom').getElementsByTagName('img')[0].src='galerie-photos/images/book/L/book_'+img+'.jpg';
			setTimeout(afficheZoom,15);
		}
		else if(h<360){
			document.getElementById('zoom').style.height=(h+10)+'px';
			document.getElementById('zoom').style.marginTop='-'+(h+10+116)+'px';
			setTimeout(afficheZoom,15);
		}
	}
	else{	
		zoom=true;
		tempo=setTimeout(masqueZoom,10000);
	}
}
function changeZoom(img){
	if(zoom){
		document.getElementById('zoom').getElementsByTagName('img')[0].src='galerie-photos/images/book/L/book_'+img+'.jpg';
		clearTimeout(tempo);
		tempo=setTimeout(masqueZoom,10000);
	}
}
function masqueZoom(){
	temp=document.getElementById('zoom').style.height.match(/^[0-9]+/g);
	h=temp[0];
	h-=0;
	if(h>0){
		document.getElementById('zoom').style.height=(h-10)+'px';
		document.getElementById('zoom').style.marginTop='-'+(h-10+116)+'px';
		setTimeout(masqueZoom,10);
	}
	else{
		document.getElementById('zoom').style.display='none';
		zoom=false;
	}
}
window.onload=function(){document.getElementById('zoom').style.height=0};