function OuvreFichier(nomfichier)
	{
	document.openfichier.monfichier.value=nomfichier; 
	document.openfichier.submit();
	}

function Page(mapage) 
	{
	document.location.href='index.php?page='+(mapage);
	}
function PageNews(affichenews) 
	{
	document.location.href='index.php?page=news&affichenews='+(affichenews);
	}
function PageCal(affichecal) 
	{
	document.location.href='index.php?page=calendrier&affichecal='+(affichecal);
	}
function PageGal(affichegal) 
	{
	document.location.href='index.php?page=photos&affichegal='+(affichegal);
	}
function PageVid(affichegal) 
	{
	document.location.href='index.php?page=videos&affichegal='+(affichegal);
	}

function apercu(wid,hgt,photo) 
	{
    var larg =  wid  ; // ici la largeur du popup
    var haut = hgt ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("photo.php?photo="+(photo),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}
function video(video,type) 
	{
    var larg =  340  ; // ici la largeur du popup
    var haut = 280 ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("video.php?video="+(video)+"&type="+(type),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}
function ouvrepdf(fichier) 
	{
    var larg =  750  ; // ici la largeur du popup
    var haut = 500 ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("files/"+fichier,"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}
function Ferme () 
	{ 
	window.close();
	} 
function AfficheLocMap(mon_id,tot_id)
{
for (a=0; a<tot_id; a++){
	document.getElementById('locdiv'+(a)).className='cache';
	}
document.getElementById('locdiv'+(mon_id)).className='apparent';	
}

function AfficheLocMapCal(mon_id,tot_id)
{
for (a=0; a<tot_id; a++){
	document.getElementById('locdiv'+(a)).className='cache';
	}
for (a=0; a<tot_id-1; a++){
	document.getElementById('locdivcal'+(a)).style.fontWeight='normal';
	document.getElementById('locdivcal'+(a)).style.color='#ffffff';	
	}
document.getElementById('locdiv'+(mon_id)).className='apparent';	
document.getElementById('locdivcal'+(mon_id)).style.fontWeight='bold';
document.getElementById('locdivcal'+(mon_id)).style.color='#e15a5a';
}
function AfficheLocMapPil(mon_id,tot_id,ind)
{
for (a=0; a<tot_id; a++){
	document.getElementById((ind)+'locdiv'+(a)).className='cache';
	}
document.getElementById((ind)+'locdiv'+(mon_id)).className='apparent';	
}


