ZVISION: Added global StateFlags and set/get/unset functions.