var M0_titre = "M_spectacles";
var M1_titre = "M_infos";
var M2_titre = "M_partenaires";
var M3_titre = "M_pro";
var M4_titre = "M_devenez";
var e1_titre = "M_e1";
var e2_titre = "M_e2";
var e3_titre = "M_e3";
var e4_titre = "M_e4";
// VARIABLES GLOBALES
// Largeur de la fenetre
var winWidth;
// Largeur des elts du menu
var accW = 185;
var imW = 185;
var specW = 185;
var mulW = 185;
var hypW = 185;
var e1W = 15;
var e2W = 15;
var e3W = 15;
var e4W = 15;
var totalW = accW+imW+specW+mulW+hypW+e1W+e2W+e3W+e4W;
// Position en X des elts du menu
var accX;
var imX;
var specX;
var mulX;
var hypX;
var e1X;
var e2X;
var e3X;
var e4X;
// Couleur du fond
var bgColor = "#EEEEEE";
// Couleur des cases du menu onMouseOn
var colorMenu = "#777777";
// Couleur des cases du menu onMouseOut
var colorMenuOut = "#FFFFFF";
// Couleur des tableaux
var colorMenuBorder = "#AA0000";
// INITIALISER LA PAGE
function init()
{
initValues();
displayMenu();
initMenu();
}
// INITIALISER LES VALEURS
function initValues()
{
winWidth = document.body.clientWidth;
// Position en X des elts du menu
accX = winWidth/2 - totalW/2;
e1X = accX+accW+1;
imX = e1X+e1W-1;
e2X = imX+imW;
specX = e2X+e2W-1;
e3X = specX+specW;
mulX = e3X+e3W-1;
e4X = mulX+mulW;
hypX = e4X+e4W-1;
}
// INIT MENU : cache les sous menu
function initMenu()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU01.style.visibility='hidden';
document.all.ID_MENU11.style.visibility='hidden';
document.all.ID_MENU21.style.visibility='hidden';
document.all.ID_MENU31.style.visibility='hidden';
document.all.ID_MENU41.style.visibility='hidden';
// document.all.ID_MENU51.style.visibility='hidden';
}
else
{
document.getElementById('ID_MENU01').style.visibility='hidden';
document.getElementById('ID_MENU11').style.visibility='hidden';
document.getElementById('ID_MENU31').style.visibility='hidden';
document.getElementById('ID_MENU21').style.visibility='hidden';
document.getElementById('ID_MENU41').style.visibility='hidden';
// document.getElementById('ID_MENU51').style.visibility='hidden';
}
}
// DESSIN DU MENU
function displayMenu()
{
var wtext = "";
// MENU PRINCIPAL
wtext += "
";
wtext += "";
wtext += "
";
wtext += " ";
wtext += " | ";
wtext += "
";
wtext += "
";
wtext += "
";
wtext += " ";
wtext += "";
wtext += "
";
wtext += " ";
wtext += " | ";
wtext += "
";
wtext += "
";
wtext += "
";
wtext += " ";
wtext += "";
wtext += "
";
wtext += " ";
wtext += " | ";
wtext += "
";
wtext += "
";
wtext += "
";
wtext += " ";
wtext += "";
wtext += "
";
wtext += " ";
wtext += " | ";
wtext += "
";
wtext += "
";
wtext += "
";
wtext += " ";
//
wtext += " ";
//
wtext += " ";
//
wtext += " ";
//
wtext += " ";
//
wtext += " ";
wtext += "
";
//
//document.write(wtext);
document.getElementById('wmenu').innerHTML = wtext;
}
function displayMenu01()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU01.style.visibility='visible';
}
else
{
document.getElementById('ID_MENU01').style.visibility='visible';
}
changeClass("M_spectacles",document.getElementById('I_saison')) ;
}
function hideMenu01()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU01.style.visibility='hidden';
}
else
{
document.getElementById('ID_MENU01').style.visibility='hidden';
}
changeClass(M0_titre,document.getElementById('I_saison')) ;
}
// FONCTIONS POUR LES TYPES D'IMAGES
function displayMenu11()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU11.style.visibility='visible';
}
else
{
document.getElementById('ID_MENU11').style.visibility='visible';
}
changeClass("M_infos_over",document.getElementById('I_infos')) ;
}
function hideMenu11()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU11.style.visibility='hidden';
}
else
{
document.getElementById('ID_MENU11').style.visibility='hidden';
}
changeClass(M1_titre,document.getElementById('I_infos')) ;
}
// FONCTIONS POUR IMAGES SPECTRALES
function displayMenu21()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU21.style.visibility='visible';
}
else
{
document.getElementById('ID_MENU21').style.visibility='visible';
}
changeClass("M_partenaires_over",document.getElementById('I_partenaires')) ;
}
function hideMenu21()
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.all.ID_MENU21.style.visibility='hidden';
}
else
{
document.getElementById('ID_MENU21').style.visibility='hidden';
}
changeClass(M2_titre,document.getElementById('I_partenaires')) ;
}
// FONCTIONS POUR IMAGES MULTI
function displayMenu31()
{
changeClass("M_pro_over",document.getElementById('I_pro')) ;
}
function hideMenu31()
{
changeClass(M3_titre,document.getElementById('I_pro')) ;
}
// FONCTIONS POUR IMAGES HYPER
function displayMenu41()
{
changeClass("M_devenez_over",document.getElementById('I_devenez')) ;
}
function hideMenu41()
{
changeClass(M4_titre,document.getElementById('I_devenez')) ;
}
function changeClass(wtext,object)
{
if (navigator.appName=='Microsoft Internet Explorer')
{
object.setAttribute('className', wtext);
}
else
{
object.setAttribute('class', wtext);
}
}
function changeClassligne(wtext,wnumber)
{
if (navigator.appName=='Microsoft Internet Explorer')
{
document.getElementById(wnumber+'1').setAttribute('className', 'S_normal_'+wtext+'_bold');
document.getElementById(wnumber+'2').setAttribute('className', 'S_normal_'+wtext+'_light');
document.getElementById(wnumber+'3').setAttribute('className', 'S_normal_'+wtext+'_bold');
document.getElementById(wnumber+'4').setAttribute('className', 'S_normal_'+wtext+'_light');
document.getElementById(wnumber+'5').setAttribute('className', 'S_normal_'+wtext+'_light');
}
else
{
document.getElementById(wnumber+'1').setAttribute('class', 'S_normal_'+wtext+'_bold');
document.getElementById(wnumber+'2').setAttribute('class', 'S_normal_'+wtext+'_light');
document.getElementById(wnumber+'3').setAttribute('class', 'S_normal_'+wtext+'_bold');
document.getElementById(wnumber+'4').setAttribute('class', 'S_normal_'+wtext+'_light');
document.getElementById(wnumber+'5').setAttribute('class', 'S_normal_'+wtext+'_light');
}
}