!        CALL WDIALOGSELECT(IDD_NONSURF1)
C
C       FIELDS
        IF(SYSTEM1(92).EQ.0.0D0.AND.SYSTEM1(93).EQ.0.0D0.AND.
     1  SYSTEM1(96).EQ.0.0D0.AND.SYSTEM1(97).EQ.0.0D0) THEN
C       NOT PYIM,PXIM,RYIM OR RXIM
C
C       FIX SYSTEM1(49)
        IF(SYSTEM1(18).EQ.0.0D0.AND.SYSTEM1(18).EQ.SYSTEM1(19)) THEN
C       OBJ HT SAME MODE
C       WRITE(OUTLYNE,*) SYSTEM1(14),SYSTEM1(16)
C       CALL SHOWIT(1)
C       WRITE(OUTLYNE,*) SYSTEM1(15),SYSTEM1(17)
C       CALL SHOWIT(1)
        IF(SYSTEM1(14).EQ.SYSTEM1(16).AND.SYSTEM1(15).EQ.SYSTEM1(17)
     1  .AND.SYSTEM1(49).EQ.2.0D0.OR.
     1  SYSTEM1(14).EQ.SYSTEM1(16).AND.SYSTEM1(15).EQ.SYSTEM1(17)
     1  .AND.SYSTEM1(49).EQ.3.0D0) SYSTEM1(49)=SYSTEM1(49)-1.0D0
                        END IF
        IF(SYSTEM1(18).EQ.1.0D0.AND.SYSTEM1(18).EQ.SYSTEM1(19)) THEN
C       OBJ ANG SAME MODE
C       WRITE(OUTLYNE,*) SYSTEM1(21),SYSTEM1(23)
C       CALL SHOWIT(1)
C       WRITE(OUTLYNE,*) SYSTEM1(22),SYSTEM1(24)
C       CALL SHOWIT(1)
        IF(SYSTEM1(21).EQ.SYSTEM1(23).AND.SYSTEM1(22).EQ.SYSTEM1(24)
     1  .AND.SYSTEM1(49).EQ.2.0D0.OR.
     1  SYSTEM1(21).EQ.SYSTEM1(23).AND.SYSTEM1(22).EQ.SYSTEM1(24).AND.
     1  SYSTEM1(49).EQ.3.0D0) SYSTEM1(49)=SYSTEM1(49)-1.0D0
                        END IF
                        ELSE
        IF(SYSTEM1(92).NE.0.0D0.AND.SYSTEM1(93).NE.0.0D0.AND.
     1SYSTEM1(92).EQ.SYSTEM1(93).AND.SYSTEM1(49).EQ.2.0D0.OR.
     1SYSTEM1(92).NE.0.0D0.AND.SYSTEM1(93).NE.0.0D0.AND.
     1SYSTEM1(92).EQ.SYSTEM1(93).AND.SYSTEM1(49).EQ.3.0D0)
     4SYSTEM1(49)=SYSTEM1(49)-1.0D0
        IF(SYSTEM1(96).NE.0.0D0.AND.SYSTEM1(97).NE.0.0D0.AND.
     1SYSTEM1(96).EQ.SYSTEM1(97).AND.SYSTEM1(49).EQ.2.0D0.OR.
     1SYSTEM1(96).NE.0.0D0.AND.SYSTEM1(97).NE.0.0D0.AND.
     1SYSTEM1(96).EQ.SYSTEM1(97).AND.SYSTEM1(49).EQ.3.0D0)
     4SYSTEM1(49)=SYSTEM1(49)-1.0D0
                        END IF
C
        IF(SYSTEM1(49).NE.2.0D0.AND.SYSTEM1(49).NE.3.0D0) THEN
!        CALL WDIALOGPUTCHECKBOX(IDF_SAMEFIELD,1)
                        ELSE
!        CALL WDIALOGPUTCHECKBOX(IDF_SAMEFIELD,0)
                        END IF
        IF(SYSTEM1(60).EQ.1.0D0.OR.SYSTEM1(61).EQ.1.0D0) THEN
        SYSTEM1(60)=1.0D0
        SYSTEM1(61)=1.0D0
                END IF
C       SCY/SCX OR SCY FANG/SCX FANG EXPLICITLY
        IF(SYSTEM1(18).EQ.0.0D0) THEN
C       SCY/SCX
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F1)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(16))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(14))
!        CALL WDIALOGFIELDSTATE(IDF_CX,1)
!        CALL WDIALOGFIELDSTATE(IDF_CY,1)
!        CALL WDIALOGPUTDOUBLE(IDF_CX,SYSTEM1(17))
!        CALL WDIALOGPUTDOUBLE(IDF_CY,SYSTEM1(15))
                        ELSE
C       SCY FANG/SCX FANG
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F2)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(23))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(21))
!        CALL WDIALOGFIELDSTATE(IDF_CX,1)
!        CALL WDIALOGFIELDSTATE(IDF_CY,1)
!        CALL WDIALOGPUTDOUBLE(IDF_CX,SYSTEM1(24))
!        CALL WDIALOGPUTDOUBLE(IDF_CY,SYSTEM1(22))
                        END IF
        IF(SYSTEM1(94).NE.0.0D0.OR.SYSTEM1(95).NE.0.0D0) THEN
        SYSTEM1(94)=SYSTEM1(95)
C       PYIM AND PXIM
        IF(SYSTEM1(94).EQ.-1.0D0) THEN
C       PXIM/PYIM
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F3)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(92))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(93))
!        CALL WDIALOGCLEARFIELD(IDF_CX)
!        CALL WDIALOGCLEARFIELD(IDF_CY)
!        CALL WDIALOGFIELDSTATE(IDF_CX,2)
!        CALL WDIALOGFIELDSTATE(IDF_CY,2)
                        ELSE
C       PXIM FANG, PXIM FANG
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F4)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(92))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(93))
!        CALL WDIALOGCLEARFIELD(IDF_CX)
!        CALL WDIALOGCLEARFIELD(IDF_CY)
!        CALL WDIALOGFIELDSTATE(IDF_CX,2)
!        CALL WDIALOGFIELDSTATE(IDF_CY,2)
                        END IF
                        END IF
        IF(SYSTEM1(98).NE.0.0D0.OR.SYSTEM1(99).NE.0.0D0) THEN
        SYSTEM1(98)=SYSTEM1(99)
C       RYIM AND RXIM
!        IF(SYSTEM1(98).EQ.-1.0D0) THEN
C       RXIM/RYIM
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F5)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(96))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(97))
!        CALL WDIALOGCLEARFIELD(IDF_CX)
!        CALL WDIALOGCLEARFIELD(IDF_CY)
!        CALL WDIALOGFIELDSTATE(IDF_CX,2)
!        CALL WDIALOGFIELDSTATE(IDF_CY,2)
!                        ELSE
C       RXIM FANG, RXIM FANG
!        CALL WDIALOGPUTRADIOBUTTON(IDF_F6)
!        CALL WDIALOGPUTDOUBLE(IDF_XREF,SYSTEM1(96))
!        CALL WDIALOGPUTDOUBLE(IDF_YREF,SYSTEM1(97))
!        CALL WDIALOGCLEARFIELD(IDF_CX)
!        CALL WDIALOGCLEARFIELD(IDF_CY)
!        CALL WDIALOGFIELDSTATE(IDF_CX,2)
!        CALL WDIALOGFIELDSTATE(IDF_CY,2)
!                        END IF
                        END IF
!        CALL WDialogShow(-1,-1,0,Modeless)
