	subroutine fixlim(ello,del,ido)
c
	include '/u1/gcf/e350/crystal/cb/datbin'
c
	include '/u1/gcf/e350/crystal/cb/clouds'
c
	include '/u1/gcf/e350/crystal/cb/beam'
c
	include '/u1/gcf/e350/crystal/cb/fixcom'
	include '/u1/gcf/e350/crystal/cb/wenbin'
c
	include '/u1/gcf/e350/crystal/cb/igr'
c
	ido=0
	do 1 ibm=1,nbeam
	edet=ello+.5*del
	ptsq=-edet*avt/ebm(ibm)
	sigcur=resolv(edet)
	thlo=amax1(efromm(vm2(igr),ptsq),edet-4.*sigcur)
	thhi=amin1(efromm(vm1(igr),ptsq),edet+4.*sigcur)
	if (thhi.le.thlo) goto 2
	call wgtint(thlo,thhi,noint,val(1,ibm),wgt(1,ibm))
	do 3 j=1,noint
3		wgt(j,ibm)=wgt(j,ibm)/(thhi-thlo)
1		continue
	return
c
2		ido=1
	return
c
	end
