if (typeof fond == 'undefined') { var  fond="#DBDCEF";  }
if (typeof cadre == 'undefined') { var cadre ="#0C6CC0";}
if (typeof haut == 'undefined') { var  haut = 108;       }
if (typeof gauche == 'undefined') { var  gauche = 380;    }

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

var cnt = 0;
var caller = 4;
if ( (ns4) || (ie4) ) {
	if (ns4) {over = document.overDiv ; over1 = document.overDiv1}
	if (ie4) {over = overDiv.style  ; over1 = overDiv1.style}
}

a = true;
tempo = setTimeout("a=true", 1);

function kill()
{
if (ie4){
	tempo = setTimeout("over.visibility = \"hidden\";over1.visibility = \"hidden\";a=true", 300);}
else  {
	tempo = setTimeout("over.visibility = \"hide\";over1.visibility = \"hide\";a=true", 1000);}
}

function kill1()
{
if (ie4) {
	over1.visibility = "hidden";}
else{
	over1.visibility = "hide";}
}

function die1()
{
	over1.visibility = "hidden";
}

function die()
{
if (ie4){
	over.visibility = "hidden";
	over1.visibility = "hidden";}
else  {
	over.visibility = "hide";
	over1.visibility = "hide";}
}

function mout()
{
	hideObject(over);
	hideObject(over1);
}

function changeto() {
if (ns4) {clearTimeout(tempo);
} else
{
clearTimeout(tempo);
source=event.srcElement
if (source.tagName=="A"||source.tagName=="TD"||source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="DIV")
source=source.parentElement
if (source.id!="ignore")
{
//alert('jk');
source.id="S";
source.parentElement.parentElement.style.backgroundColor = cadre;
}
}
}
function changeto1() {
if (ns4) {clearTimeout(tempo);
} else
{
clearTimeout(tempo);
source=event.srcElement
if (source.tagName=="A"||source.tagName=="TD"||source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="DIV")
source=source.parentElement
if (source.id!="ignore")
{
//alert('jk');
source.id="S";
source.parentElement.parentElement.style.backgroundColor = cadre;
}
}
}



function changeback() {
if (ns4) {kill();} else
{
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
 return
//alert('y');
while(source.tagName!="TD")
source=source.parentElement

if (event.toElement!=source||source.tagName=="TD"||source.id=="ignore")
{source.style.backgroundColor=fond;
event.fromElement.id="NS";
kill(); //alert('jk');
}
}}
function changeback1() {
if (ns4) {kill1();} else
{
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
 return
//alert('y');
while(source.tagName!="TD")
source=source.parentElement

if (event.toElement!=source||source.tagName=="TD"||source.id=="ignore")
{source.style.backgroundColor=fond;
event.fromElement.id="NS";
kill1(); //alert('jk');
}
}}








