In reply to Harish_G:
Please use code tags making your code easier to read. I have added them for you.
It also seems you manually retyped your code rather than copy/pasting it. There are many typos. Please correct these before asking someone to look at your code.