Crypto libary with Commutative Encryption I want to implement Mental Poker in JavaScript as a toy program and lead in to a larger serious project so I did my research and found Massey-Omura cryptosystem and the Shamir three-pass protocol however I couldn't find any implementations of them, and the information on how to do SRA is scant. Would anyone be able to shed some light on how to implement Commutative Encryption with SRA(RSA) or know of a Massey-Omura/Shamir library?
Why can't you use RSA? Look at their description of a function on pp. 41-42, and you'll see that it is a perfectly valid choice.

So you have two users, $A$ and $B$, who want to play. One user, say $A$, selects $p \cdot q = n$, as per $RSA$, and sends that information to $B$. Both $A$ and $B$ independently choose large primes (or large numbers they confirm are coprime to $\phi(n)$) $e_A$ and $e_B$, and then compute $d_ae_a \equiv 1 \pmod n$ and $d_be_b \equiv 1 \pmod n$. Then, $E_A = m^{e_A} \pmod n$, and so on.

Any crypto library with $RSA$ support should allow for calling the encrypt and decrypt functions with your choice of exponent and modulus. The one downside is needing to generate a reasonably large new public exponent for each hand, but that isn't too bad on a modern system.