/*
 * Fonctions appellées dans le site
 */

/*
 * Basée sur http://www.regular-expressions.info/email.html
 * en tenant compte des limites indiquées
 */
function VerifEmail( field_name ) {
	var email = null, regexp_verif = null, result = false;
	email = $( "#" + field_name ).val();
	regexp_verif = /^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
	if (regexp_verif.exec(email) == null) {
		result = false;
	} else {
		result = true;
	}
	return result;
}

/*
 */
function showPic(href_element, placeholder, description ) {
	$( "#" + placeholder ).get(0).src = href_element.href;
	if (href_element.title) {
		$( "#" + description ).get(0).childNodes[0].nodeValue = href_element.title;
	} else {
		$( "#" + description ).get(0).childNodes[0].nodeValue = href_element.childNodes[0].nodeValue;
	}
	return false;
}


