       SUBROUTINE HELP10(IHSW)
       USE BLKRM10
       USE WINTERACTER

       USE RESID
       LOGICAL EXISTD
    
!       CHARACTER*255 HELPDIR
!       DATA HELPDIR/'C:\Users\RMADELL\source\repos\RMA2PRP\HELP'/
       DATA ITIME/0/
       
       IF(IHSW .EQ. 97) GO TO 500
       IF(ITIME .EQ. 1) GO TO 400
       INQUIRE(DIRECTORY=HELPDIR,EXIST=EXISTD)
       IF(EXISTD) THEN
         CWDIR=HELPDIR
         ITIME=1
       ELSE         
         IF(CWDIR .EQ. HELPDIR) THEN
           ITIME=1
           GO TO 400
         ELSE
           ITIME=1
           IFLAGS=0
           CALL WSelectDir(IFLAGS,CWDIR, 'Select HELP Directory')
         
         ENDIF
       ENDIF
400    CONTINUE
!   GET LENGTH OF DIRECTORY TEXT
       DO K=255,1,-1
         LENNAME=K
         IF(CWDIR(K:K) .NE. ' ') EXIT

       ENDDO
       IF(IHSW .EQ. 0) THEN
         CALL WHelpFile(CWDIR(1:K)//'\FILES.htm')
       ELSEIF(IHSW .EQ. 1) THEN
         CALL WHelpFile(CWDIR(1:K)//'\datalines.htm')
       ELSEIF(IHSW .EQ. 5) THEN
         CALL WHelpFile(CWDIR(1:K)//'\TIMESTP1.htm')
       ELSEIF(IHSW .EQ. 6) THEN
         CALL WHelpFile(CWDIR(1:K)//'\TIMESTP2.htm')
       ELSEIF(IHSW .EQ. 7) THEN
         CALL WHelpFile(CWDIR(1:K)//'\TIMESTP0.htm')
       ELSEIF(IHSW .EQ. 8) THEN
         CALL WHelpFile(CWDIR(1:K)//'\EXTRA.htm')
       ELSEIF(IHSW .EQ. 20) THEN
         CALL WHelpFile(CWDIR(1:K)//'\CONTROL1.htm')
       ELSEIF(IHSW .EQ. 21) THEN
         CALL WHelpFile(CWDIR(1:K)//'\CONTROL2.htm')
       ELSEIF(IHSW .EQ. 22) THEN
         CALL WHelpFile(CWDIR(1:K)//'\CONTROL3.htm')
       ELSEIF(IHSW .EQ. 23) THEN
         CALL WHelpFile(CWDIR(1:K)//'\CONTROL4.htm')
       ELSEIF(IHSW .EQ. 99) THEN
         CALL WHelpFile(CWDIR(1:K)//'\RMA2V90.htm')
       ELSEIF(IHSW .EQ. 98) THEN
         CALL WHelpFile(CWDIR(1:K)//'\INTRO.htm')
       ENDIF
       RETURN
500    CONTINUE       
       call wdialogload(IDD_SELCT)
       ierr=infoerror(1)

       CALL WDialogSelect(IDD_SELCT)
       ierr=infoerror(1)
       CALL WDialogShow(-1,-1,0,Modal)

       ierr=infoerror(1)
       do
      
         IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
           RETURN
         ENDIF
       ENDDO
       RETURN
       END