function tri_enquete(value_select)
{
	document.frm_enquete.tri_enquete.value=value_select;
	document.frm_enquete.submit();	
}

function tri_consultant(value_select)
{
	document.frm_consultant.tri_consultant.value=value_select;
	document.frm_consultant.submit();	
}

function affiche_enquete(id_enquete)
{
	window.open('sondage/pages/affiche2_enquete.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}
/*
function affiche_statistique(id_enquete)
{
	window.open('pages/affiche_statistique.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}
*/

/*
function affiche_statistique(id_enquete)
{
	window.open('pages/affiche_statistique_svg.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}
*/

function affiche_statistique(id_enquete,type_affichage)
{
	if(type_affichage=="cam"){
		window.open('sondage/pages/affiche_statistique_camenbert.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=no,scrollbars=yes')
	}else if(type_affichage=="dia"){
		window.open('sondage/pages/affiche_statistique.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=no,scrollbars=yes')
	}else if(type_affichage=="svg"){
		window.open('sondage/pages/affiche_statistique_svg.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=no,scrollbars=yes')
	}else if(type_affichage=="pdf"){
		//window.open('pages/affiche_statistique_pdf.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
		//window.location.href="pages/affiche_statistique_pdf.php?id_enquete="+id_enquete;
		window.document.frm_pdf.id_enquete.value=id_enquete;
		window.document.frm_pdf.submit();
	}else if(type_affichage=="part"){
		window.open('sondage/pages/affiche_statistique_participant.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=no,scrollbars=yes')
	}else{
		window.open('sondage/pages/affiche_statistique.php?id_enquete='+id_enquete,'popup'+id_enquete,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=no,scrollbars=yes')
	}
}

function change_type_question()
{
	var type_question;
	for(var i=0; i<document.frm_question.type_question.length; i++)
	{
		if(document.frm_question.type_question.options[i].selected){
			type_question = document.frm_question.type_question.options[i].value;
			break;
		}
	}

	if(type_question=='multiple'){
		
		//document.frm_question.type_objet_question_1.style.visibility = "hidden";
		document.frm_question.type_objet_question_1.disabled = true;
		document.frm_question.type_objet_question_2.disabled = false;
		//document.frm_question.type_objet_question_2.style.visibility = "visible";
		
		
	}else if(type_question=='unique'){
		/*
		document.frm_question.type_objet_question_1.style.visibility = "visible";
		document.frm_question.type_objet_question_2.style.visibility = "hidden";		
		*/
		
		document.frm_question.type_objet_question_1.disabled = false;
		document.frm_question.type_objet_question_2.disabled = true;		
	}
}

function affiche_commentaire()
{
	window.open('sondage/pages/affiche_commentaire.php','popup','height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function affiche_commentaire(id_question)
{
	window.open('sondage/pages/affiche_commentaire.php?id_question='+id_question,'popup','height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}
