Wifi Doesn't connect to internet in my i5801 in my phone i can connect to any wifi but when i start browser or market or any application that requires internet. It shows no network connection. 

I have tried following things 

Tried several different wifi network,
forget network and connect again and enter password,
restart device 

Following is my Device information
Device : Samsung Galaxy i5801,
OS : android 2.2, 
Baseband version : I5801DDJP2,
Build Number : FROYO.DDJP6,
Kernel Version : 2.6.32.9

any help is appriciated
as i go to setting's advance option i noticed i have checked use static IP address and given some fix ip address ... that's why wifi was not working. removing that everything works