// JavaScript Document

function show(id){
 var menu = document.getElementById(id).style.display;
if (menu=="none"){
		document.getElementById(id).style.display = 'block';
	//alert(menu);
	return;
		}
	if (menu=="block"){
		document.getElementById(id).style.display = 'none';
		//alert(menu);
}
}

var nbreimgaleatoire = 11;
var img_fond ='bloc_fond';
var test2=0;

function aleatoire(test, test3) {
 var alea = Math.floor((nbreimgaleatoire)*Math.random()+1);
 var img_fond ='bloc_fond';
if(alea==1){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/1'+test+')';
}
if(alea==2){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/2'+test+')';
}

if(alea==3){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/3'+test+')';
}
if(alea==4){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/4'+test+')';
}
if(alea==5){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/5'+test+')';
}
if(alea==6){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/6'+test+')';
}
if(alea==7){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/7'+test+')';
}
if(alea==8){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/8'+test+')';
}
if(alea==9){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/9'+test+')';
}
if(alea==10){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/10'+test+')';
}
if(alea==11){
document.getElementById(img_fond).style.backgroundImage ='url(fond/'+test3+'/11'+test+')';
}
}

function resolution(){
if(screen.width==1024 || screen.width<1024){
dimension = '1024';
document.getElementById('accueil_menu_bas').style.top='370px';
document.getElementById('menu').style.top='25%';
document.getElementById('adresse').style.top='84%';
document.getElementById('atr').style.top='95%';
document.getElementById('bloc_fond').style.width='1024px';
document.getElementById('bloc_fond').style.height='708px';
}
if(screen.width<1279 && screen.width >1151){
dimension = '1152';   
document.getElementById('accueil_menu_bas').style.top='470px';
document.getElementById('menu').style.top='27%';
document.getElementById('adresse').style.top='78%';
document.getElementById('atr').style.top='91%';
document.getElementById('bloc_fond').style.width='1152px';
document.getElementById('bloc_fond').style.height='784px';
}
if(screen.width<1281 && screen.width >1153){
dimension = '1280';   
document.getElementById('accueil_menu_bas').style.top='554px';
document.getElementById('menu').style.top='29%';
document.getElementById('adresse').style.top='78%';
document.getElementById('atr').style.top='91%';
document.getElementById('bloc_fond').style.width='1280px';
document.getElementById('bloc_fond').style.height='944px';


}   
if(screen.width<1441 && screen.width >1282){
dimension = '1440';   
document.getElementById('accueil_menu_bas').style.top='500px';
document.getElementById('menu').style.top='30%';
document.getElementById('adresse').style.top='72%';
document.getElementById('bloc_fond').style.width='1440px';
document.getElementById('bloc_fond').style.height='820px';
}
if(screen.width<1681 && screen.width >1442){
dimension = '1680';   
document.getElementById('accueil_menu_bas').style.top='597px';
document.getElementById('menu').style.top='30%';
document.getElementById('adresse').style.top='72%';
document.getElementById('bloc_fond').style.width='1680px';
document.getElementById('bloc_fond').style.height='970px';
}
if(screen.width > 1682){
dimension = '1920';
document.getElementById('accueil_menu_bas').style.top='700px';
document.getElementById('menu').style.top='30%';
document.getElementById('adresse').style.top='72%';
document.getElementById('bloc_fond').style.width='1920px';
document.getElementById('bloc_fond').style.height='1120px';
}   
var dimok='_'+dimension+'.jpg';

aleatoire(dimok, dimension);
test2=dimension;

}

function resolution2(){
if(screen.width==1024 || screen.width<1024){
dimension = '1024';
document.getElementById('menu').style.top='25%';
document.getElementById('menuReactif').style.top='25%';
}
if(screen.width<1279 && screen.width >1151){
dimension = '1152';	
document.getElementById('menu').style.top='27%';
document.getElementById('menuReactif').style.top='27%';
}
if(screen.width<1281 && screen.width >1153){
dimension = '1280';	
document.getElementById('menu').style.top='29%';
document.getElementById('adresse').style.top='73%';
document.getElementById('menuReactif').style.top='29%';
}	
if(screen.width<1441 && screen.width >1282){
dimension = '1440';	
document.getElementById('menu').style.top='30%';
document.getElementById('menuReactif').style.top='30%';
document.getElementById('adresse').style.top='72%';
}
if(screen.width<1681 && screen.width >1442){
dimension = '1680';	
document.getElementById('menu').style.top='30%';
document.getElementById('menuReactif').style.top='30%';
document.getElementById('adresse').style.top='72%';
}
if(screen.width > 1682){
dimension = '1920';
document.getElementById('menu').style.top='30%';
document.getElementById('menuReactif').style.top='30%';
document.getElementById('adresse').style.top='72%';
}}






function changement(masque, apparait, menuhide1, menuhide2, menusee1, menusee2, stylea1, stylea2){
document.getElementById(masque).style.display ='none';
document.getElementById(masque).style.styleFloat ='none';
document.getElementById(apparait).style.display ='block';
document.getElementById(menuhide1).style.display ='none';
document.getElementById(menuhide2).style.display ='none';
document.getElementById(menusee1).style.display ='inline';
document.getElementById(menusee2).style.display ='inline';
document.getElementById(stylea1).id=stylea2;
document.getElementById(stylea2).id=stylea1;

}


function changeimage(cible, chemin){
document.getElementById(cible).src=chemin;	
}



function resoldivdroite(){
if(screen.width >1279){
document.getElementById('Global_3colonnes_right').style.width='16%';
document.getElementById('Global_3colonnes_right').style.left='84%';
document.getElementById('Global_3colonnes_left').style.width='64%';
}else{
document.getElementById('Global_3colonnes_right').style.width='15%';
document.getElementById('Global_3colonnes_right').style.left='85%';
document.getElementById('Global_3colonnes_left').style.width='59%';	
}}
	
	
	
function SwitchZindex(){
document.getElementById('menu').style.zIndex='999';	
document.getElementById('menuReactif').style.zIndex='1';		
}


function SwitchZindexAutre(){
document.getElementById('menu').style.zIndex='1';	
document.getElementById('menuReactif').style.zIndex='999';		
}



	
function selectmenuws(ssmenuamontrer){
document.getElementById(ssmenuamontrer).style.display='block';	
Variante=ssmenuamontrer+'1';
document.getElementById(Variante).className='selected';
}

function selectmenuws2(ssmenuamontrer,ssmenuamontrer2){
document.getElementById(ssmenuamontrer).style.display='block';	
document.getElementById(ssmenuamontrer2).style.display='block';	



Variante=ssmenuamontrer+'1';
document.getElementById(Variante).className='selected';
}

	
	
function FoncVisible(avoirrr){
	document.getElementById(avoirrr).style.display='block';	
}
	
function FoncInVisible(acacher1, acacher2, acacher3){
	document.getElementById(acacher1).style.display='none';	
	document.getElementById(acacher2).style.display='none';	
	document.getElementById(acacher3).style.display='none';	
}	
	
/*


function montrer(grandi, affichmenu){
document.getElementById(grandi).style.width='500px';
document.getElementById(affichmenu).style.display='block';



if((navigator.userAgent.indexOf("Firefox") !=-1)&& (test2==1024 || test2==1152)){
document.getElementById('adresse').style.marginTop ='80px';
document.getElementById('espacemep2').style.height ='20px';
}}



function masquer(grandi, affichmenu){
document.getElementById(grandi).style.width='300px';
document.getElementById(affichmenu).style.display='none';	
document.getElementById('adresse').style.marginTop ='0px';
}


*/

