program OW_edithor

use sep

implicit none

logical			:: vmut,vper,vvel,vchg
character*120                  :: hor1,hor2
character*120                 :: line,b
integer			:: i1,i2,n1,n2,i

call sep_init()
call sep_begin_prog()

call from_param('hor1',hor1)
call from_param('hor2',hor2)
open(51,file=hor1,status='old')
open(52,file=hor2)
do i2=1,9999999
   read(51,5,end=1) line
   i=index(line," 0.000000 0.000000 0.000000 0.000000 0.000000 ",.true.)
   if(line(i+46:i+48).ne."1 0") then
      write(0,*) i
      line(i+46:120)=b(i+47:120)
      line(i+46:i+48)="1 0"
   end if
   write(52,5) line
end do
5 format(a120)
1  close(51)
   close(52)
call sep_end_prog()
end program
