
function soNumeros(evt) {
      if (document.all) { // IE
	  	var key = event.keyCode;
	  } else { // Firefox
	  	var key = evt.charCode;
	  }
	  //var chr = String.fromCharCode(evt); // pegando a tecla digitada
	  // Se o código for menor que 20 é porque deve ser caracteres de controle
      // ex.: <ENTER>, <TAB>, <BACKSPACE> portanto devemos permitir
      // as teclas numéricas vão de 48 a 57
      if ((key<20 ) || ((key >47) && (key<58))) {
	    tecla=key;
	  	return true;
	  }
      
	  return false;
}

function mascaraData(campo) {
		if (tecla>=20) {
			if (campo.value.length==2) {
				campo.value = campo.value + "/";
			}
			if (campo.value.length==5) {
				campo.value = campo.value + "/";
			}
		}
}	
