  The effect of disorder on flux lattices at equilibrium is studied
quantitatively in the absence of free dislocations using both the Gaussian
variational method and the renormalization group. Our results for the mean
square relative displacements clarify the nature of the crossovers with
distance. We find three regimes: (i) a short distance regime (``Larkin
regime'') where elasticity holds (ii) an intermediate regime (``Random
Manifold'') where vortices are pinned independently (iii) a large distance,
quasi-ordered regime where the periodicity of the lattice becomes important and
there is universal logarithmic growth of displacements for $2<d<4$ and
persistence of algebraic quasi-long range translational order. The functional
renormalization group to $O(\epsilon=4-d)$ and the variational method, agree
within $10\%$ on the value of the exponent. In $d=3$ we compute the crossover
function between the three regimes. We discuss the observable signature of this
crossover in decoration experiments and in neutron diffraction experiments on
flux lattices. Qualitative arguments are given suggesting the existence for
weak disorder in $d=3$ of a `` Bragg glass '' phase without free dislocations
and with algebraically divergent Bragg peaks. In $d=1+1$ both the variational
method and the Cardy-Ostlund renormalization group predict a glassy state below
the same transition temperature $T=T_c$, but with different behaviors.
Applications to $d=2+0$ systems and experiments on magnetic bubbles are
discussed.
