added global constants EXPANDED and COLLAPSED.