function validadorCep(e,src,mask) {
    if(window.event) { _TXT = e.keyCode; }
    else if(e.which) { _TXT = e.which; }
    if(_TXT > 47 && _TXT < 58) {
 var i = src.value.length; var saida = mask.substring(0,1); var texto = mask.substring(i)
 if (texto.substring(0,1) != saida) { src.value += texto.substring(0,1); }
    return true; } else { if (_TXT != 8) { return false; }
 else { return true; }
    }
}

function MM_formt(chr,src,mask, e) {
    var tecla = (window.event)?event.keyCode:e.which;
    if( ( tecla == 8 ) || ( tecla == 9 ) || ( tecla == 11 ) || ( tecla == 0 ) ) 
     return true;
     
 var i = src.value.length;
 var texto = mask.substring(i);
 
  if (texto.substring(0,1) != chr) { 
   src.value += texto.substring(0,1);
  }
  
  return true; 
} 
 
// verifica se é um numero, backspace ou tab e retorna true
function SomenteNumero(e){
    var tecla=(window.event)?event.keyCode:e.which;
    if((tecla > 47 && tecla < 58))
     return true;
    else{
     if( ( tecla == 8 ) || ( tecla == 9 ) || ( tecla == 11 ) || ( tecla == 0 ) ) 
      return true;
     else 
      return false;
 }
}
 // verifica se é um numero, backspace ou tab e retorna true
function SomenteNumeroDouble(e){
    var tecla=(window.event)?event.keyCode:e.which;
    if((tecla > 47 && tecla < 58) || (tecla == 46))
     return true;
    else{
     if( ( tecla == 8 ) || ( tecla == 9 ) || ( tecla == 11 ) || ( tecla == 0 ) ) 
      return true;
     else 
      return false;
 }
}


