program OW_edithor

use sep

implicit none

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

call sep_init()
call sep_begin_prog()

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