var CODE_MENU_SONDAGE = null;
function sondage(){
	$("#validSondage").click(function(){
		
		$(this).parents(".bloc_desc_ministere").find("input[name='reponse']").each(function(i){
			if($(this).is(":checked")){
				var sondage 	= $(this).parents(".bloc_desc_ministere").find("input[name='sondage']").val();
					$.ajax({
					   type: "POST",
					   url: "sondage_action.php",
					   data: "sondage="+sondage+"&reponse="+$(this).val()+"&vote="+$(this).next().val(),
					   success: function(msg){ 
						 $("#zone_sondage_"+sondage).html(msg);
					   }
					 });
				
			}
	    });
	});

	
	}
	function validSondage(code_sondage){

		$("#zone_sondage_"+code_sondage).find("input[name='reponse']").each(function(i){
				if($(this).is(":checked")){
					$.ajax({
						   type: "POST",
						   url: "sondage_action.php",
						   data: "sondage="+code_sondage+"&reponse="+$(this).val()+"&vote="+$(this).next().val(),
						   success: function(msg){ 
							 $("#zone_sondage_"+code_sondage).html(msg);
						   }
					});
					$.ajax({
						   type: "POST",
						   url: "sondage_action_accueil.php",
						   data: "sondage="+code_sondage+"&reponse="+$(this).val()+"&vote="+$(this).next().val(),
						   success: function(msg1){ 
							 $("#sondage_index"+code_sondage).html(msg1);
						   }
					});
				}
		});
		
}
function fbs_click(url,code,code_el,titre,code_video) {
	u = url+"partage_fb.php?code="+code+"&code_el="+code_el+"&code_video="+code_video;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(titre),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}

function fbs_event_click(url,code,code_el,titre) {
	u = url+"partage_fb_event.php?code="+code+"&code_el="+code_el;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(titre),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}

