// Painel de Controle

function auth()
{
	document.getElementById('form_login').onsubmit = function() 
	{
		with( this )
		{
			if( f_usr.value == '' )
			{
				alert("Por favor, informe o Usuário.");
				f_usr.focus();
				return false;
			}
			
			if( f_senha.value == '' )
			{
				alert("Por favor, informe a Senha.");
				f_senha.focus();
				return false;
			}
			
			return true;
		}
	}
}

// PLANO VOCÊ ******************************************************************

function val_form_contribuicao_pv()
{
	document.getElementById('form_contribuicao_pv').onsubmit = function() 
	{
		with( this )
		{
			if( f_titulo.value == '' )
			{
				alert("Por favor, informe o Título de sua contribuição");
				f_titulo.focus();
				return false;
			}
			
			if( f_descricao.value == '' )
			{
				alert("Por favor, digite a Descrição de sua contribuição");
				f_descricao.focus();
				return false;
			}
			
			if( f_arquivo.value == '' )
			{
				alert("Por favor, adicione o arquivo");
				f_arquivo.focus();
				return false;
			}
			
			if( f_aceite_regra_envio_arquivos.checked == false )
			{
				alert("Você deve ler e aceitar a Regra para envio de arquivos.");
				return false;
			}
			
			return true;
		}
	}
}