/*
Mes scripts javascripts IE7 et Firefox/netscape (en fait tout sauf IE6 et moins)
*/

// ouverture du sous-menu avec background image en transparent
// id1=nom du sous-menu à ouvrir 
// id2= nom du menu parent (à coloriser)
function montre(id1, id2) {
var d1 = document.getElementById(id1);
var d2 = document.getElementById(id2);
// en premier on ferme tous les sous-menu extensibles 
for (var i = 1; i<=4; i++) {
	if (document.getElementById('smenu'+i)) {
		document.getElementById('smenu'+i).style.display='none';
		document.getElementById('smenu'+i).style.backgroundImage="" 
		document.getElementById('menu'+i).style.cursor='pointer';
		document.getElementById('menu'+i).style.color='#646567';
		document.getElementById('menu'+i).style.backgroundImage="";
	}
}
if (d1) {d1.style.display='block'; d1.style.background="transparent url(fond/fond_ssmenu.png)";}
if (d2) {
	d2.style.cursor='text'; 
    d2.style.color='#B71720'; 
    d2.style.background="transparent url(fond/fond_menu.png)";
    d2.style.listStyleImage="url(puce/menu_rollover.png)";
}
}

// init du menu: activation du choix correspondant à la page
function initdisplay(id0, id1, id2)
{ 
var d0 = document.getElementById(id0);
var d1 = document.getElementById(id1);
var d2 = document.getElementById(id2);

document.getElementById('main-menu').style.display='none';

for (var i = 1; i<=4; i++) {
	if (document.getElementById('smenu'+i)) {
		document.getElementById('smenu'+i).style.display='none';
		document.getElementById('smenu'+i).style.backgroundImage="" 
		document.getElementById('menu'+i).style.cursor='pointer';
		document.getElementById('menu'+i).style.color='#646567';
		document.getElementById('menu'+i).style.backgroundImage="";
	}
}
// montre(id1, id2);

//document.getElementById('menu1').style.background="transparent url(fond/fond_menu.png)";
//document.getElementById('menu1').style.color = "#B71720";
//document.getElementById('smenu1').style.display='block';
//document.getElementById('smenu1').style.background="transparent url(fond/fond_ssmenu.png)";
// document.getElementById('mon-menu').style.background="url(fond/fond_menu.png)";
if (d0) {
	d0.style.color = "#B71720";
	d0.style.fontWeight="bold";
}

if (d1) {
	d1.style.color = "#B71720";
	d1.style.fontWeight="bold";
	d1.style.display='block'; 
	d1.style.background="transparent url(fond/fond_ssmenu.png)";
}
if (d2) {
	d2.style.background="transparent url(fond/fond_menu.png)";
	d2.style.color = "#B71720";
}

FLIR.replace('div#main-menu h1')
FLIR.replace('div#main-menu h2')

document.getElementById('main-menu').style.display='block';
}

function activmenu(id) {
var d = document.getElementById(id);
if (d) {d.style.textDecoration="underline" ; 
//d.style.fontWeight="normal"; 
}
}

function deactivmenu(id) {
var d = document.getElementById(id);
if (d) {d.style.textDecoration="none" ; 
// d.style.fontWeight="normal"; 
}
}

function  flirinit () {
   FLIR.init();  
   FLIR.replace('div#main-intro h1');
   FLIR.replace('div#main-intro h2');
   FLIR.replace('div#main-intro h3');
   FLIR.replace('div#main-intro h4');
   FLIR.replace('div#main-intro h5');
   FLIR.replace('div#main-intro h2');
   FLIR.replace('div#main-detail h1');
   FLIR.replace('div#main-detail h2');
   FLIR.replace('div#main-detail h3');
   FLIR.replace('div#accueil-intro h1');
   FLIR.replace('div#accueil-detail h1');
}
