Mount Cifs Fileshares on connecting to network.

Ok I am looking for a way for cifs fileshares listed in /etc/fstab to be mounted automatically when I connect to a network (wireless or lan).
At the moment if I am not connected when the laptop tuns on it just ignores them even if it connects later during the session.

I know this is possible as I have done it before (I cant remember how). How do I go about doing this?