      subroutine anapro(u,n,orbi,nu,tipo,recou,is,priorb)
      implicit real(8) (a-h,o-x,z),logical(y)
      dimension u(n,n),nu(n),recou(n)
      character(8) orbi(n)
      character(18) tipo(n)
      allocatable yac(:),yg(:)
      allocatable u1(:,:),recou1(:),nu1(:)
      character(18),allocatable :: tipo1(:)
!
!-----------------------------------------------------------------
! Ecriture des orbitales a projection importante et des actives
!-----------------------------------------------------------------
!
      allocate(yac(n),yg(n))
      allocate(u1(n,n),recou1(n),nu1(n),tipo1(n))
      yac=.false.
      yg=.false.
      nac=0
      ng=0
      recmin=1.d0
      do k=1,n
         if(tipo(k)(1:1)=='A') then
            yac(k)=.true.
            nac=nac+1
         endif
         recmin=min(recmin,recou(k))
         if(recou(k)<priorb) then
            yg(k)=.true.
            ng=ng+1
         endif
      enddo
      print'(/,a,i2)',' Analyse de la projection    symetrie',is
      print'(i4,a,d10.4,i8,a)',ng,' orbitale(s) de recouvrement < ',
     *priorb,nac,' active(s)'
      print'(a,d10.4)',' Plus petit recouvrement :',recmin
      if(nac>0) then
         print'(/,a)','Actives'
         kk=0
         do k=1,n
            if(yac(k)) then
               kk=kk+1
               u1(:,kk)=u(:,k)
               recou1(kk)=recou(k)
               tipo1(kk)=tipo(k)
               nu1(kk)=nu(k)
            endif
         enddo
         call scriptol2(u1,n,kk,n,kk,orbi(1:n),nu1(1:kk),
     *   tipo1(1:kk),recou1(1:kk))
      endif
      if(ng>0) then
         print'(/,a)','Recouvrements faibles'
         kk=0
         do k=1,n
            if(yg(k).and..not.yac(k)) then
               kk=kk+1
               u1(:,kk)=u(:,k)
               recou1(kk)=recou(k)
               tipo1(kk)=tipo(k)
               nu1(kk)=nu(k)
            endif
         enddo
         call scriptol2(u1,n,kk,n,kk,orbi(1:n),nu1(1:kk),
     *   tipo1(1:kk),recou1(1:kk))
      endif
      deallocate(yac,yg)
      deallocate(u1,recou1,nu1,tipo1)
      return
      end
         
      
      
      
