<!--

// Rollovers
//**********
var var1="",var2="";

function on(par1,par2,par3,par4){
//******************************
if(document.images){off(); var1=par1; var2=par3;document.images[par1].src=par2;}
status=par4; return true;}

function off()
//************
{
if(var1!=""){status=" ";if(document.images)
{document.images[var1].src=var2;var1="";var2="";}}return true;}

// Préchargement
//**************
if(document.images)
  {
  (new Image()).src="img/fleche_haut_1.gif";
  (new Image()).src="img/fleche_bas_1.gif";
   (new Image()).src="img/fleche_haut_vide.gif";
  (new Image()).src="img/fleche_bas_vide.gif";
  }
 
 // Cookies
//*********
var exp = new Date();
exp.setTime(exp.getTime() + (1*60*60*1000)); // durée de vie = 1 H 

function getCookieVal (offset) { 
var endstr = document.cookie.indexOf (";", offset); 
if (endstr == -1) 
	endstr = document.cookie.length; 
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
	return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}

function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
 
//*****************************  
function repositionner_Layers()
//*****************************
	{
	// Largeur
	//........
	if (document.body.clientWidth > 990)
		{
		for(k = 1; k < 100; k++) // k < 100 pour ne pas mettre un while !! // from 1 !!
			{
			var Layer = 'Layer' + k;
			
			if (!document.getElementById(Layer))
				break;			
				
			document.getElementById(Layer).style.left = ((document.body.clientWidth - 990)/2 + 176) + 'px';
			}			
		}
	
	// Hauteur
	//........
	if (document.body.clientHeight > 595)
		{
		for(k = 1; k < 100; k++) // k < 100 pour ne pas mettre un while !! // from 1 !!
			{
			var Layer = 'Layer' + k;
			
			if (!document.getElementById(Layer))
				break;			
			
			if (k <= 5) // test : cf pages produits !!! // => pas les layers invisibles !!!
				{
				top_valeur = (143 + (k-1)*68); // cf pages produits !!!
				
				document.getElementById(Layer).style.top = ((document.body.clientHeight - 595)/2 + top_valeur) + 'px';
				}
			}
		}
		
	// Layerdoc
	//.........
	positionner_Layerdoc();
	}		
	
//*****************************  
function positionner_Layerdoc() //  + volutes 
//*****************************
	{
	/*largeur_volutes = 91;
	
	// Volutes Largeur
	//....................
	if (document.body.clientWidth > 1160) // 2eme test : le layer Volutes n'est pas mis au départ si l'écran est petit
		{
		document.getElementById('Volutes').style.top = '0px'; // remis en haut de l'écran
		document.getElementById('Volutes').style.left = (document.body.clientWidth - 91) + 'px';
		}
	else // remise à 0
		{
		document.getElementById('Volutes').style.top = '-1001px'; 
		document.getElementById('Volutes').style.left = '900px';		
		}*/
		
	//  Layer doc
	//...........
	if (document.getElementById('Layerdoc')) // " 1 question , 1 documentation ?" 
		{
		if (document.body.clientWidth > 990)
			document.getElementById('Layerdoc').style.left = ((document.body.clientWidth - 990)/2 + 510) + 'px'; 		
		
		if (document.body.clientHeight > 595)
			document.getElementById('Layerdoc').style.top = ((document.body.clientHeight - 595)/2 + 513) + 'px';					
		}	
	}			
	
//**************************	
function deplacer(touche_bas)
//**************************
	{
	//  recherche du 1er Layer visible et du nb de Layers
	//..................................................
	nb_layers = 0;
	numero_Layer_haut = 1; // par défaut
	numero_Layer_haut_trouve = false; // utilitaire
	
	for(k = 1; k < 100; k++) // k < 100 pour ne pas mettre un while !! // from 1 !!
			{
			Layer = 'Layer' + k;
			
			if (!document.getElementById(Layer)) // fin du comptage
				break;			
			
			if (numero_Layer_haut_trouve == false && document.getElementById(Layer).style.top != "-100px") // 1er visible
				{					
				numero_Layer_haut = k;				
				numero_Layer_haut_trouve = true; // ok fini pour ça
				}
			
			nb_layers++;			
			}
		
	// Positionnement : clic sur touche bas
	//......................................			
	if (touche_bas == 1 &&  nb_layers >= (numero_Layer_haut + 5)) // => on remonte les images !!!!! //  2eme test : test de pertinence
		{			
		for(i = 1; i <= nb_layers; i++) //  action sur tous les layers
			{
			Layer = 'Layer' + i;
									
			if (i > numero_Layer_haut && i <= (numero_Layer_haut + 5))
				{
				pos_top = (143 + (i-numero_Layer_haut-1)*68); 
				
				if (document.body.clientHeight > 595) // recentrage eh hauteur 
					pos_top = (document.body.clientHeight - 595)/2 + pos_top;
									
				document.getElementById(Layer).style.top = pos_top + 'px';		
				}
				
			else document.getElementById(Layer).style.top = "-100px"; // tout est caché en haut
			}
		
		if (nb_layers < (numero_Layer_haut + 6))
			document.images['bas'].src="img/fleche_bas_vide.gif"; // Modification de l'image du bouton s'il devient inactif
			
		else document.images['bas'].src="img/fleche_bas.gif"; // bouton normal	
		
		document.images['haut'].src="img/fleche_haut.gif"; // bouton normal pour le haut tjs
		}	
		
	// Positionnement : clic sur touche haut
	//......................................			
	if (touche_bas == 0 &&  numero_Layer_haut >= 2) // => on descend les images !!!!! //  2eme test : test de pertinence
		{			
		for(i = 1; i <= nb_layers; i++) //  action sur tous les layers
			{
			Layer = 'Layer' + i;
									
			if (i >= (numero_Layer_haut -1) && i <= (numero_Layer_haut + 3))
				{
				pos_top = (143 + (i- numero_Layer_haut + 1)*68);
				
				if (document.body.clientHeight > 595) // recentrage eh hauteur 
					pos_top = (document.body.clientHeight - 595)/2 + pos_top;
								
				document.getElementById(Layer).style.top = pos_top + 'px';		
				}
				
			else document.getElementById(Layer).style.top = "-100px"; // tout est caché en haut
			}
		
		if (numero_Layer_haut == 2)
			document.images['haut'].src="img/fleche_haut_vide.gif"; // Modification de l'image du bouton s'il devient inactif
			
		else document.images['haut'].src="img/fleche_haut.gif"; // bouton normal
		
		document.images['bas'].src="img/fleche_bas.gif"; // bouton normal pour le bas tjs
		}			
	}

//*****************************  
function scroll_welcome()
//*****************************
	{
	document.getElementById('intro').scrollTop= 700;
	}

//-->