      SUBROUTINE SHOWEXTR
!   SHOW EXTRA PAGE    

      USE WINTERACTER

      USE RESID
      
      USE BLKRM10

      integer ilb(3)      
      CHARACTER*6 KEYL
      character*1 alab
300   CONTINUE       
      call wdialogload(IDD_EXTR)
      ierr=infoerror(1)

      CALL WDialogSelect(IDD_EXTR)
      ierr=infoerror(1)
      
      CALL WGridPutCellString(IDF_GRID3,1,1,'TYP-ELTP')
      CALL WGridPutCellString(IDF_GRID3,2,1,'BRD-DECK')
      CALL WGridPutCellString(IDF_GRID3,3,1,'BRD-LMAN')
      CALL WGridPutCellString(IDF_GRID3,4,1,'BRD-HMAN')
      CALL WGridPutCellString(IDF_GRID3,5,1,'BRD-BLOK')
      CALL WGridPutCellString(IDF_GRID3,6,1,'BRD-FORM')
      CALL WGridPutCellString(IDF_GRID3,7,1,'BRD-SRGF')
      CALL WGridPutCellString(IDF_GRID3,8,1,'BRD-INSW')
      CALL WGridPutCellString(IDF_GRID3,2,2,'PIP-DIAM')
      CALL WGridPutCellString(IDF_GRID3,3,2,'PIP-LMAN')
      CALL WGridPutCellString(IDF_GRID3,4,2,'PIP-HMAN')
      CALL WGridPutCellString(IDF_GRID3,6,2,'PIP-ENTL')
      CALL WGridPutCellString(IDF_GRID3,7,2,'PIP-EXTL')
      CALL WGridPutCellString(IDF_GRID3,8,2,'PIP-NUMB')
      CALL WGridPutCellString(IDF_GRID3,2,3,'CUL-HGHT')
      CALL WGridPutCellString(IDF_GRID3,3,3,'CUL-LMAN')
      CALL WGridPutCellString(IDF_GRID3,4,3,'CUL-HMAN')
      CALL WGridPutCellString(IDF_GRID3,6,3,'CUL-ENTL')
      CALL WGridPutCellString(IDF_GRID3,7,3,'CUL-EXTL')
      CALL WGridPutCellString(IDF_GRID3,8,3,'CUL-NUMB')
      CALL WGridPutCellString(IDF_GRID3,2,4,'MAN-ELVL')
      CALL WGridPutCellString(IDF_GRID3,3,4,'MAN-LMAN')
      CALL WGridPutCellString(IDF_GRID3,4,4,'MAN-HMAN')
      CALL WGridPutCellString(IDF_GRID3,5,4,'MAN-ELVH')
      CALL WGridPutCellString(IDF_GRID3,6,4,'MAN-SLOP')
      JJ=0
      JK=0
      DO J=1,1000
        IF(IEXTYP(J) .LE. 0) CYCLE
        IF(IEXTYP(J) .EQ. 4) THEN
          WRITE(ALAB,'(''B'')') 
        ELSEIF(IEXTYP(J) .EQ. 3) THEN
          WRITE(ALAB,'(''P'')') 
        ELSEIF(IEXTYP(J) .EQ. 2) THEN
          WRITE(ALAB,'(''C'')')
        ELSEIF(IEXTYP(J) .EQ. 1) THEN
          WRITE(ALAB,'(''M'')')
        ELSEIF(IEXTYP(J) .EQ. 5) THEN
          JK=JK+1
          CALL WGridPutCellInteger(IDF_GRID4,1,JK,J)
          CALL WGridPutCellInteger(IDF_GRID4,2,JK,IGATE(J,1))
          CALL WGridPutCellInteger(IDF_GRID4,3,JK,IGATE(J,2))
          GO TO 310
        ENDIF
        JJ=JJ+1
        CALL WGridPutCellString(IDF_GRID2,1,JJ,ALAB)
        CALL WGridPutCellInteger(IDF_GRID2,2,JJ,J)
        CALL WGridPutCellReal(IDF_GRID2,3,JJ,ELMMIN(J))
        CALL WGridPutCellReal(IDF_GRID2,4,JJ,MANMIN(J))
        IF(ALAB .EQ. 'M') THEN
          CALL WGridPutCellReal(IDF_GRID2,5,JJ,MANMAX(J))
          CALL WGridPutCellReal(IDF_GRID2,6,JJ,ELMMAX(J))
          CALL WGridPutCellReal(IDF_GRID2,7,JJ,MANSLOP(J))
        ELSE
          CALL WGridPutCellReal(IDF_GRID2,5,JJ,ELMMAX(J))
          IF(IEXTYP(J) .EQ. 4) THEN
            CALL WGridPutCellReal(IDF_GRID2,6,JJ,MANMAX(J))
            CALL WGridPutCellReal(IDF_GRID2,7,JJ,MANSLOP(J))
            CALL WGridPutCellReal(IDF_GRID2,8,JJ,BF2(J))
          ELSE  
            CALL WGridPutCellReal(IDF_GRID2,7,JJ,MANMAX(J))
            CALL WGridPutCellReal(IDF_GRID2,8,JJ,MANSLOP(J))
          ENDIF
          CALL WGridPutCellInteger(IDF_GRID2,9,JJ,IBF1(J))
        ENDIF
