consider removing this function. it is not used by anybody and has been broken. the use of atoi was problematic because a leading 0 could cause trouble. also, only 3-digit numbers could be converted. in any event, here is a version that correctly converts "&#[0-9]+;" for any length number.