function boiteChoix(titre, titreBouton1, styleBouton1, titreBouton2, styleBouton2, texteQuestion)
{
	var titreBoite = titre;
	var newTitre = document.createElement('span');
	newTitre.setAttribute("class","titreBoite");
	newTitre.setAttribute("className","titreBoite");
	newTitre.innerHTML = titreBoite;

	var titreBtn1 = titreBouton1;
	var lien = lien1;
	var newBtn = document.createElement('button');
	newBtn.setAttribute("class",styleBouton1);
	newBtn.setAttribute("className",styleBouton1);
	newBtn.setAttribute("value",titreBtn1);
	newBtn.setAttribute("onclick","recupEtat(1);");
	newBtn.onclick = function recupEtat(){var elementASupp = document.getElementById('boiteChoix');document.body.removeChild(elementASupp);elementASupp = document.getElementById('boiteModal');document.body.removeChild(elementASupp); window.location.href=lien; return true;};
	newBtn.innerHTML = titreBtn1;

	var titreBtn2 = titreBouton2;
	var newBtn2 = document.createElement('button');
	newBtn2.setAttribute("class",styleBouton2);
	newBtn2.setAttribute("className",styleBouton2);
	newBtn2.setAttribute("value",titreBtn2);
	newBtn2.setAttribute("onclick","recupEtat(2);");
	newBtn2.onclick = function recupEtat(){var elementASupp = document.getElementById('boiteChoix');document.body.removeChild(elementASupp);elementASupp = document.getElementById('boiteModal');document.body.removeChild(elementASupp); return false;};
	newBtn2.innerHTML = titreBtn2;

	var titreBtnFermer = 'X';
	var newBtnFermer = document.createElement('button');
	newBtnFermer.setAttribute("class","boutonFermer");
	newBtnFermer.setAttribute("className","boutonFermer");
	newBtnFermer.setAttribute("value",titreBtnFermer);
	newBtnFermer.setAttribute("onclick","recupEtat(0);");
	newBtnFermer.onclick = function recupEtat(){var elementASupp = document.getElementById('boiteChoix');document.body.removeChild(elementASupp);elementASupp = document.getElementById('boiteModal');document.body.removeChild(elementASupp);return false;};
	newBtnFermer.innerHTML = titreBtnFermer;
		
	var texteQuestion = texteQuestion;
	var newQuestion = document.createElement('span');
	newQuestion.setAttribute("class","question");
	newQuestion.setAttribute("className","question");
	newQuestion.innerHTML = texteQuestion;

	var newBoiteModal = document.createElement('div');
	newBoiteModal.setAttribute("id","boiteModal");
	newBoiteModal.setAttribute("style","width:"+(screen.width-50)
	+"px;height:100%;position:absolute;top:0px;left:0px;z-index:5000;background-color:#CCC;opacity:0.4;");
	
	if (document.all) 
	{
		newBoiteModal.style.setAttribute("cssText","width:"+(screen.width-50)+"px;height:"+(screen.height-250)
		+"px;position:absolute;top:0px;left:0px;z-index:5000;background-color:#CCC;filter:alpha(opacity=4)");
		alert(screen.width+" et "+screen.height)
	}

	var newBoite = document.createElement('div');
	newBoite.setAttribute("id","boiteChoix");
	newBoite.setAttribute("class","boite");
	newBoite.setAttribute("className","boite")
 	document.body.appendChild(newBoiteModal);
	document.body.appendChild(newBoite);
	newBoite.appendChild(newTitre);
	newBoite.appendChild(newQuestion);
	newBoite.appendChild(newBtn);
	newBoite.appendChild(newBtn2);
	newBoite.appendChild(newBtnFermer);
}

function recupEtat(etat)
{
	var elementASupp = document.getElementById('boite');
	document.body.removeChild(elementASupp);
	elementASupp = document.getElementById('boiteModal');
	document.body.removeChild(elementASupp);
	return etat;
}
