C
C *** EIGEN VALUE EQUATION OF LOVE WAVE, IN CASE OF C=VS(NL)
C
      REAL FUNCTION FNCA21*8 (OM)
C
C INPUT DATA
C OM     : CIRCULAR FREQUENCY ( OMEGA )
C OUTPUT DATA
C FNCA21 : EIGEN VALUE EQUATION OF LOVE WAVE, IN CASE OF C=VS(NL)
C
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON / LAYER / NL,VS(35),DEP(35),SM(35)
      COMPLEX*16 R11,R12,R21,R22,SA11,SA12,SA21,SA22
     *         ,SB11,SB12,SB21,SB22
C
      BN=VS(NL)
      WN=OM/BN
C
      R11=(1.0D0,0.0D0)
      R12=(0.0D0,0.0D0)
      R21=(0.0D0,0.0D0)
      R22=(1.0D0,0.0D0)
C
      DO 100 ML=1,NL-1
C
        SA11=R11
        SA12=R12
        SA21=R21
        SA22=R22
C
        BM=VS(ML)
        RBM=DSQRT(BN*BN/(BM*BM)-1.0D0)
        QM=WN*RBM*DEP(ML)
        CQ=DCOS(QM)
        SQ=DSIN(QM)
C
        SB11=DCMPLX(CQ,0.0D0)
        SB12=DCMPLX(0.0D0,SQ/(SM(ML)*RBM))
        SB21=DCMPLX(0.0D0,SQ*SM(ML)*RBM)
        SB22=DCMPLX(CQ,0.0D0)
C
        R11=SB11*SA11+SB12*SA21
        R12=SB11*SA12+SB12*SA22
        R21=SB21*SA11+SB22*SA21
        R22=SB21*SA12+SB22*SA22
C
  100 CONTINUE
C
      FNCA21=IMAG(R21)
C
      RETURN
      END
