how it works:

screenshot1
all layers are visible
AllLayers


screenshot2
background, bottomline, layer two, layer four, layer five, layer eight and layer nine are visible.
layer one, layer three, layer six and layer seven are invisible.
background, bottomline and layer nine shall stay visible. (no anchor set -> don't toggle visibility)
layer six shall stay invisible. (no anchor set -> don't toggle visibility)
layer one, layer three and layer seven shall become visible. (anchor set -> toggle visibility)
layer two, layer four, layer five and layer eight shall become invisible. (anchor set -> toggle visibility)
ToggleOne


screenshot3
result of toggle visibility script:
ToggleTwo


the next toggle leads to status as seen in screenshot2 again.