// JavaScript Document

/*function disableRightClick(e)
{
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      
      return false;
    }
  }
  else
  {
    return false;
  }
}
disableRightClick();*/

//Préchargement des images
var couleur1 = '#A87A6D'
var couleur2 = '#A87A6D'
var couleur3 = '#A87A6D'
var couleur4 = '#A87A6D'
var couleur5 = ''

function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=6; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function efface(a) {
	if (navigator.appName=="Microsoft Internet Explorer")  {
		if (a=="actu") {
			if (document.location.href.indexOf("contact.asp") !=-1) {document.getElementById('select1').style.visibility='hidden';}
			if (document.location.href.indexOf("projet.asp") !=-1) {
				document.getElementById('select2').style.visibility='hidden';
				document.getElementById('select3').style.visibility='hidden';
				document.getElementById('select4').style.visibility='hidden';
				}
			if ((document.location.href.indexOf("projetindustriel.asp") !=-1)) {
				document.getElementById('select2').style.visibility='hidden';
				document.getElementById('select3').style.visibility='hidden';
				}

			if ((document.location.href.indexOf("produit.asp") !=-1)||(document.location.href.indexOf("gamme.asp") !=-1)||(document.location.href.indexOf("famille.asp") !=-1)) {
				document.getElementById('formgamme').style.visibility='hidden';
				}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select3').style.visibility='hidden';}
		}
		if (a=="collection") {
			if ((document.location.href.indexOf("projet.asp") !=-1)||(document.location.href.indexOf("projetindustriel.asp") !=-1)) {
			document.getElementById('select1').style.visibility='hidden';
			}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select2').style.visibility='hidden';}
		}
		if (a=="entreprise") {
			if (document.location.href.indexOf("contact.asp") !=-1) {document.getElementById('select1').style.visibility='hidden';}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select3').style.visibility='hidden';}

		}
	}
}

function retablit(a) {
	if (navigator.appName=="Microsoft Internet Explorer")  {
		if (a=="actu") {
			if (document.location.href.indexOf("contact.asp") !=-1) {document.getElementById('select1').style.visibility='visible';}
			if (document.location.href.indexOf("projet.asp") !=-1) {
				document.getElementById('select2').style.visibility='visible';
				document.getElementById('select3').style.visibility='visible';
				document.getElementById('select4').style.visibility='visible';
				}
			if ((document.location.href.indexOf("projetindustriel.asp") !=-1)) {
				document.getElementById('select2').style.visibility='visible';
				document.getElementById('select3').style.visibility='visible';
				}
			if ((document.location.href.indexOf("produit.asp") !=-1)||(document.location.href.indexOf("gamme.asp") !=-1)||(document.location.href.indexOf("famille.asp") !=-1)) {
				document.getElementById('formgamme').style.visibility='visible';
				}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select3').style.visibility='visible';}

		}
		if (a=="collection") {
			if ((document.location.href.indexOf("projet.asp") !=-1)||(document.location.href.indexOf("projetindustriel.asp") !=-1)) {
			document.getElementById('select1').style.visibility='visible';
			}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select2').style.visibility='visible';}
		}
		if (a=="entreprise") {
			if (document.location.href.indexOf("contact.asp") !=-1) {document.getElementById('select1').style.visibility='visible';}
			if (document.location.href.indexOf("acces.asp") !=-1) {document.getElementById('select3').style.visibility='visible';}
		}
	}
}

function affiche(it) {
var e = document.getElementById('menu'+it);	
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('menu'+i)) {document.getElementById('menu'+i).style.background='';
		}
	}
if (e) {e.style.background='#80898E';
		}
		
}

//création d'une pop-up centrée
function popupcentree(page,largeur,hauteur,options)
{
var top=(screen.height-hauteur)/2;
var left=(screen.width-largeur)/2;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
//

//gestion du son dans les pages intérieures
/*function VerifPlugIn(ExtensionFile)
  {
  var IsEnabled = true;
  if (navigator.appName == "Netscape")
    {
    IsEnabled = false;
    for(var x=0;(x<navigator.mimeTypes.length && !IsEnabled);x++)
      {
      if(navigator.mimeTypes[x].suffixes.indexOf(ExtensionFile)>=0)
      IsEnabled = navigator.mimeTypes[x].enabledPlugin;
      }
    }
 if (navigator.userAgent.indexOf("Firefox")!=-1) IsEnabled = true;
    return IsEnabled;
  }

function PlaySound(MyName,MyExtension,MyLoop)
  {
  //var leson=document.getElementById(MyName);
  //if (navigator.userAgent.indexOf("Firefox")!=-1) leson.Play();
  
  var AudioEnable = VerifPlugIn(MyExtension),TheLoop = '';
  if (navigator.appName == "Netscape" && MyLoop==1)     TheLoop='true';
  if (AudioEnable) eval('document.'+MyName+'.Play('+TheLoop+')');
 }

function StopSound(MyName,MyExtension)
  {
  //var leson=document.getElementById(MyName);
  //if (navigator.userAgent.indexOf("Firefox")!=-1) leson.Stop();
  var AudioEnable = VerifPlugIn(MyExtension);
  if (AudioEnable) eval('document.'+MyName+'.Stop()');
  }*/