I've had this problem for a few weeks. Went to the shop where and bought it and was surprised to see the shop assistant take out the SIM and clean it. I was even more surprised when it focussed properly afterwards. The joy was shortlived as it reverted back to not focussing after about 10 minutes. It must have had some effect however as I've found I can now get sharp pictures by adjusting the focus manually for each shot (not ideal).
I'm sure there must be a more useful fix but this seems to work short term.
Dave
January 2009