Well, loading PHP into AOLserver just to do that would be absurd, so
if you want to handle it server-side, implementing your algorithm in
Tcl would be the way to go. It doesn't sound that hard.
Or if you want to do it client-side for IE only, Joe C. seems to have
a lot of good info on that.