vivek.visen 0 Newbie Poster

hello,
I am working on gridview in a project in which i have to apply javascript on gridview. there are 2 events whcih i have to apply on it 1st is that when i click an image the gridview should be opened and when i select an item in gridview the gridview should be closed.and 3rd is when i click anywhere on the asp page the gridview should be closed.
I have tried many times but the script is not working properly.please help me by providing me code snippet for this problem.

thanks...