public static function SetUserMode($sMode)
    {
        $aAllowedModes = array('register', 'user', 'guest');
        if (false == in_array($sMode, $aAllowedModes)) {
            trigger_error('invalid mode requested. please use one of '.implode(', ', $aAllowedModes), E_USER_ERROR);
        }
        $_SESSION['tw_order_umode'] = $sMode;
    }