// JavaScript Document
function visualizar_regulamento()
{
	$.ajax({
		url: "ajax.php",
		type: 'post',
		cache: false,
		data: {acao: 'visualizar_regulamento', id_evento: $("#id_evento").val()},
		dataType: 'json',
		success: function(retorno)
		{
			$("#div_dialog").html(decode(retorno.html));
			$("#div_dialog").dialog('destroy');
				$("#div_dialog").dialog({ 
					height: 400,
					show: 'slide',
					width: 500,
					hide: 'slide',
					modal: true,	
					resizable: false,
					draggable: false,
					title: 'Regulamento'
				});
			
		},
		error: function(XMLHttpRequest, textStatus, errorThrown)
		{
			alert(textStatus);
		}
	});	
	
}

function regulamento_exibir()
{
	$("#acao_site").val('regulamento_exibir');
	$("#dados").action = 'index.php';
	$("#dados").submit();
}


function valida_regulamento()
{
	var opcao_regulamento = $('input[@name=opcao_regulamento]:checked').val();
	if(!opcao_regulamento)
	{
		alert('Selecione uma opção');
	}
	else
	{		
		if (opcao_regulamento == 'A')
		{
			$('#validar').html('<img src="imagens/loadinfo.gif" border="0" align="absmiddle" /> <font class="nome_campo"><b>Aguarde... Processando</b></font>');
			inscricoes_listar();
		}
	}
}
