Two-loop diagrams in nonrelativistic QCD with elliptics