function getParameter(c){
	var b=document.location.search;
	var d=b.indexOf(c+"=");
	if (d==-1) {
		return false
	}
	var a=b.substr(d+c.length+1,b.length-d-c.length-1);
	d=a.indexOf("&");
	if(d!=-1) {
		a=a.substr(0,d)
	}
	return a.replace(/\+/g," ")
}

$("#boutonVOC").live('click', function(e) {
	var y = (e.pageY - this.offsetTop) + 200;
	$("#survey").css('top', y+'px');
});

function displayPop(a){

	//Suivi de clic sur le bouton VOC
	saveStats("voc", 'clic_' + _langue, location.pathname);
	
	document.getElementById("greyBox").style.zIndex=800
	document.getElementById("greyBox").style.display="block";
	document.getElementById(a).style.display="block"
	
}

function hidePop(a) {
	document.getElementById(a).style.display="none";
	document.getElementById("greyBox").style.display="none";
	document.getElementById("greyBox").style.zIndex=300
}

function WebForm_Sondage_Validation(){

	var radio_choice1a = false;
	var radio_choice1b = false;
	var radio_choice1c = false;
	var radio_choice1d = false;
	var radio_choice1e = false;
	var answer2_dropDownList = false;
	var answer3_dropDownList = false;
	var answer4_dropDownList = false;
	
	for (i = 0; i < document.sondageForm.Answer1aRadioList.length; i++){
	if (document.forms.sondageForm.Answer1aRadioList[i].checked) { 
		radio_choice1a = true;}
	if (document.forms.sondageForm.Answer1bRadioList[i].checked) { 
		radio_choice1b = true;}
	if (document.forms.sondageForm.Answer1cRadioList[i].checked) { 
		radio_choice1c = true;}
	if (document.forms.sondageForm.Answer1dRadioList[i].checked) { 
		radio_choice1d = true;}
	if (document.forms.sondageForm.Answer1eRadioList[i].checked) { 
		radio_choice1e = true;}	
	}
	
	if (!radio_choice1a){
	document.getElementById("ctl00_ContentPlaceHolder1_Answer1aRequiredField").style.display = "inline";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer1aRequiredField").style.display = "none";}
	if (!radio_choice1b){
	document.getElementById("ctl00_ContentPlaceHolder1_Answer1bRequiredField").style.display = "inline";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer1bRequiredField").style.display = "none";}
	if (!radio_choice1c){
	document.getElementById("ctl00_ContentPlaceHolder1_Answer1cRequiredField").style.display = "inline";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer1cRequiredField").style.display = "none";}
	if (!radio_choice1d){
	document.getElementById("ctl00_ContentPlaceHolder1_Answer1dRequiredField").style.display = "inline";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer1dRequiredField").style.display = "none";}
	if (!radio_choice1e){
	document.getElementById("ctl00_ContentPlaceHolder1_Answer1eRequiredField").style.display = "inline";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer1eRequiredField").style.display = "none";}
	
	if (document.forms.sondageForm.Answer2DropDownList.value == "") { 
		document.getElementById("ctl00_ContentPlaceHolder1_Answer2RequiredField").style.visibility = "visible";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer2RequiredField").style.visibility = "hidden";
		answer2_dropDownList=true;}
	
	if (document.forms.sondageForm.Answer3DropDownList.value == "") { 
		document.getElementById("ctl00_ContentPlaceHolder1_Answer3RequiredField").style.visibility = "visible";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer3RequiredField").style.visibility = "hidden";
		answer3_dropDownList=true;}
	
	if (document.forms.sondageForm.Answer4DropDownList.value == "") { 
		document.getElementById("ctl00_ContentPlaceHolder1_Answer4RequiredField").style.visibility = "visible";
	}else{document.getElementById("ctl00_ContentPlaceHolder1_Answer4RequiredField").style.visibility = "hidden";
		answer4_dropDownList=true;}
	
	document.getElementById("urlCourant").value = urlCourant; 
	document.getElementById("nomSection").value = nomSection; 
	document.getElementById("noDivision").value = noDivision; 
	
	if (!radio_choice1a || !radio_choice1b || !radio_choice1c || !radio_choice1d || !radio_choice1e || !answer2_dropDownList || !answer3_dropDownList || !answer4_dropDownList){
		return (false);
		}
	
	return (true);
}

