Ummm...didn't you guys just suggest the inverse of what the original poster was asking for?
It's been awhile since I've coded and quite likely my brain's fuzzy, but I thought he was asking for a function with a numerical argument that would return a string, not a function with a string argument that would return a number.
:-)
EDIT: oh sure! Clear up the above post that came out right when I ws posting to make me look like the guy who can't read the whole thread! :-P
Am I reading that right? Does the above code support up to base 36?