  The spectral properties of the Schr\"odinger operator $T_ty= -y''+q_ty$ in
$L^2(\R)$ are studied, with a potential $q_t(x)=p_1(x), x<0, $ and
$q_t(x)=p(x+t), x>0, $ where $p_1, p$ are periodic potentials and $t\in \R$ is
a parameter of dislocation. Under some conditions there exist simultaneously
gaps in the continuous spectrum of $T_0$ and eigenvalues in these gaps. The
main goal of this paper is to study the discrete spectrum and the resonances of
$T_t$. The following results are obtained: i) In any gap of $T_t$ there exist
$0,1$ or 2 eigenvalues. Potentials with 0,1 or 2 eigenvalues in the gap are
constructed. ii) The dislocation, i.e. the case $p_1=p$ is studied. If $t\to
0$, then in any gap in the spectrum there exist both eigenvalues ($ \le 2 $)
and resonances ($ \le 2 $) of $T_t$ which belong to a gap on the second sheet
and their asymptotics as $t\to 0 $ are determined. iii) The eigenvalues of the
half-solid, i.e. $p_1={\rm constant}$, are also studied. iv) We prove that for
any even 1-periodic potential $p$ and any sequences $\{d_n\}_1^{\iy}$, where
$d_n=1$ or $d_n=0$ there exists a unique even 1-periodic potential $p_1$ with
the same gaps and $d_n$ eigenvalues of $T_0$ in the n-th gap for each $n\ge 1.$
