//Funzioni varie di validazione  - Da includere in testata se si vogliono effetuare validazioni javascript

function CarattereAscii(lcCarattere) {
  var lCarattere = lcCarattere.substring(0,1);
  var liCodiceAscii = lcCarattere.charCodeAt(0);
  return liCodiceAscii;
}



function SeNumero(lsNumero) {
  var strPass = lsNumero.value;
  var strLength = strPass.length;
  var lchar = val.value.charAt((strLength) - 1);
  var liAscii = CarattereAscii(lchar);

  /* Check if the keyed in character is a number
     do you want alphabetic UPPERCASE only ?
     or lower case only just check their respective
     codes and replace the 48 and 57 */

  if (liAscii < 48 || liAscii > 57 ) {
    var ldNumero = lsNumero.value.substring(0, (strLength) - 1);
    lsNumero.value = ldNumero;
  }
  return false;
}
