function finalizar_participacao_pelo_gerenciador(id_form,id_lista){
	
	if(confirm('Tem certeza que deseja finalizar a edição de questões do participante selecionado?\nApós a confirmação desta, você não poderá mais editar as questões deste usuário nem excluí-lo')){
		window.location.href='ger_form_respostas?id_busca='+id_form+'&id_lista_concluir='+id_lista;
		} else {
		return false;	
		}
	
	}

///////////////////////////////////////////////////////////////////////////////////

function corrige_resposta(id_questao,id_participante,id_anonimo,tipo,alternativas){

	var resposta_final=' ';
	var contar=0;

	if(tipo=='texto'){
		resposta_final = document.getElementById('nova_resposta_0').value;
		}

	if(tipo!='texto'){
		
		for(i=0;i<alternativas;i++){
			var alvo="nova_resposta_"+i;
			var resposta = document.getElementById(alvo);
			
			if(resposta.checked==true){
				if(contar>0){
					resposta_final+=',';
					}
				resposta_final+=resposta.value;
				contar++;
				}
			
		}
	
	}
	
	resposta_final = escape(resposta_final);
	carregaAjax('ger_form_respostas_atualizar.php?id_questao='+id_questao+'&id_participante='+id_participante+'&id_anonimo='+id_anonimo+'&resposta='+resposta_final,dv_questao_edita,dv_carregando_questao);
	}
function mudarEstilo(alvo,estilo){
	alvo = document.getElementById(alvo);
	alvo.className=estilo;
	}

function alternaEstilo(alvo,estilo1,estilo2){
	alvo = document.getElementById(alvo);
	if(alvo.className==estilo1){
			alvo.className=estilo2;
		} else {
			alvo.className=estilo1;
		}
	}
function mudar_abas_inicial(total,atual) {
	for(i=1;i<=total;i++){
		document.getElementById("aba_"+i).className="aba_off";
		}
		document.getElementById("aba_"+atual).className="aba_on";
}

function mudarImg(id,img) {
		alvo = document.getElementById(id)
		alvo.src=img;
}
function mudarImgFundo(id,img) {
		alvo = document.getElementById(id)
		alvo.style.backgroundImage='url('+img+')';
	}
function mudarImagens(imagem,alvo){
	document.images[alvo].src = imagem;
	}
	
function ajaxPost(url,variaveis,alvo,carregando){
	
	$.ajax(
		{
		  type: "POST",
		  url: url,
		  data: variaveis,
		  processData: true,
		  cache: false,
		  beforeSend: function(){
		  		$(carregando).show();
				$(alvo).hide();
		  		},
		  success: function(html){
		  		$(carregando).hide();
				$(alvo).show();
				$(alvo).html(html);
				//$("#conteudo").innerHTML(html); -> ADICIONAR AO CONTEUDO EXISTENTE
				}
			}
		);
	}
	
function carregaAjax(url,alvo,carregando){
	$.ajax(
		{
		  url: url,
		  cache: false,
		  beforeSend: function(){
		  		$(carregando).show();
				$(alvo).hide();
		  		},
		  success: function(html){
		  		$(carregando).hide();
				$(alvo).show();
				$(alvo).html(html);
				//$("#conteudo").innerHTML(html); -> ADICIONAR AO CONTEUDO EXISTENTE
				}
			}
		);
	}

function mudaDisplay(alvo){
	alvo = document.getElementById(alvo)
	if(alvo.style.display=="block"){
		alvo.style.display="none"
		} else {
		alvo.style.display="block"
		}
	}
	
function exibe(alvo){
	alvo = document.getElementById(alvo)
	alvo.style.display="block"
	}
	
function oculta(alvo){
	alvo = document.getElementById(alvo)
	alvo.style.display="none"
	}
	
function mudarTexto(alvo,conteudo){
	document.getElementById(alvo).innerHTML = conteudo;
	}
	
function mudarSrcIframe(alvo,arquivo){
	document.getElementById(alvo).src= arquivo;
	}
	
function pos_x(posicao, alvo){
		$(document).ready(function() {
			$(alvo).animate({left: posicao}, "normal");
		});
	}
	
function pos_y(posicao, alvo){
		$(document).ready(function() {
			$(alvo).animate({top: posicao}, "normal");
		});
	}
	
function tam_x(posicao, alvo){
		$(document).ready(function() {
			$(alvo).animate({width: posicao}, "normal");
		});
	}
	
function tam_y(posicao, alvo){
		$(document).ready(function() {
			$(alvo).animate({height: posicao}, "normal");
		});
	}
	
function verificarCamposForm(campo,form){
	if (document.forms[form].elements[campo].value=="") {
	alert("Preencha o campo selecionado!")
		document.forms[form].elements[campo].focus();
		document.forms[form].elements[campo].className="erro";
		return false
		} else {
		document.forms[form].elements[campo].className="";
		return true
		}
	}

function mudarCorFundo(elem,cor) {
	if (elem.style) {
		elem.style.backgroundColor = cor
		}
	}
function mudarBorda(alvo,cor){
		alvo_borda = document.getElementById(alvo);
		alvo_borda.style.borderColor=cor;
		}