  We derive a (weak) second term identity for the regularized Siegel-Weil
formula for the even orthogonal group, which is used to obtain a Rallis inner
product formula in the "second term range". As an application, we show the
following non-vanishing result of global theta lifts from orthogonal groups.
Let $\pi$ be a cuspidal automorphic representation of an orthogonal group
$O(V)$ with $\dim V=m$ even and $r+1\leq m\leq 2r$. Assume further that there
is a place $v$ such that $\pi_v\cong\pi_v\otimes\det$. Then the global theta
lift of $\pi$ to $Sp_{2r}$ does not vanish up to twisting by automorphic
determinant characters if the (incomplete) standard $L$-function $L^S(s,\pi)$
does not vanish at $s=1+\frac{2r-m}{2}$. Note that we impose no further
condition on $V$ or $\pi$. We also show analogous non-vanishing results when $m
> 2r$ (the "first term range") in terms of poles of $L^S(s,\pi)$ and consider
the "lowest occurrence" conjecture of the theta lift from the orthogonal group.
