an = true;
        
        var i:Number = cardNumber.length;
        while (--i > -1) {
            if (alt)
                sum += Number(cardNumber.substr(i, 1));
            else {
                pre =  Number(cardNumber.substr(i, 1)) * 2;
                sum += (pre > 8) ? pre -= 9 : pre;
            }
            
            alt = !alt;
        }
        
        return sum % 10 == 0;
    }
    
    /**
        Determines US credit card provider by card number.
        
        @param cardNumber: Th