    function luhn(numero) {
        var totalcarte=0;
        var dnum=0;
        var test=0;
        if (numero.length < 15) {
            return false;
        } else {
            for ( i = numero.length; i >= 1 ;  i--) {
                test=test+1;
                num = numero.charAt(i-1);
                if ((test % 2) != 0) {
                    totalcarte=totalcarte+parseInt(num);
                } else {
                    dnum=parseInt(num)*2;
                    if (dnum >= 10) {
                        totalcarte=totalcarte+1+dnum-10;
                    } else {
                        totalcarte=totalcarte+dnum;
                    }
                }

            }

            if ((totalcarte % 10) != 0){
                return (false);
            } else {
                return (true);
//                return (false);
            }
        }
    }
