I don't understand this solution at all I am reading a book on probability, where one of the examples is:

Exercise A random sample is taken in order to nd the proportion of Labour voters in a population. Find
  a sample size such that the probability of a sampling error less than $0.04$ will be $0.99$ or greater.

Solution $0.04\sqrt{n}\geq 2.58\sqrt{pq}$ where $pq\leq 1/4$ so $n\sim 1040$.
I don't have a clue what this means $-$ I recognise $2.58$ from $\Phi (2.58)\sim 0.99$ where $\Phi$ is the c.d.f of a standard normal distribution, and I am guessing $q=1-p$ which would explain $pq\leq 1/4$. But I cannot see how all of this is being used. Can someone clear this up, please?
 A: Suppose that we use a sample of size $n$. Let $X$ be the number of Labour voters in the sample. Let the sample proportion $\bar{X}$ be $\frac{X}{n}$.
The random variable $X$ has binomial distribution, parameters $p$ and $n$, where $p$ is the unknown proportion of Labour voters in the entire population.
Note that random variable $X$ has mean $np$, and variance $np(1-p)$.
Thus $\bar{X}$ has mean $p$ and variance $\frac{p(1-p)}{n}$.
Since $p$ is presumably of middling size, neither close to $0$ nor close to $1$, and we will be using a large sample, the random variable $\bar{X}$ has a close to normal distribution.
Note that $p(1-p)\le\frac{1}{4}$. Thus $\sqrt{p(1-p)}\le\frac{1}{2}$. Moreover, if $p$ is of middling size, $\sqrt{p(1-p)}$ is not far from $\frac{1}{2}$. (You might want to compute $\sqrt{x(1-x)}$ for say $x=0.4$.)
Thus the probability that $|\bar{X}-p|\ge 0.04$ is close to the probability that $|Z|\le \frac{0.04}{\sqrt{p(1-p)/n}}$, where $Z$ is standard normal Using our approximation for $\sqrt{p(1-p)}$, the probability is close to the probability that $|Z|\ge \frac{0.04}{1/(2\sqrt{n})}$. We want this probability to be $\le 0.01$. 
From the table of the standard normal, we get that we want
$$\frac{0.04}{1/(2\sqrt{n})}\approx 2.58.$$
Now algebra gives $\sqrt{n}\approx \frac{2.58}{0.08}$. Square to get the appropriate $n$. 
