 /*------------------------------------------------------*
  *-------FONCTIONS JAVASCRIPT    ----*
  *------------------------------------------------------*/


/*1 Pop Up centrée  (utilisée pour infos légales et pages plans) */

function popup(page,largeur,hauteur,options)
{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


/*2 */

function makevisible(cur,which){
strength=(which==0)? 1 : 0.8

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}


/*3 */

function getTop(MyObject){
if (MyObject.offsetParent)
	return (MyObject.offsetTop + getTop(MyObject.offsetParent));
else
	return (MyObject.offsetTop);
}


var flag = false;
	var scro = 10;
	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
		yTop=o.offsetHeight+getTop(o)-91;
		if(flag == true && parseInt(o.style.top)<=0 && parseInt(o.style.top)>-1000 &&(yTop > 362)) 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;
	
	}
//-->