//load photo
function makeArray(n) {
this.length = n;
for (var i=1; i<=n; i++) {
this[i] = ""; 
}
return this;
}
var i;
function imagealeatoire1() {
i = Math.floor(36 * Math.random() + 1);
return image[i];
}
image = new makeArray(36);
image[1]="photo/IM001187.jpg";
image[2]="photo/IM001188.jpg";
image[3]="photo/IM001189.jpg";
image[4]="photo/IM001190.jpg";
image[5]="photo/IM001191.jpg";
image[6]="photo/IM001334.jpg";
image[7]="photo/IM001336.jpg";
image[8]="photo/IM001339.jpg";
image[9]="photo/IM001340.jpg";
image[10]="photo/IM001341.jpg";
image[11]="photo/IM001342.jpg";
image[12]="photo/IM001343.jpg";
image[13]="photo/IM001346.jpg";
image[14]="photo/IM001347.jpg";
image[15]="photo/IM001353.jpg";
image[16]="photo/IM001362.jpg";
image[17]="photo/IM001363.jpg";
image[18]="photo/IM001367.jpg";
image[19]="photo/IM001368.jpg";
image[20]="photo/IM001371.jpg";
image[21]="photo/IM001374.jpg";
image[22]="photo/IM001375.jpg";
image[23]="photo/IM001377.jpg";
image[24]="photo/IM001381.jpg";
image[25]="photo/0406030.jpg";
image[26]="photo/0406058.jpg";
image[27]="photo/0406059.jpg";
image[28]="photo/0406060.jpg";
image[29]="photo/0406062.jpg";
image[30]="photo/0406065.jpg";
image[31]="photo/0406068.jpg";
image[32]="photo/0406069.jpg";
image[33]="photo/0406070.jpg";
image[34]="photo/atelier-hobby003.jpg";
image[35]="photo/atelier-hobby009.jpg";
image[36]="photo/atelier-hobby002.jpg";


//verif mail
function verifSelection() {if (mail_form.champ1.value == "") {
alert("Veuillez entrer un nom !")
return false
} if (mail_form.champ2.value == "") {
alert("Veuillez entrer un prénom !")
return false
} if (mail_form.champ6.value == "") {
alert("Veuillez entrer un pays !")
return false
} if (mail_form.zone_email.value == "") {
alert("Veuillez entrer un email !")
return false
}

invalidChars = " /:,;'"

for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
badChar = invalidChars.charAt(i)

if (mail_form.zone_email.value.indexOf(badChar,0) > -1) {
alert("Votre adresse e-mail contient des caractères invalides. Veuillez vérifier.")
mail_form.zone_email.focus()
return false
}
}

atPos = mail_form.zone_email.value.indexOf("@",1)			// there must be one "@" symbol
if (atPos == -1) {
alert('Votre adresse e-mail ne contient pas le signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

if (mail_form.zone_email.value.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
alert('Il ne doit y avoir qu\'un signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

periodPos = mail_form.zone_email.value.indexOf(".",atPos)

if (periodPos == -1) {					// and at least one "." after the "@"
alert('Vous avez oublié le point "." après le signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

if (periodPos+3 > mail_form.zone_email.value.length)	{		// must be at least 2 characters after the 
alert('Il doit y avoir au moins deux caractères après le signe ".". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}if (mail_form.zone_texte.value == "") {
alert("Veuillez entrer un commentaire !")
return false
} }



//Google
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20062495-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
