function quartz_tc_log_comm(Branch)

declare function msg, get_property, entid, key_sort, repository, fieldcount, set_property, send_message
declare subroutine extract_si_keys, make.list

begin condition
pre:
post:
end condition

$insert quartz_tc_log_equ

$insert msg_equates
$insert logical
$insert popup_equates

equ Hidden$ to 32
equ White$  to 16777215
equ Gray$   to 12632256
equ Black$  to 1

ReturnVar = 0
Branches = 'TC_CHG_TYPE'
convert ',' to @fm in Branches
locate Branch in Branches using @fm setting Bpos then
   on Bpos gosub TC_CHG_TYPE
end else
   Void = msg( '', 'Invalid Branch ':Bpos:' passed to reactor_log_comm' )
end
return ReturnVar
*===============================================================================================*
TC_CHG_TYPE:
ReplacedAll    = get_property( @window:'.REPLACED_ALL', 'CHECK' )
ReplacedFront  = get_property( @window:'.REPLACED_FRONT', 'CHECK' )
ReplacedSide   = get_property( @window:'.REPLACED_SIDE', 'CHECK' )
ReplacedRear   = get_property( @window:'.REPLACED_REAR', 'CHECK' )
ReplacedCenter = get_property( @window:'.REPLACED_CENTER', 'CHECK' )
if ( ReplacedAll = 0 ) and ( ReplacedFront = 0 ) and ( ReplacedSide = 0 ) and ( ReplacedRear = 0 ) and ( ReplacedCenter = 0 ) then
   * SET ALL ACTIVE
		Void = set_property( @window:'.REPLACED_FRONT', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_SIDE', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_REAR', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_CENTER', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_ALL', 'ENABLED', 1 )   
end else
	if ReplacedAll then
		Void = set_property( @window:'.REPLACED_FRONT', 'ENABLED', 0 )
		Void = set_property( @window:'.REPLACED_SIDE', 'ENABLED', 0 )
		Void = set_property( @window:'.REPLACED_REAR', 'ENABLED', 0 )
		Void = set_property( @window:'.REPLACED_CENTER', 'ENABLED', 0 )
		Void = set_property( @window:'.REPLACED_ALL', 'ENABLED', 1 )
	end else
		Void = set_property( @window:'.REPLACED_FRONT', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_SIDE', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_REAR', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_CENTER', 'ENABLED', 1 )
		Void = set_property( @window:'.REPLACED_ALL', 'ENABLED', 0 )
	end
end
return
*===============================================================================================*

