var flag = false;

	var scro = 5;

	function move_up(){

		if(flag==false){

			o = document.getElementById('glissante');

			flag = true;

			z = scro;

			move(o, z);

		}

		return false;

	}

	function move_down(){

		if(flag==false){

			o = document.getElementById('glissante');

			flag = true;

			z = 0-scro

			move(o, z);

		}

		return false;

	}

	function move(o,y){

		z = y + parseInt(o.style.top);

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1500) setTimeout("move(o, x)", 50);

		else flag = false;

	}

	function page_down(){

			o = document.getElementById('glissante');

		z = parseInt(o.style.top)- 250;

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000) setTimeout("move(o, x)", 50);

		else flag = false;

	}

	function page_up(){

			o = document.getElementById('glissante');

		z = 250 + parseInt(o.style.top);

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000) setTimeout("move(o, x)", 50);

		else flag = false;

	}

	function img_zoom(img){

			var tp;

			g = document.getElementById('glissante');

			c = document.getElementById('cache_img');

			document.getElementById('img_tmp').src = img;

			g.style.top = eval("'0px'");

			tp = g.innerHTML;

			g.innerHTML = c.innerHTML;

			c.innerHTML = tp;

	}

	function restaure_glissante(){

			var tp;

			g = document.getElementById('glissante');

			c = document.getElementById('cache_img');

			g.style.top = eval("'0px'");

			tp = c.innerHTML;

			c.innerHTML = g.innerHTML;

			g.innerHTML = tp;

	

	}

	

	



/* flowScroll

********************/

function flowScroll(goLeft){

	var offset = (goLeft)?-5:5;

	var flowCut = document.getElementById("galerieshowroom");

	flowCut.scrollLeft += offset;

}

function initFlowScroll(){

	var flow = document.getElementById("galeriedef");

	if(!flow) return;

	document.getElementById("flechegauche").onmouseover = function(){ scrollDirection = setInterval("flowScroll(true)", 5); };

	document.getElementById("flechedroite").onmouseover = function(){ scrollDirection = setInterval("flowScroll(false)", 5); };

	document.getElementById("flechegauche").onmouseout = function(){ clearInterval(scrollDirection); };

	document.getElementById("flechedroite").onmouseout = function(){ clearInterval(scrollDirection); };

	var items = flow.getElementsByTagName("a");

	flow.style.width = items.length*180 - 20 + "px";

}



/* init

********************/

window.onload = function(){

	initFlowScroll();

};





function move_up2(){

		if(flag==false){

			o = document.getElementById('glissante2');

			flag = true;

			z = scro;

			move(o, z);

		}

		return false;

	}

	function move_down2(){

		if(flag==false){

			o = document.getElementById('glissante2');

			flag = true;

			z = 0-scro

			move(o, z);

		}

		return false;

	}

	function move2(o,y){

		z = y + parseInt(o.style.top);

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000) setTimeout("move2(o, x)", 50);

		else flag = false;

	}

	function page_down2(){

			o = document.getElementById('glissante2');

		z = parseInt(o.style.top)- 250;

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000) setTimeout("move2(o, x)", 50);

		else flag = false;

	}

	function page_up2(){

			o = document.getElementById('glissante2');

		z = 250 + parseInt(o.style.top);

		o.style.top = eval("'"+z+"px'");

		x = y

		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000) setTimeout("move2(o, x)", 50);

		else flag = false;

	}

	function img_zoom2(img){

			var tp;

			g = document.getElementById('glissante2');

			c = document.getElementById('cache_img');

			document.getElementById('img_tmp').src = img;

			g.style.top = eval("'0px'");

			tp = g.innerHTML;

			g.innerHTML = c.innerHTML;

			c.innerHTML = tp;

	}

	function restaure_glissante2(){

			var tp;

			g = document.getElementById('glissante2');

			c = document.getElementById('cache_img');

			g.style.top = eval("'0px'");

			tp = c.innerHTML;

			c.innerHTML = g.innerHTML;

			g.innerHTML = tp;

	

	}