310     CONTINUE
      ENDDO

      DO J=1,JET
        CALL WGridPutCellInteger(IDF_GRID1,1,J,IELTOPIP(J))
        CALL WGridPutCellInteger(IDF_GRID1,2,J,IPIPTOEL(J))
      ENDDO
      
      CALL WDialogShow(-1,-1,0,Modal)

      ierr=infoerror(1)
      do
         IF (WInfoDialog(ExitButton) .EQ. IDF_HELP) THEN
           IHSW=8
           CALL HELP10(IHSW)
           GO TO 300
         ELSEIF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
             
           DO J=1,1000
             CALL WGridGetCellString(IDF_GRID2,1,J,ALAB)
             IF(ALAB .EQ. ' ') EXIT
             CALL WGridGetCellInteger(IDF_GRID2,2,J,JJ)
    
             CALL WGridGetCellReal(IDF_GRID2,3,J,ELMMIN(JJ))
             CALL WGridGetCellReal(IDF_GRID2,4,J,MANMIN(JJ))
             IF(ALAB .EQ. 'M') THEN
               CALL WGridGetCellReal(IDF_GRID2,5,J,MANMAX(JJ))
               CALL WGridGetCellReal(IDF_GRID2,6,J,ELMMAX(JJ))
               CALL WGridGetCellReal(IDF_GRID2,7,J,MANSLOP(JJ))
             ELSE
               CALL WGridGetCellReal(IDF_GRID2,5,J,ELMMAX(JJ))
               IF(ALAB .EQ. 'B') THEN
                 CALL WGridGetCellReal(IDF_GRID2,6,J,MANMAX(JJ))
                 CALL WGridGetCellReal(IDF_GRID2,7,J,MANSLOP(JJ))
                 CALL WGridGetCellReal(IDF_GRID2,8,J,BF2(JJ))
               ELSE
                 CALL WGridGetCellReal(IDF_GRID2,7,J,MANMAX(JJ))
                 CALL WGridGetCellReal(IDF_GRID2,8,J,MANSLOP(JJ))
               ENDIF
               CALL WGridGetCellInteger(IDF_GRID2,9,J,IBF1(JJ))
             ENDIF
             IF(ALAB .EQ. 'B') THEN
               IEXTYP(JJ)=4
             ELSEIF(ALAB .EQ. 'P') THEN
               IEXTYP(JJ)=3
             ELSEIF(ALAB .EQ. 'C') THEN
               IEXTYP(JJ)=2
             ELSE
               IEXTYP(JJ)=1
             ENDIF
           ENDDO

           DO J=1,10
             CALL WGridGetCellInteger(IDF_GRID1,1,J,IELTOPIP(J))
             IF(IELTOPIP(J) .LT. 0) THEN
               JET=J-1
               EXIT
             ENDIF
             CALL WGridGetCellInteger(IDF_GRID1,2,J,IPIPTOEL(J))
           ENDDO
           
           DO J=1,10
             CALL WGridGetCellInteger(IDF_GRID4,1,J,JGATE)
             IF(JGATE .LE. 0) EXIT
             CALL WGridGetCellInteger(IDF_GRID4,2,J,IGATE(JGATE,1))
             CALL WGridGetCellInteger(IDF_GRID4,3,J,IGATE(JGATE,2))
           ENDDO
           
           
           RETURN
                
         ELSEIF (WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
           return
         ENDIF
      enddo
      
      RETURN
      END