You have the code (in my previous post) to create the function. Shouldn't be any problem.
Forum Rules