//exemplo de chamadas
//			if(valCampo('txtNome',2,'o nome!')==false) return false;			
//			if(valCampo('txtEmail',2,'o e-mail!')==false) return false;			
//			if(valMail('txtEmail')==false) return false;
//			if(valCampo('txtComentario',2,'um comentario!')==false) return false;	
//			if(eLementos('txtComentario').value.length>500){
//				alert('O campo comentário aceita no máximo 500 caracteres.')
//				eLementos('txtComentario').focus();
//				return false;
//			}
//			eLementos('formComentario').submit();



//[BEGIN]-Função principal iniciada no <body>, verifica todos os formularios do site
function initValidacao(){
	
	///Form de busca da Home
	if(eLementos('tbBuscaHome')){
		eLementos('tbBuscaHome').onclick = function(){	
		if(valCampo('txtKeyWords',1,'uma palavra!')==false) return false;
			eLementos('formBusca').submit();
		}		
	}
}//



///Form de hot site de Hotel
function Valida_HotSitesHotel(){
	if (eLementos('language').value=='en-us'){
		var msg ='a hotel to access the site!';
	}else{
		var msg ='a hotel to access the site!';
	}
	if(valSelect('cod_hotel','',msg,eLementos('language').value)==false) return false;
}

///Form de hot site de Reservas
function Valida_HotSitesReservas(){
	if (eLementos('language').value=='en-us'){
		var msg ='a hotel to access the online reservation services!';
	}else{
		var msg ='um hotel para acessar o sistema de reservas on-line!';
	}
	if(valSelect('cod_reserva','',msg,eLementos('language').value)==false) return false;
}


///Form de hot site de Empreendimentos 
function valEmpreend(){
	if (eLementos('language').value=='en-us'){
		var msg ='a real state!';
	}else{
		var msg ='um empreendimento!';
	}
	if(valSelect('cod_grupo','',msg,eLementos('language').value)==false) return false;
}

///Login do Form de Empreendimentos 
function valLoginPessoal(){
	if (eLementos('language').value=='en-us'){
		var msg ='Password!';
	}else{
		var msg ='sua senha!';
	}
	if(valMail('txtEmail',eLementos('language').value)==false) return false;
	if(valCampo('txtSenha',3,msg,eLementos('language').value)==false) return false;
}

///cpf primeiro acesso
function valCpf() {
    if (eLementos('language').value == 'en-us') {
        var msg = 'your CPF!';
    } else {
    var msg = 'o seu CPF!';
    }
    if (valCampo('cpf', 14, msg, eLementos('language').value) == false) return false;
}

function valEsqueci_Senha() {
    if (eLementos('language').value == 'en-us') {
        var msg = 'your CPF!';
    } else {
        var msg = 'o seu CPF!';
    }
    if (valMail('txtEmail', eLementos('language').value) == false) return false;
}



///Form de RI 
function valAddNewsletter(){
	if (eLementos('language').value=='en-us'){
		var msg ='the name!';
	}else{
		var msg ='o nome!';
	}
	if(valCampo('txtNome',3,msg,eLementos('language').value)==false) return false;	
	if(valMail('txtEmail',eLementos('language').value)==false) return false;	
}

//[END]-Função principal iniciada no <body>, verifica todos os formularios do site
