////
// Função para pegar eventos de teclado em diferentes browsers
 function F_pega_evento(V_evento) {
	
	if (!V_evento) var V_evento = window.event
	if (V_evento.keyCode) { V_tecla = V_evento.keyCode;  }
	else if (V_evento.which) { V_tecla = V_evento.which; }
}

////
function F_numeros(V_evento) {
	
	F_pega_evento(V_evento);
	// && (V_tecla < 96 || V_tecla > 105) ???? libera letras?
	if  ( ( V_tecla < 48 || V_tecla > 57 )  && ( V_tecla != 8 ) ) { return false; } else { return; }

}	

////
function F_alfanum(V_evento){

	F_pega_evento(V_evento);
	
	if( 
		(V_tecla != 32) && (V_tecla != 39)  && ( V_tecla != 8 ) && 
	    (V_tecla < 48) || (V_tecla > 57) && 
	    (V_tecla < 65) || (V_tecla > 90) &&
		(V_tecla < 97) || (V_tecla > 122) && 
		(V_tecla != 126) && (V_tecla != 227) && (V_tecla != 233) && 
		(V_tecla != 225) && (V_tecla != 237) && (V_tecla != 243) && 
		(V_tecla != 245) && (V_tecla != 250) 
	   ) 	{ return false; } else { return; } 
}

////
function F_alfanum2(V_evento){
	
	F_pega_evento(V_evento);
	
	if( 
		(V_tecla != 32) && (V_tecla != 39) && (V_tecla != 44) && (V_tecla != 45) && (V_tecla != 46) &&  ( V_tecla != 8 ) && 
	    (V_tecla < 48) || (V_tecla > 57) && 
	    (V_tecla < 65) || (V_tecla > 90) &&
		(V_tecla < 97) || (V_tecla > 122) && 
		(V_tecla != 126) && (V_tecla != 227) && (V_tecla != 233) && 
		(V_tecla != 225) && (V_tecla != 237) && (V_tecla != 243) && 
		(V_tecla != 245) && (V_tecla != 250) 
	   ) 	{ return false; } else { return; } 
}

////
function F_letras(V_evento){
	
	F_pega_evento(V_evento);
	
	if( 
		(V_tecla != 32) && (V_tecla != 39) &&  ( V_tecla != 8 ) && 
	    (V_tecla < 65) || (V_tecla > 90) &&
		(V_tecla < 97) || (V_tecla > 122) && 
		(V_tecla != 126) && (V_tecla != 227) && (V_tecla != 233) && 
		(V_tecla != 225) && (V_tecla != 237) && (V_tecla != 243) && 
		(V_tecla != 245) && (V_tecla != 250) 
	   ) 	{ return false; } else { return; } 
}

////
function F_valor(V_evento){
	
	F_pega_evento(V_evento);
	
	if( (V_tecla == 32) || (V_tecla != 44) && (V_tecla != 46) && ( V_tecla != 8 ) && (V_tecla < 48) || (V_tecla > 57) ){ return false; } else { return; }
}

////
function F_cep(V_evento){
	
	F_pega_evento(V_evento);
	
	if( (V_tecla == 32) || (V_tecla != 45) && ( V_tecla != 8 ) &&  (V_tecla < 48) || (V_tecla > 57) ){ return false; } else { return; }
}

////
function F_data(V_evento){
	
	F_pega_evento(V_evento);
	
	if( (V_tecla == 32) || (V_tecla != 47) && ( V_tecla != 8 ) &&  (V_tecla < 48) || (V_tecla > 57) ){ return false; } else { return; }
}

////
function F_hora(V_evento){
	
	F_pega_evento(V_evento); 
	
	if( (V_tecla == 32) || (V_tecla < 48) || (V_tecla > 58) ){ return false; } else { return; }
}

////
function F_fones(V_evento){
	
	F_pega_evento(V_evento);
	
	if( (V_tecla != 32) && (V_tecla != 45) && (V_tecla != 47) && ( V_tecla != 8 ) &&  (V_tecla < 48) || (V_tecla > 57) ){ return false; } else { return; }
}

////
function F_docs(V_evento){
	
	F_pega_evento(V_evento);
	
	if( (V_tecla < 45) || (V_tecla > 57) && ( V_tecla != 8 ) ){ return false; } else { return; }
}

