All external lights and most of the internal lights are under the control of a module. It used to be the LM/LCM (in the old E series BMWs).
But with the new generation BMWs (e90/e60/e65/e70) OI believe the ext/int light functions are under the control of the FRM (footwell module) and possibly the JBE.
You can easily find out by using the
www.newtis.info website...just enter the last 7 digits of your VIN then type "fog lights" or something similar into the search box and you'll get a list of links that pertain to that subject.
Good luck.