Possible to access fog distance by script?

I am using the fog settings found under the lighting window, but midway though my scene I would like to reduce the end distance of the fog, can this be done via scripting?