String permutation

This script takes a string and returns all of its permutations recursively. (Limited the number of characters to 5 to protect your browser from a recursive death). I'll try to make a non-recursive version soon to increase speed. I mainly tried this to see how javascript handles deep, ugly recursion (not too well it seems). If you want to see the code, it's all in this page's source, with comments.

String to permutate: