Try searching here on the board using different keywords.

Plenty of code and UDF stuff to do what you want.

Sorry don't have time to do the search for you right now.