function verifier() {
	var regexp = /\w[\w\-\.]*@\w[\w\-\.]*\.[a-z]{2,}/i;
	var courriel = document.getElementById('courriel').value;
	var message = document.getElementById('message').value;
	if(courriel != "") {
 		if(!regexp.test(courriel)) {
			alert('Adresse de courriel non valide!');
			document.getElementById('courriel').focus();
			return false;
  		}
 	} else {
		alert('Veuillez indiquer votre adresse courriel!');
		document.getElementById('courriel').focus();
		return false;
	}
	if(message == "" || message == "message") {
		alert('Message vide!');
		document.getElementById('message').focus();
		return false;
	}
	window.document.contact.submit();
}

function openimg(url) {
	im = url;
	window.open('agr.htm','agr','width=500px,height=500px');
}
function openimgbig(url) {
	im = url;
	window.open('agr.htm','agr','width=1000px,height=1200px,scrollbars=yes');
}

function morph() {
	var busy = false, gallery = $('gallery'); 
	var image = '/images/' + 'morph_2.jpg';
	gallery.setStyles({'opacity': 0, 'display': 'block'});

	new Asset.images(image, {
		onProgress: function(i) {
			this.setStyles({
				'position': 'absolute',
				'opacity': 100,
				'left': (gallery.getCoordinates().width / 2) - (this.width / 2),
				'top': (gallery.getCoordinates().height / 2) - (this.height / 2)
			});
		},
		onComplete: function() {
			var myTimer = morph_on.delay(5000);
		}
	});

	function morph_on() {
			var fx = $('gallery').effect('opacity', {duration:2000}).start(1);
			var myTimer2 = morph_off.delay(5000);
	}
	function morph_off() {
			var fx = $('gallery').effect('opacity', {duration:2000}).start(0);
			var myTimer2 = morph_on.delay(5000);
	}
}