function get_mode_icon( CurMode, Mode )

$Insert REACTOR_MODES_EQUATES

devswitch = XLATE('SYSLISTS','DEV_SWITCH', 1, 'X')

IF devswitch AND XLATE('REACTOR_MODES', CurMode, '', 'X') NE '' then
    Icon = XLATE('REACTOR_MODES', CurMode, REACTOR_MODES_ICON$, 'X')
    IF Icon EQ '' then
        //Icon = 'NONA'
    end
end else
    Codes = ''
    Descs = ''
    Icons = ''
    PopupData = XLATE('SYSREPOSPOPUPS','LSL2**REACTOR_MODE',8,'X')
    FOR I = 1 TO COUNT(PopupData,@VM) + (@VM NE '')
        Codes<I> = PopupData<1,I,1>
        Descs<I> = TRIM(PopupData<1,I,2>)
        Icons<I> = PopupData<1,I,3>
    NEXT I
    
    LOCATE CurMode IN Descs USING @FM SETTING POS THEN
        Icon = Icons<Pos>
    END ELSE
        Icon = 'NONA'
    END 
end


RETURN Icon
