## Javascript - 157 (78 without dictionary)

Ok some of these languages are a lot more flexibile than I thought!  Anyway this is the longer way I guess, but a different technique at least.

**Compressed**

    a=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101];function b(c){r=1;for(i=0;i<c.length;i++)r*=a[c[i].charCodeAt(0)-97];return r}

Then do:

    alert(b("hello")==b("elloh"));

**Expanded Code**

    a = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101];
    function b(c, d) {
        return s(c) == s(d);
    }
    function s(t) {
        r = 1;
        for (i = 0; i < t.length; i++) {
            r = r * a[t[i].charCodeAt(0) - 97];
        }
        return r;
    }
    
    alert(b("hello", "hlleo"));