
function Representantes() {

	this.carregar = function(estado) {
		$('edtAssunto').value = 'Representantes do estado ' + estado.toUpperCase();
		$('edtEstadoRepresentante').value = estado;
	}

}

representantes = new Representantes;


function validacaoRepresentantes(captha) {
	if ($('edtNome').value.length == 0) {
		alert('Digite o seu nome.');
		$('edtNome').focus();
		return false;
	}
	if ($('edtEmpresa')) {
		if ($('edtEmpresa').value.length == 0) {
			alert('Digite o nome de sua empresa.');
			$('edtEmpresa').focus();
			return false;
		}
	}
	if (!validacaoEmail($('edtEmail').value)) {
		alert('Digite um email valido.');
		$('edtEmail').focus();
		return false;
	}
	if ($('edtTelefone').value.length == 0) {
		alert('Digite seu telefone.');
		$('edtTelefone').focus();
		return false;
	}
	if ($('edtCidade')) {
		if ($('edtCidade').value.length == 0) {
			alert('Digite a sua cidade.');
			$('edtCidade').focus();
			return false;
		}
	}
	if ($('edtEstado')) {
		if ($('edtEstado').selectedIndex == 0) {
			alert('Selecione o seu estado.');
			$('edtEstado').focus();
			return false;
		}
	}
	if ($('edtAssunto').value.length == 0) {
		alert('Digite o assunto.');
		$('edtAssunto').focus();
		return false;
	}
	if ($('edtMensagem').value.length == 0) {
		alert('Digite sua mensagem.');
		$('edtMensagem').focus();
		return false;
	}
	if ($('edtCaptha').value != captha) {
		alert('Digite correamente o codigo verificador.');
		$('edtCaptha').focus();
		return false;
	}
}


