• Actaully i was not able to come up with a solution for that problem, so the assignment was given to other guy. I had shown him this thread. He said that , he used ChrisM solution. It work prefectly fine for himwith some changes.

    There were changes because i had not posted the correct info at first.