
function trim(str){
	str = str.replace(/\s+/g," ");
	return str.replace(/^\s*|\s*$/,"");
}

function validate_mail(courriel){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	return reg.test(courriel);
}

