var page_width=0;
var page_height=0;
var scroll=0;
function init () {
	if(document.layers) {// NS 4 et inf
		document.menu1.onmouseout = function () {
			hide(this.id);
		}
		document.menu2.onmouseout = function () {
			hide(this.id);
		}
		document.menu3.onmouseout = function () {
			hide(this.id);
		}
		document.menu4.onmouseout = function () {
			hide(this.id);
		}
		page_width=innerWidth;
		page_height=innerHeight;
		if (page_height <450)
			{
				document['menu1'].left = 169;
				document['menu1'].top = 89;
				document['menu2'].left = 329;
				document['menu2'].top = 89;
				document['menu3'].left = 522;
				document['menu3'].top = 89;
				document['menu4'].left = 626;
				document['menu4'].top = 89;
			}else{
				document['menu1'].left = (page_width/2-100)-125;
				document['menu1'].top = 89;
				document['menu2'].left = (page_width/2-100)+33
				document['menu2'].top = 89;
				document['menu3'].left = (page_width/2-100)+210;
				document['menu3'].top = 89;
				document['menu4'].left = (page_width/2-100)+337;
				document['menu4'].top = 89;
			}
	}else{
		if(document.all) { // IE 
			page_width=document.body.clientWidth;
			page_height=document.body.clientHeight;
			if (page_width <760)
			{
				document.all['menu1'].style.left = 170;
				document.all['menu1'].style.top = 89;
				document.all['menu2'].style.left = 327;
				document.all['menu2'].style.top = 89;
				document.all['menu3'].style.left =520;
				document.all['menu3'].style.top = 89;
				document.all['menu4'].style.left =624;
				document.all['menu4'].style.top = 89;
			}else{
				document.all['menu1'].style.left = (page_width/2-100)-110;
				document.all['menu1'].style.top = 89;
				document.all['menu2'].style.left = (page_width/2-100)+48;
				document.all['menu2'].style.top = 89;
				document.all['menu3'].style.left = (page_width/2-100)+236;
				document.all['menu3'].style.top = 89;
				document.all['menu4'].style.left = (page_width/2-100)+346;
				document.all['menu4'].style.top = 89;
			}
			
		}else{
			if (document.getElementById){ // NS 6
				page_width=innerWidth;
				page_height=innerHeight;

				if (page_height <450)
					{
				document.getElementById('menu1').style.left = 179;
				document.getElementById('menu1').style.top = 89;
				document.getElementById('menu2').style.left = 329;
				document.getElementById('menu2').style.top = 89;
				document.getElementById('menu3').style.left = 525;
				document.getElementById('menu3').style.top = 89;
				document.getElementById('menu4').style.left = 626;
				document.getElementById('menu4').style.top = 89;
				}
				else {
					document.getElementById('menu1').style.left = (page_width/2-100)-117;
					document.getElementById('menu1').style.top = 89;
					document.getElementById('menu2').style.left = (page_width/2-100)+40;
					document.getElementById('menu2').style.top = 89;
					document.getElementById('menu3').style.left = (page_width/2-100)+230;
					document.getElementById('menu3').style.top = 89;
					document.getElementById('menu4').style.left = (page_width/2-100)+339;
					document.getElementById('menu4').style.top = 89;
				}

			
			}
		}
	}
	
}

// affichage d'un layer
function show(id){
	if (document.layers){// NS 4 et <
		document[id].visibility = 'show';
	}
	if (document.all){// IE
		document.all[id].style.visibility = 'visible';
	}
	if (document.getElementById){
		document.getElementById(id).style.visibility = 'visible';
	}
}
// Permet de cacher les layers
function hide(id){
	if (document.layers){// NS 4 et <
		document[id].visibility = 'hidden';
	}
	if (document.all){// IE
		document.all[id].style.visibility = 'hidden';
	}
	if (document.getElementById){
		document.getElementById(id).style.visibility = 'hidden';
	}
}
var listeVar = false;
function initListe () {//utilisé par pages sur bibendum history
	if(document.layers) {// NS 4 et inf
		page_width=innerWidth;
		page_height=innerHeight;
		if (page_width < 760)
			{
				document['liste'].left = 445;
				document['liste'].top = 166;
			}else{
				document['liste'].left = (page_width/2-100)+151;
				document['liste'].top = 166;
			}
	}else{
		if(document.all) { // IE 
			page_width=document.body.clientWidth;
			page_height=document.body.clientHeight;
			if (page_width <760)
			{
				document.all['liste'].style.left = 445;
				document.all['liste'].style.top = 167;
			}else{
				document.all['liste'].style.left = (page_width/2-100)+164;
				document.all['liste'].style.top = 167;
			}
			
		}else{
			if (document.getElementById){ // NS 6
				page_width=innerWidth;
				page_height=innerHeight;
				if(page_width <760)
					{
				document.getElementById('liste').style.left = 446;
				document.getElementById('liste').style.top = 162;
				}else{
				document.getElementById('liste').style.left = (page_width/2-100)+157;
				document.getElementById('liste').style.top = 162;
				}
			
			}
		}
	}
	
}

// creation d'un nouvelle fonction, car initListe est utilisée par 2 pages 
// qui n'ont pas la liste au même endroit avec NS6
function initListeBibBy () {
	if(document.layers) {// NS 4 et inf
		page_width=innerWidth;
		page_height=innerHeight;
		if (page_width < 760)
			{
				document['liste'].left = 445;
				document['liste'].top = 169;
			}else{
				document['liste'].left = (page_width/2-100)+151;
				document['liste'].top = 166;
			}
	}else{
		if(document.all) { // IE 
			page_width=document.body.clientWidth;
			page_height=document.body.clientHeight;
			if (page_width <760)
			{
				document.all['liste'].style.left = 445;
				document.all['liste'].style.top = 167;
			}else{
				document.all['liste'].style.left = (page_width/2-100)+164;
				document.all['liste'].style.top = 167;
			}
			
		}else{
			if (document.getElementById){ // NS 6
				page_width=innerWidth;
				page_height=innerHeight;
				if(page_width <760)
					{
				document.getElementById('liste').style.left = 446;
				document.getElementById('liste').style.top = 162;
				}else{
				document.getElementById('liste').style.left = (page_width/2-100)+157;
				document.getElementById('liste').style.top = 162;
				}
			
			}
		}
	}
	
}
function initListeHistory () {
	if(document.layers) {// NS 4 et inf
		page_width=innerWidth;
		page_height=innerHeight;
		if (page_width < 760)
			{
				document['liste'].left = 393;
				document['liste'].top = 166;
			}else{
				document['liste'].left = (page_width/2-100)+98;
				document['liste'].top = 161
			}
	}else{
		if(document.all) { // IE 
			page_width=document.body.clientWidth;
			page_height=document.body.clientHeight;
			if (page_width <760)
			{
				document.all['liste'].style.left = 393;
				document.all['liste'].style.top = 162;
			}else{
				document.all['liste'].style.left = (page_width/2-100)+112;
				document.all['liste'].style.top = 162;
			}
			
		}else{
			if (document.getElementById){ // NS 6
				page_width=innerWidth;
				page_height=innerHeight;
				if(page_width <760)
					{
				document.getElementById('liste').style.left = 393;
				document.getElementById('liste').style.top = 157;
				}else{
				document.getElementById('liste').style.left = (page_width/2-99)+104;
				document.getElementById('liste').style.top = 157;
				}
			
			}
		}
	}
	
}