OK, I knew I was missing something! I'm embarrased to even post this. \:\)

 Code:
Function A($)
   dim $l, $i, $b, $c, $x, $d
   $l = Len($)
   $d = Left($, 1)
   If ($d = 3 and $l = 15) or ($d > 3 and $d < 7 and $l = 16)
      $x = 0
      For $i = $l - 1 to 0 Step -1
         $b = Substr($, $i + 1, 1)
         If ($l - $i) mod 2 = 0
            $c = 2 * $b
            $b = IIF($c > 9, 0 + Left($c, 1) + Right($c, 1), $c)
         EndIf
         $x = $x + $b
      Next
      $d = IIF($x mod 10, 0, $d)
   Else
      $d = 0
   EndIf
   $A = $d
EndFunction