This fucntion is very useful to me. thanks for given such type of soluation.