-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenudyn.js
executable file
·55 lines (53 loc) · 2.03 KB
/
menudyn.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
var adresse = document.location.pathname;
var indiceDepart = adresse.lastIndexOf('/')+1;
var indiceFin = adresse.length-6;
var page = adresse.substring(indiceDepart, indiceFin);
var img = 'url("../images/boutons/bmenuactive.png")'
var wid = '125px'
switch(page) {
case 'ind':
{document.getElementById('menuaccueil').style.backgroundImage = img;
document.getElementById('menuaccueil').style.width = wid;
break;}
case 'accueil':
{document.getElementById('menuaccueil').style.backgroundImage = img;
document.getElementById('menuaccueil').style.width = wid;
break;}
case 'offres':
{document.getElementById('menuoffres').style.backgroundImage = img;
document.getElementById('menuoffres').style.width = wid;
break;}
case 'recommand':
{document.getElementById('menuoffres').style.backgroundImage = img;
document.getElementById('menuoffres').style.width = wid;
break;}
case 'chillon':
{document.getElementById('menuoffres').style.backgroundImage = img;
document.getElementById('menuoffres').style.width = wid;
break;}
case 'gruyere':
{document.getElementById('menuoffres').style.backgroundImage = img;
document.getElementById('menuoffres').style.width = wid;
break;}
case 'glacier':
{document.getElementById('menuoffres').style.backgroundImage = img;
document.getElementById('menuoffres').style.width = wid;
break;}
case 'formulaire':
{document.getElementById('menuformulaire').style.backgroundImage = img;
document.getElementById('menuformulaire').style.width = wid;
break;}
case 'contact':
{document.getElementById('menucontact').style.backgroundImage = img;
document.getElementById('menucontact').style.width = wid;
break;}
case 'liens':
{document.getElementById('menuliens').style.backgroundImage = img;
document.getElementById('menuliens').style.width = wid;
break;}
case 'suisse':
{document.getElementById('menusuisse').style.backgroundImage = img;
document.getElementById('menusuisse').style.width = wid;
break;}
default: break;
}