Seems to be a duplicate of another thread
http://www.go4expert.com/showthread.php?t=19094

Why doesn't my response in that thread help you?
Are you simply looking for someone to write the code for you or do you want help solving the problem yourself?