        SUBROUTINE SPSRFFRESH(J)
!        USE WINTERACTER
        IMPLICIT NONE
        INCLUDE 'RESOURCE.INC'
        INCLUDE 'DATMAI.INC'
        INCLUDE 'DATLEN.INC'
        INTEGER J
        CHARACTER AJ*3
        REAL*8 DOUBARRAY(1:96)
C
C       SPECIAL SURFACES
C
!        CALL WDialogSelect(IDD_SPSRF)
        J=EDIT_SURFACE
        CALL ITOAA(J,AJ)
!        CALL WDialogPutInteger(IDF_SURFNUM,J)
C
C
C       NO SPECIAL SURFACES
        IF(ALENS(34,EDIT_SURFACE).EQ.0.0D0) THEN
        DOUBARRAY(1:96)=0.0D0
!        CALL WDIALOGPUTRADIOBUTTON(IDF_SP1)
!        CALL WDIALOGCLEARFIELD(IDF_SPON1)
!        CALL WDIALOGCLEARFIELD(IDF_SPON2)
!        CALL WDIALOGFIELDSTATE(IDF_SPON1,2)
!        CALL WDIALOGFIELDSTATE(IDF_SPON2,2)
                        ELSE
!        CALL WDIALOGCLEARFIELD(IDF_SP1)
                        END IF
C       SPECIAL SURFACES
        IF(ALENS(34,EDIT_SURFACE).NE.0.0D0) THEN
        DOUBARRAY(1:96)=FTFL01(1:96,J)
!        IF(ALENS(34,J).GT.0.0D0)
!     1  CALL WDIALOGPUTRADIOBUTTON(IDF_SPON1)
!        IF(ALENS(34,J).LT.0.0D0)
!     1  CALL WDIALOGPUTRADIOBUTTON(IDF_SPON2)
!        CALL WDIALOGFIELDSTATE(IDF_SPON1,2)
!        CALL WDIALOGFIELDSTATE(IDF_SPON2,2)
!        CALL WDIALOGFIELDSTATE(IDF_B1,2)
!        CALL WDIALOGFIELDSTATE(IDF_B2,2)
!        CALL WDIALOGFIELDSTATE(IDF_B3,2)
!        CALL WDIALOGFIELDSTATE(IDF_B4,2)
!        CALL WDIALOGFIELDSTATE(IDF_B5,2)
!        CALL WDIALOGFIELDSTATE(IDF_B6,2)
!        CALL WDIALOGFIELDSTATE(IDF_B7,2)
!        CALL WDIALOGFIELDSTATE(IDF_B8,2)
!        CALL WDIALOGFIELDSTATE(IDF_B9,2)
!        CALL WDIALOGFIELDSTATE(IDF_B10,2)
!        CALL WDIALOGFIELDSTATE(IDF_B11,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12a,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12b,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12c,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12d,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12e,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12f,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12g,2)
!        CALL WDIALOGFIELDSTATE(IDF_B12h,2)
!        CALL WDIALOGFIELDSTATE(IDF_B13,2)
!        CALL WDIALOGFIELDSTATE(IDF_B14,2)
!        CALL WDIALOGFIELDSTATE(IDF_B15,2)
!        CALL WDIALOGFIELDSTATE(IDF_B16,2)
!        CALL WDIALOGFIELDSTATE(IDF_B17,2)
!        CALL WDIALOGFIELDSTATE(IDF_B18,2)
!        CALL WDIALOGFIELDSTATE(IDF_B19,2)
!        CALL WDIALOGFIELDSTATE(IDF_B20,2)
!        CALL WDIALOGFIELDSTATE(IDF_B21,2)
!        CALL WDIALOGFIELDSTATE(IDF_B22,2)
!        CALL WDIALOGFIELDSTATE(IDF_B23,2)
        IF(DABS(ALENS(34,J)).EQ.1.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B1)
        CALL LOADGRIDB1(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.2.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B2)
        CALL LOADGRIDB2(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.3.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B3)
        CALL LOADGRIDB3(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.4.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B4)
        CALL LOADGRIDB4(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.5.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B5)
        CALL LOADGRIDB5(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.6.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B6)
        CALL LOADGRIDB6(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.7.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B7)
        CALL LOADGRIDB7(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.8.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B8)
        CALL LOADGRIDB8(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.9.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B9)
        CALL LOADGRIDB9(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.10.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B10)
        CALL LOADGRIDB10(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.11.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B11)
        CALL LOADGRIDB11(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.0.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12a)
        CALL LOADGRIDB12A(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.1.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12b)
        CALL LOADGRIDB12B(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.2.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12c)
        CALL LOADGRIDB12C(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.3.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12d)
        CALL LOADGRIDB12D(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.4.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12e)
        CALL LOADGRIDB12E(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.5.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12f)
        CALL LOADGRIDB12F(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.6.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12g)
        CALL LOADGRIDB12G(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.12.0D0.AND.
     1  FTFL01(11,J).EQ.7.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B12h)
        CALL LOADGRIDB12H(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.13.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B13)
        CALL LOADGRIDB13(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.14.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B14)
        CALL LOADGRIDB14(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.15.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B15)
        CALL LOADGRIDB15(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.16.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B16)
        CALL LOADGRIDB16(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.17.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B17)
        CALL LOADGRIDB17(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.18.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B18)
        CALL LOADGRIDB18(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.19.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B19)
        CALL LOADGRIDB19(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.20.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B20)
        CALL LOADGRIDB20(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.21.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B21)
        CALL LOADGRIDB21(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.22.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B22)
        CALL LOADGRIDB22(J)
                        END IF
        IF(DABS(ALENS(34,J)).EQ.23.0D0) THEN
!        CALL WDIALOGPUTRADIOBUTTON(IDF_B23)
        CALL LOADGRIDB23(J)
                        END IF
                        END IF
!        CALL WDialogShow(-1,-1,0,Modeless)
                        RETURN
                        END
