We present homogeneous abundance determinations for iron and some of the elements involved in the proton-capture reactions (O, Na, Mg, Al, and Si) for 202 red giants in 17 Galactic globular clusters (GCs) from the analysis of high-resolution UVES spectra obtained with the FLAMES facility at the ESO VLT2 telescope. Our programme clusters span almost the whole range of the metallicity distribution of GCs and were selected to sample the widest range of global parameters (horizontal-branch morphology, masses, concentration, etc.). In this paper we focus on the discussion of the Na-O and Mg-Al anticorrelations and related issues. Our study finds clear Na and O star-to-star abundance variations, exceeding those expected from the error in the analysis, in all clusters. Variations in Al are present in all but a few GCs. Finally, a spread in abundances of Mg and Si are also present in a few clusters. Mg is slightly less overabundant and Si slightly more overabundant in the most Al-rich stars. The correlation between Si and Al abundances is a signature of production of 28 Si leaking from the Mg-Al cycle in a few clusters. The cross sections required for the proper reactions to take over in the cycle point to temperatures in excess of about 65 million K for the favoured site of production. We used a dilution model to infer the total range of Al abundances starting from the Na and Al abundances in the FLAMES-UVES spectra, and the Na abundance distributions found from analysis of the much larger set of stars for which FLAMES-GIRAFFE spectra were available. We found that the maximum amount of additional Al produced by first-generation polluters contributing to the composition of the second-generation stars in each cluster is closely correlated with the same combination of metallicity and cluster luminosity that reproduced the minimum O-abundances found from GIRAFFE spectra. We then suggest that the high temperatures required for the Mg-Al cycle are only reached in the most massive and most metal-poor polluters.