Well, first of all you need to make the function consistent with the parameters you pass. Anyway, this thread should help:
http://www.programmingforums.org/for...ead.php?t=3602
It discusses how to convert a string to an int, so it may prove useful.
kirkl_uk