DisableLayers()
Please note that this function does not free any layers that are attached to a background picture. They will be kept until you free them or until Hollywood is closed. So you can also disable layers temporarily and enable them again later and you will not lose any layers.
Please note though that it is generally not advised to switch between layered and non-layered modes because both modes are not really compatible with each other. Thus, the best idea is certainly to define whether or not a display should use layers at display creation time (e.g. when calling @DISPLAY or CreateDisplay()) and then stick to this decision. Mixing layered and non-layered sections in the same display is really only recommended if you know exactly what you are doing.
See Layers introduction for details.