What do you think of having this done on the server?  It seems reasonable that other clients would probably want to take advantage of the same logic