function ValidaCaracteres(num,evento,tipo){
	var key;
	var tecla;
	var Validos;
	var tipo;
	if (tipo == "R"){ Validos= "0123456789.,"; }
	if (tipo == "D"){ Validos= "0123456789."; }
	if (tipo == "P"){ Validos= "0123456789,"; }
	if (tipo == "L"){ Validos = "abcdefghijlmnopqkrstuvxzwyABCDEFGKHIJLMNOPQRSTUVXZWY0123456789/.()[]=+?!ãõÃÕâêÂÊ@¨-{}\"'*|º "; }
	if (tipo == "N"){ Validos = "0123456789"; }
	CheckTAB=true;
	if(document.all) {
		tecla = evento.keyCode; }
	else {
		tecla = evento.which;
	}
	key = String.fromCharCode(tecla);
	if (tecla == 8){ return true; }
	if (tecla == 0){ return true; }
	if (tecla == 13){ return true;}
	if (Validos.indexOf(key)!= -1){
		return key; 
	} else {
		return false;
	}
}