12. Given the quadratic function
$$
y=a(a+1) x^{2}-(2 a+1) x+1,
$$

where $a$ is a positive integer.
(1) If the graph of the function $y$ intersects the $x$-axis at points $A$ and $B$, find the length of segment $AB$;
(2) If $a$ takes the values $1, 2, \cdots, 2005$ successively, the 2005 line segments intercepted by the graph of the function $y$ on the $x$-axis are $A_{1} B_{1}, A_{2} B_{2}, \cdots, A_{2000} B_{2000}$, find the sum of the lengths of these 2005 line segments.
Three, 12. (1) Let the graph of the function $y$ intersect the $x$-axis at two points $A\left(x_{1}, 0\right), B\left(x_{2}, 0\right)$, then $x_{1}, x_{2}$ are the two real roots of the equation
$$
a(a+1) x^{2}-(2 a+1) x+1=0
$$

Given that $y$ is a quadratic function, we have $a \neq 0$ and $a \neq -1$.
Also, $\Delta=(2 a+1)^{2}-4 a(a+1)=1>0$, so $x_{1}, x_{2}$ are two distinct real roots of the above equation, and
$$
x_{1}+x_{2}=\frac{2 a+1}{a(a+1)}, x_{1} x_{2}=\frac{1}{a(a+1)} .
$$

Then $|A B|=\left|x_{1}-x_{2}\right|=\sqrt{\left(x_{1}+x_{2}\right)^{2}-4 x_{1} x_{2}}$
$$
\begin{array}{l}
=\sqrt{\left[\frac{2 a+1}{a(a+1)}\right]^{2}-\frac{4}{a(a+1)}}=\sqrt{\left[\frac{1}{a(a+1)}\right]^{2}} \\
=\frac{1}{|a(a+1)|}=\frac{1}{a(a+1)} .
\end{array}
$$

Therefore, the length of the segment is $\frac{1}{a(a+1)}$ (where $a$ is a positive integer).
(2) When $a$ takes the values $1, 2, \cdots, 2005$ respectively, the lengths of the segments obtained are
$$
\begin{array}{l}
\left|A_{1} B_{1}\right|=\frac{1}{1 \times 2},\left|A_{2} B_{2}\right|=\frac{1}{2 \times 3}, \cdots, \\
\left|A_{2008} B_{2008}\right|=\frac{1}{2005 \times(2005+1)} . \\
\text { Hence }\left|A_{1} B_{1}\right|+\left|A_{2} B_{2}\right|+\cdots+\left|A_{2000} B_{2000}\right| \\
=\frac{1}{1 \times 2}+\frac{1}{2 \times 3}+\cdots+\frac{1}{2005 \times(2005+1)} \\
=\left(1-\frac{1}{2}\right)+\left(\frac{1}{2}-\frac{1}{3}\right)+\cdots+\left(\frac{1}{2005}-\frac{1}{2006}\right) \\
=1-\frac{1}{2006}=\frac{2005}{2006} .
\end{array}
$$