Hilbert class field of Quadratic fields

Is there any method to find the Hilbert Class field of quadratic fields? Is there any bound for their dimensions? For example, if $4|d-1$ then $Q(\sqrt{d},i)$ is contained in the Hilbert class field of $Q(\sqrt{-d})$, therefore $Q(\sqrt{-d})$ isn't an UFD.

-
A book dedicated to this question is Cohen's Advanced Topics in Computational Number Theory. – Dror Speiser Sep 28 '11 at 11:39
It is not true that $\mathbb Q(\sqrt{d},i)$ is the Hilbert Class Field of $\mathbb Q(\sqrt{-d})$ in general when $4 | (d-1)$, just that it is contained in the Hilbert Class Field. – Emerton Sep 28 '11 at 12:18
Emerton : Thank You ! – Sina Sep 28 '11 at 12:23
Observe that the ring of Integers of $Q(\sqrt{-d})$ when $d\equiv 1$ mod $4$ is not a UFD because the only ideal lying above $2$, which is ramified, cannot be principal (the integer $2$ is not a norm). The theory of complex multiplication (in case you did not know) relates the Hilbert class field of an imaginary quadratic filed K to the j-invariant of any elliptic curve with CM by the integers of K (one can learn this in "Primes of the form x^2+ny^2" by D.cox) – Tommaso Centeleghe Sep 28 '11 at 12:37
For your second question, the answer is no by genus theory: The more primes that divide d, the bigger the class group. – Cam McLeman Sep 28 '11 at 12:49