function stick(d) {
if (ie4) {over1.visibility = "hidden";}
else {over1.visibility = "hide";}
//y = haut; 
y = 108; 
x = 100;
txto='';
//st='<table border="0" width="140" bordercolor="#000000" bgcolor='+fond+' cellspacing="0"><a href=# onmouseout="changeback()" onmouseover="changeto()"><tr><td bgcolor=';
st='<table onmouseout="changeback()"  onmouseover="changeto()" border="0" bordercolor="#000000" bgcolor=white cellspacing="0" cellpadding="1"><tr><td bgcolor=';
lin='</td></tr><tr id="ignore"><td onmouseout="kill()" id="ignore"></td></tr><tr><td bgcolor=';
fin='</td></tr></table>';


if (d==0) {  // Présentation

if (ie4) {wx0 = 120;}
else {wx0 = 140;}
txto=st
+bla(wx0+'\">&nbsp;Présentation','presentation.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx0+'\">&nbsp;Usines et Ateliers','usines_et_ateliers.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx0+'\">&nbsp;Histoire du plastique','histoire_du_plastique.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+fin;
x = gauche + 37;
}
else if (d==1) {  // Véhicules
if (ie4) {wx1 = 150;}
else {wx1 = 170;}
txto=st
+bla(wx1+'\">&nbsp;Intro ','vehicule.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla1(wx1+'\">&nbsp;Feux rouges ','77','feu_rond_gm.shtml OnMouseOver=\"kill1(); clearTimeout(tempo); substick(1); \" ')+lin
+bla(wx1+'\">&nbsp;Feux de gabarit ','feu_gabarit.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx1+'\">&nbsp;Catadioptres','catadioptres.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx1+'\">&nbsp;Butoirs de porte','butoirs.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx1+'\">&nbsp;Bouchons à essence','bouchons_essence.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx1+'\">&nbsp;Triangles de présignalisation','triangles.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx1+'\">&nbsp;Assurance qualité','assurance.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+fin;
x = gauche + 113;
}
else if (d==2) {  // La ménagère
if (ie4) {wx2 = 122;}
else {wx2 = 140;}
txto=st
+bla(wx2+'\">&nbsp;Intro','menagere.shtml OnMouseOver=\"kill1(); clearTimeout(tempo);\"')+lin
+bla(wx2+'\">&nbsp;Articles de cuisine','cuisine.shtml OnMouseOver=\"kill1(); clearTimeout(tempo);\"')+lin
+bla(wx2+'\">&nbsp;Articles de ménage','menage.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx2+'\">&nbsp;Articles de quincaillerie','quincaillerie.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx2+'\">&nbsp;Divers','divers.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx2+'\">&nbsp;Conseils utiles','conseils.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+fin;
		
x = gauche + 166;
}
else if (d==3) {  // Et encore !
if (ie4) {wx3 = 108;}
else {wx3 = 120;}
txto=st
+bla(wx3+'\">&nbsp;Nouveautés ','nouveautes.php OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx3+'\">&nbsp;Sous-traitance ','soustraitance.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx3+'\">&nbsp;Qualité Crima','qualite.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
+bla(wx3+'\">&nbsp;Alerte Contrefaçon !','contrefacon.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+fin;


//+bla(wx3+'\">&nbsp;Bouteilles ','bouteilles.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin
//+bla(wx3+'\">&nbsp;Gaines ','gaines.shtml OnMouseOver=\"kill1();clearTimeout(tempo);\"')+lin

x = gauche + 241;
}

/*if (d==1) {  // Véhicules
txto=st+bla1('140\">Feux rouges ','# OnMouseOver=\"kill1(); clearTimeout(tempo); substick(1)\"')+lin+bla1('140\"> Feux de gabarit ','# OnMouseOver=\"kill1();\"')+lin+bla1('140\">Catadioptres','# OnMouseOver=\"kill1();clearTimeout(tempo); substick(2) \"')+lin+bla('140\">Butoirs de portes','# OnMouseOver=\"kill1();\"')+lin+bla('140\"> Bouchons à essence','# OnMouseOver=\"kill1();\"')+lin+bla('140\">Triangle de présignalisation','# OnMouseOver=\"kill1();\"')+fin;
x = 450;
}*/


y1 =y + 15;
kol();
//txt='<div id=r style="position: absolute; top: '+y+'; left: '+x+';"><p style="line-height: 85%">'+txto+'</p></div>';

layerWrite(txt);

showObject(over);
//caller = d;
}

// Show comment (stick)
function bla(s2,s1) {
if (ns4)  k=fond+"><a onmouseover=\"kill1();changeto(event)\" onmouseout=\"changeback()\" href="+s1+" onClick=die()><DIV style=\"cursor:hand;color:#404040;font-weight:bold; FONT-FAMILY:Verdana; TEXT-DECORATION:none; font-size:11px; width:"+s2+"</div></a>"; 
else if (ie4)  k=fond+"> <a href="+s1+" onClick=die()><DIV id=NS style=\"cursor:hand; width:"+s2+"</div></a> "; 
return k
}
function bla2(s2,s1) {
k=fond+"><a onmouseover=\"changeto(event)\" onmouseout=\"changeback()\" href="+s1+" onClick=die()><font face=\"arial\" color=black size=1><b>"+s2+"</b></font></a>"; 
return k
}


// Show the first comment (stick)
function bla1(s2,s3,s1) {
if (ns4)  k=fond+"><a  onmouseout=\"changeback()\" href="+s1+" onClick=die()><DIV style=\"cursor:hand;color:#404040;font-weight:bold; FONT-FAMILY:Verdana; TEXT-DECORATION:none; font-size:10px; width:"+s2+"<img src=img/a.gif border=0 width="+s3+" height=1><img src=img/fle.gif width=4 height=7 border=0></div></a>"; 
else if (ie4)  { 
k=fond+"><a href="+s1+" onClick=die()><DIV id=NS style=\"cursor:hand; width:"+s2+"<img src=img/a.gif border=0 width="+s3+" height=1><img src=img/fle.gif width=4 height=7 border=0></div></a>"; 
}
return k
}



function substick(d) {
y = haut; x = 100;txto='';
//st='<table border="0" width="140" bordercolor="#000000" bgcolor='+fond+' cellspacing="0"><a href=# onmouseout="changeback()" onmouseover="changeto()"><tr><td bgcolor=';
st='<table onmouseout="changeback()" onmouseover="changeto()" border="0" bordercolor="#000000" bgcolor=white cellspacing="0"><tr><td bgcolor=';
lin='</td></tr><tr id="ignore"><td onmouseout="kill()" id="ignore"></td></tr><tr><td bgcolor=';
fin='</td></tr></table>';


if (d==1) {  // sousmenu
wxx1 = 73;
txto1= st
+bla2('Feu rond GM ','feu_rond_gm.shtml')+lin
+bla2('Feu rond PM ','feu_rond_pm.shtml')+lin
+bla2('Feu carré GM','feu_carre_gm.shtml')+fin;


txto= st
+bla(wxx1+'\">&nbsp;&nbsp;Feu rond GM ','feu_rond_gm.shtml')+lin
+bla(wxx1+'\">&nbsp;&nbsp;Feu rond PM ','feu_rond_pm.shtml')+lin
+bla(wxx1+'\">&nbsp;&nbsp;Feu carré GM','feu_carre_gm.shtml')+fin;

x = gauche + 116 + wx1; y = haut + 15;
}
y1 = y+15;
x1 = x-5;
//kol(); <p style="line-height: 85%">'+txto+'</p>
if (ns4)  txt='<layer above=overDiv width=80px left='+x1+'px top='+y1+'px>'+txto1+'</layer>';
else if (ie4)  txt='<div id=r style="position: absolute; top: '+y+'; left: '+x+';"><p style="line-height: 85%">'+txto+'</p></div>';

//<p style="line-height: 85%">'+txto+'</p>
layerWrite1(txt);

showObject(over1);
//caller = d;
}



function kol() {
if (ns4)  txt='<div class=fg style="position: absolute; top: '+y1+'; left: '+x+';"><p style="line-height: 85%">'+txto+'</p></div>';
else if (ie4)  txt='<div id=r style="position: absolute; top: '+y+'; left: '+x+';"><p style="line-height: 85%">'+txto+'</p></div>';
return txt
}



// Writes to a layer
function layerWrite(txt) {
        if (ns4) {
                var lyr = document.overDiv.document
                lyr.write(txt)
                lyr.close()
        }
        else if (ie4) document.all["overDiv"].innerHTML = txt
}

function layerWrite1(txt) {
        if (ns4) {
                var lyr = document.overDiv1.document
                lyr.write(txt)
                lyr.close()
        }
        else if (ie4) document.all["overDiv1"].innerHTML = txt
}
// Make an object visible
function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}

// Hides an object
function hideObject() {

        if (ns4) { over.visibility = "hide"; over1.visibility = "hide";}
        else if (ie4){ over.visibility = "hidden";over1.visibility = "hide";}
}

