var off = 0;
var dem = 0;
var FondEcran = new Array();
FondEcran[0] = 'url("css/nouveau/fondsysteme/bienvenue.jpg")';
FondEcran[1] = 'url("css/nouveau/fondsysteme/session.jpg")';
FondEcran[2] = 'url("css/nouveau/fondsysteme/fermeture.jpg")';
FondEcran[3] = 'url("css/nouveau/fondsysteme/chargement.jpg")';
FondEcran[4] = 'url("css/nouveau/fondsecran/fondecran1.jpg")';
FondEcran[5] = 'url("css/nouveau/fondsecran/fondecran2.jpg")';
FondEcran[6] = 'url("css/nouveau/fondsecran/fondecran3.jpg")';
FondEcran[7] = 'url("css/nouveau/fondsecran/fondecran4.jpg")';
FondEcran[8] = 'url("css/nouveau/fondsecran/fondecran5.jpg")';
FondEcran[9] = 'url("css/nouveau/fondsecran/fondecran6.jpg")';
FondEcran[10] = 'url("css/nouveau/fondsecran/fondecran7.jpg")';
FondEcran[11] = 'url("css/nouveau/fondsecran/fondecran8.jpg")';


function changefondecran(div , fond){
	document.getElementById(div).style.backgroundImage = FondEcran[fond];
	visible(div);
	if(fond==2){
	delai("document.getElementById('fondsysteme').style.background = '#303030';document.getElementById('beoff').style.visibility = 'hidden';document.getElementById('be').style.visibility = 'visible';", 2500);
	raz();
		//off = 1;
		
		}
	if(fond==1){
		document.getElementById(div).style.backgroundImage = FondEcran[fond];
	visible(div);
	visible('sessions');
	raz();
	}
	if(fond==3){
		//if(off==1){
		visible('chargement');
		document.getElementById('beoff').style.visibility = 'visible';document.getElementById('be').style.visibility = 'hidden';
		delai("document.getElementById('logo').style.visibility = 'hidden';document.getElementById('chargement').style.visibility = 'hidden';document.getElementById('fondsysteme').style.backgroundImage = FondEcran[0];", 2500);
		delai("document.getElementById('fondsysteme').style.visibility = 'hidden';", 5000);
		//off=0;
		}
		//if(off==0){
			//document.getElementById(div).style.background = '#000';
			//}
		
	//}
	
}
function demarrer(div)
    {//alert(dem);
	dem++;
	if (dem==1) {
		visible(div);
		backposition('demarre','top');
		//dem=1;
		}
	else {
		invisible(div);
		backposition('demarre','bottom');
		dem=0;
		}
     }
function delai(code, attente){
		setTimeout(code, attente);
}
function selected(div){
	document.getElementById('demarre').style.backgroundPosition='bottom';
		document.getElementById('onglet1').style.backgroundPosition='bottom';
		document.getElementById('onglet2').style.backgroundPosition='bottom';
		document.getElementById('onglet3').style.backgroundPosition='bottom';
		document.getElementById('onglet4').style.backgroundPosition='bottom';
		document.getElementById('onglet5').style.backgroundPosition='bottom';
		document.getElementById('onglet6').style.backgroundPosition='bottom';
		document.getElementById('onglet7').style.backgroundPosition='bottom';
		document.getElementById('onglet8').style.backgroundPosition='bottom';
	document.getElementById(div).style.backgroundPosition='top';
}
function onglethover(div){
	document.getElementById(div).style.backgroundPosition='top';}
	function ongletout(div){
	document.getElementById(div).style.backgroundPosition='bottom';}
function invisible(div){document.getElementById(div).style.visibility='hidden';}
function visible(div){document.getElementById(div).style.visibility='visible';}

function cache(div){document.getElementById(div).style.display='none';}
function montre(div){document.getElementById(div).style.display='block';}


function backposition(div, position){
	document.getElementById(div).style.backgroundPosition=position;}
	
function affiche(id){
document.getElementById('marne51150').style.display = 'none';
document.getElementById('marne51700').style.display = 'none';
document.getElementById('marne51170').style.display = 'none';
document.getElementById('marne51600').style.display = 'none';
document.getElementById('marne51110').style.display = 'none';
document.getElementById('marne51160').style.display = 'none';
document.getElementById('marne51400').style.display = 'none';
document.getElementById('marne51360').style.display = 'none';
document.getElementById('marne51490').style.display = 'none';
document.getElementById('marne51480').style.display = 'none';
document.getElementById('marne51220').style.display = 'none';
document.getElementById('marne51420').style.display = 'none';
document.getElementById('marne51450').style.display = 'none';
document.getElementById('marne51430').style.display = 'none';
document.getElementById('marne51390').style.display = 'none';
document.getElementById('marne51140').style.display = 'none';
document.getElementById('marne51530').style.display = 'none';
document.getElementById('marne51000').style.display = 'none';
document.getElementById('marne51520').style.display = 'none';
document.getElementById('marne51500').style.display = 'none';
document.getElementById('marne51370').style.display = 'none';
document.getElementById('marne51510').style.display = 'none';
document.getElementById('marne51350').style.display = 'none';
document.getElementById('marne51200').style.display = 'none';
document.getElementById('marne51100').style.display = 'none';
document.getElementById('marne51380').style.display = 'none';
document.getElementById('aisne02190').style.display = 'none';
document.getElementById('aisne02820').style.display = 'none';
document.getElementById('aisne02860').style.display = 'none';
document.getElementById('aisne02220').style.display = 'none';
document.getElementById('aisne02160').style.display = 'none';
document.getElementById('aisne02130').style.display = 'none';
document.getElementById('aisne02840').style.display = 'none';
document.getElementById('aisne02590').style.display = 'none';
document.getElementById('aisne02150').style.display = 'none';
document.getElementById('aisne02850').style.display = 'none';
document.getElementById('ardennes08190').style.display = 'none';
document.getElementById('ardennes08300').style.display = 'none';
document.getElementById('ardennes08310').style.display = 'none';
document.getElementById(id).style.display = 'block';

}


