Cadastro = {
	txtNome : '',
	txtEmail : '',
	
	valida : function(){
		this.txtNome = document.getElementById('txtNome').value;
		this.txtEmail = document.getElementById('txtEmail').value;
		
		if(this.txtNome=='')
			return 'Preencha o campo Nome.';

		if(FuncoesGerais.ValidaEmail(this.txtEmail)==0)
			return 'Preencha o campo E-mail corretamente.';
					
		return 'ok';
	},
	
	enviar : function(){
		var validacao = this.valida();
		if(validacao=='ok'){
			pageDefault.Cadastro(this.txtNome, this.txtEmail).value;
			document.getElementById('DivErro').style.display='none';
			document.getElementById('txtNome').value = "";
			document.getElementById('txtEmail').value = "";
			document.getElementById('DivSucesso').style.display='';
		}else{
			document.getElementById('DivErro').style.display='';
		}
	}
}
