We use some Lua that's basically a combination of the posted links. It catches the edge cases a little better. Some things are just easier to do in a "real" programming language. --Brian