Kousik,
Do you have question concerning the code you uploaded here or are you just sharing this code with other. Either way you should provide more detail.
Robert,
I just want to share this code and I forgot to give details. Thanks for your comment.
Thanks for sharing your code. Very handy.