// JavaScript Document

// Afficher/Cacher une div par son id
function affiche(id)
{
	document.getElementById(id).style.display="block";
}
function cache(id)
{
	document.getElementById(id).style.display="none";
}

// changer la question dans les faq
function switchQuest(id)
{
	// reinitialisation classes questions
	var i=1;
	while(document.getElementById("ques"+i))
	{
		document.getElementById("ques"+i).className="";
		i++;
	}
	
	// ajout classe 
	document.getElementById("ques"+id).className="selected";
	
	// 
	// reinitialisation  reponses
	var i=1;
	while(document.getElementById("rep"+i))
	{
		document.getElementById("rep"+i).style.display="none";
		i++;
	}
	
	// affiche reponse
	document.getElementById("rep"+id).style.display="block";
}

//Popup Centree
function popupCentre(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);
} 