//INICIO VALIDACAO FALE CONOSCO
function VALIDA_FALECONOSCO() {
	if (document.faleconosco.clienteFaleConosco.value.length == "") {
		window.alert("Informe se ja e cliente AP Motos.");
		document.faleconosco.clienteFaleConosco.focus();
		return false;
	}
	if (document.faleconosco.nomeFaleConosco.value.length == "") {
	    window.alert("Informe o Nome.");
		document.faleconosco.nomeFaleConosco.focus();
		return false;
	}
	if (document.faleconosco.emailFaleConosco.value == "") {
		window.alert("Informe E-mail.");
		document.faleconosco.emailFaleConosco.focus();
		return false;
	}
	if (document.faleconosco.departamentoFaleConosco.value.length == "") {
		window.alert("Informe o Departamento.");
		document.faleconosco.departamentoFaleConosco.focus();
		return false;
	}
	if (document.faleconosco.assuntoFaleConosco.value.length == "") {
		window.alert("Informe o Assunto.");
		document.faleconosco.assuntoFaleConosco.focus();
		return false;
	}
	if (document.faleconosco.mensagemFaleConosco.value.length == "") {
		window.alert("Informe a Mensagem.");
		document.faleconosco.mensagemFaleConosco.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO FALE CONOSCO 

//INICIO VALIDACAO CLIENTE EXISTE
function VALIDA_CLIENTE_EXISTE() {
	if (document.Cliente.EmailCliente.value == "") {
		window.alert("Informe o Email.");
		document.Cliente.EmailCliente.focus();
		return false;
	}
	if (document.Cliente.SenhaCliente.value == "") {
		window.alert("Informe a Senha.");
		document.Cliente.SenhaCliente.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO CLIENTE EXISTE

//INICIO VALIDACAO CLIENTE NOVO
function VALIDA_CLIENTE_NOVO() {
	if (document.cliente.RazaoCliente.value == ""){
		window.alert("Informe a Razão Social.");
		document.cliente.RazaoCliente.focus();
		return false;
	}
	if (document.cliente.NomeFantasiaCliente.value == ""){
		window.alert("Informe o Nome Fantasia.");
		document.cliente.NomeFantasiaCliente.focus();
		return false;
	}
	if (document.cliente.CnpjCliente.value == ""){
		window.alert("Informe o CNPJ.");
		document.cliente.CnpjCliente.focus();
		return false;
	}
	if (document.cliente.ContatoCliente.value == ""){
		window.alert("Informe a Pessoa de Contato.");
		document.cliente.ContatoCliente.focus();
		return false;
	}
	if (document.ClienteNovo.CepCliente.value == "") {
		window.alert("Informe o CEP.");
		document.ClienteNovo.CepCliente.focus();
		return false;
	}
	if (document.ClienteNovo.EnderecoCliente.value == "") {
		window.alert("Informe o Endereço.");
		document.ClienteNovo.EnderecoCliente.focus();
		return false;
	}
	if (document.ClienteNovo.NuEnderecoCliente.value == "") {
		window.alert("Informe a Numero.");
		document.ClienteNovo.NuEnderecoCliente.focus();
		return false;
	}
	if (document.ClienteNovo.BairroCliente.value == "") {
		window.alert("Informe o Bairro.");
		document.ClienteNovo.BairroCliente.focus();
		return false;
	}
	if (document.ClienteNovo.CodEstado.value == "0") {
		window.alert("Informe o Estado.");
		document.ClienteNovo.CodEstado.focus();
		return false;
	}
	if (document.ClienteNovo.CodCidade.value == "0") {
		window.alert("Informe a Cidade.");
		document.ClienteNovo.CodCidade.focus();
		return false;
	}
	if (document.ClienteNovo.EmailCliente.value == "") {
		window.alert("Informe o E-mail.");
		document.ClienteNovo.EmailCliente.focus();
		return false;
	}
	if (document.ClienteNovo.SenhaCliente.value == "") {
		window.alert("Informe a Senha.");
		document.ClienteNovo.SenhaCliente.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO CLIENTE NOVO


//INICIO VALIDACAO CLIENTE LOGIN
function VALIDA_LOGIN_CLIENTE() {
	if (document.ClienteNovo2.txtClienteEmail.value == "") {
	    window.alert("Informe o email.");
		document.ClienteNovo2.txtClienteEmail.focus();
		return false;
	}
	if (document.ClienteNovo2.txtClienteSenha.value == "") {
		window.alert("Informe a Senha.");
		document.ClienteNovo2.txtClienteSenha.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO CLIENTE LOGIN

//INICIO VALIDACAO CLIENTE CADASTRADO
function VALIDA_CLIENTE_CADASTRADO() {
	if (document.ClienteCadastrado.FormEmail.value == "") {
	    window.alert("Informe o email.");
		document.ClienteCadastrado.FormEmail.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO CLIENTE CADASTRADO

//INICIO VALIDACAO RESET SENHA
function VALIDA_RESET_SENHA() {
	if (document.resetsenha.EmailCliente.value == "") {
	    window.alert("Informe o email.");
		document.resetsenha.EmailCliente.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO RESET SENHA

//INICIO VALIDACAO CURRICULO
function VALIDA_CURRICULO() {
	if (document.curriculo.Nome.value.length == "") {
	    window.alert("Informe o Nome.");
		document.curriculo.Nome.focus();
		return false;
	}
	if (document.curriculo.Email.value.length == "") {
		window.alert("Informe E-mail.");
		document.curriculo.Email.focus();
		return false;
	}
	if (document.curriculo.DddTelefone.value.length == "") {
		window.alert("Informe o DDD do Telefone.");
		document.curriculo.DddTelefone.focus();
		return false;
	}
	if (document.curriculo.Telefone.value.length == "") {
		window.alert("Informe o Telefone.");
		document.curriculo.Telefone.focus();
		return false;
	}
	if (document.curriculo.CodEstado.value == "0") {
		window.alert("Informe o Estado.");
		document.curriculo.CodEstado.focus();
		return false;
	}
	if (document.curriculo.CodCidade.value == "0") {
		window.alert("Informe a Cidade.");
		document.curriculo.CodCidade.focus();
		return false;
	}
	if (document.curriculo.arquivo.value.length == "") {
		window.alert("Favor anexar o Currículo.");
		document.curriculo.arquivo.focus();
		return false;
	}
	if (document.curriculo.departamento.value == "") {
		window.alert("Informe o Departamento.");
		document.curriculo.departamento.focus();
		return false;
	}
	if (document.curriculo.mensagem.value.length == "") {
	    window.alert("Informe a Mensagem.");
		document.curriculo.mensagem.focus();
		return false;
	}	
	return true;
}
//FIM VALIDACAO CURRICULO 

//INICIO VALIDACAO ORCAMENTO PRE
function VALIDA_ORCAMENTO_PRE($indice) {
	preencheu = false;
	   for (i=0;i<document.myForm.selecao.length;i++){
           if (document.myForm.selecao[i].checked == true){
			   window.alert("[Atenção] -  Existem itens selecionados, por favor adicione os mesmos no orçamento antes de alterar de página.");
		       preencheu = true;
			   break;
		   }
       }
	if(preencheu == false){
	    window.location = 'orcamento.php?indice='+$indice;
		return false;
	}
	return true;
}
//FIM VALIDACAO FALE ORCAMENTO PRE 

//INICIO VALIDACAO ORCAMENTO
function VALIDA_ORCAMENTO() {
	if (document.myForm.codigoFormaPagto.value == 0) {
	    window.alert("Informe a forma de pagamento.");
		document.myForm.codigoFormaPagto.focus();
		return false;
	}
	return true;
}
//FIM VALIDACAO ORCAMENTO 
