	// -------------------------------------------------------------------- is_photo -------------------------------------------------------------- //
	function is_photo(valeur)
	{
	 	tmp = new String(valeur);
		pos = tmp.lastIndexOf(".");
		stop =   tmp.length - pos;
		tmp = tmp.substr(pos+1, stop)
		if (tmp.toLowerCase() !="jpg") return false;
		return true;
	}

	// -------------------------------------------------------------------- is_mail -------------------------------------------------------------- //
	function is_mail(email) {
		var arobase = email.indexOf("@"); var point = email.lastIndexOf(".")
		if((arobase < 1)||(point + 2 > email.length)||(point < arobase+1)) return false;
		return true;
	}

	// -------------------------------------------------------------------- onlyNumber -------------------------------------------------------------- //
	function onlyNumber(obj){
		if ( !is_numeric(obj.value) )
			obj.value=(parseInt(obj.value).toString()=='NaN')?'':parseInt(obj.value);
	}

	// -------------------------------------------------------------------- onlyFloat -------------------------------------------------------------- //
	function onlyFloat(obj){
		obj.value=obj.value.replace(".",",");
		if (!is_float(obj.value+'00')) obj.value=obj.value.substr(0,obj.value.length-1)
	}

	// -------------------------------------------------------------------- is_numeric -------------------------------------------------------------- //
	function is_numeric(valeur){
		for (i=0;i<valeur.length;i++)
			if ((valeur.charAt(i)<'0') || (valeur.charAt(i)>'9')) return false;
		return true;
	}

	// -------------------------------------------------------------------- is_float -------------------------------------------------------------- //
	function is_float(valeur){
		j = 0;
		var signe=valeur.indexOf("-");
		if (signe>0) return false;
		if ((valeur.charAt(0)==',') || (valeur.charAt(valeur.length-1)==',')) return false;
		for (i=0;i<valeur.length;i++){
			if (((signe=='0')&&(i>0))||(signe=='-1'))
				if (((valeur.charAt(i)<'0') || (valeur.charAt(i)>'9')) && (valeur.charAt(i)!=',')) return false;
			if (valeur.charAt(i)==',') j=j+1;
		}
		if (j > 1) return false;
		return true;
	}	
	
	// -------------------------------------------------------------------- is_cp -------------------------------------------------------------- //
	function is_cp(valeur){
		if (valeur.length!=5) return false;
		var i;
		for (i=0;i<valeur.length;i++)
			if (i==1)
				if (valeur.charAt(0)==2){
					if (!((valeur.charAt(i).toUpperCase()=='A')||(valeur.charAt(i).toUpperCase()=='B')||(is_numeric(valeur.charAt(i)))))
						return false;
				}else
					if (!is_numeric(valeur.charAt(i))) return false;	
			else
				if (!is_numeric(valeur.charAt(i))) return false;
		return true;
	}

	// -------------------------------------------------------------------- is_tel -------------------------------------------------------------- //
	function is_tel(valeur)
	 {
		 if (valeur.length!=14) return false;
		 j = 0;
		 for (i=0;i<valeur.length;i++) {if (valeur.charAt(i)==' ') j=j+1;}
		 if (j != 4) return false;
		 if ((isNaN(valeur.substr(0,2)))||(isNaN(valeur.substr(3,2)))||(isNaN(valeur.substr(6,2)))||(isNaN(valeur.substr(9,2)))||(isNaN(valeur.substr(12,2)))) return false;
		 if((valeur.substr(2,1) !=" ") && (valeur.substr(5,1) !=" ") && (valeur.substr(8,1) !=" ") && (valeur.substr(11,1) !=" ")) return false;
		 if ((valeur.charAt(0)!='0') || (valeur.charAt(1)<'1') || (valeur.charAt(1)>'6')) return false;
		 return true;
	 }

	// -------------------------------------------------------------------- ucaseIt -------------------------------------------------------------- //
	function ucaseIt(obj){
		if (obj.value!='')
			if (obj.value.substr(0,1).toUpperCase()!=obj.value.substr(0,1)) obj.value=obj.value.substr(0,1).toUpperCase()+obj.value.substr(1,obj.value.length);
	}
	
	// -------------------------------------------------------------------- ouvre_pop -------------------------------------------------------------- //
	function ouvre_pop(url, nom, width, height)
	{
		window.open(url, nom,'toolbar=auto,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width='+width+', height='+height+'')
	}
	
	
	// ------------------------------------------------------------- showSelect -------------------------------------------------------------- //
	function showSelect(show) {
		var x = document.getElementsByTagName("select");var status;
		if(show = 1) status = 'block'; else status = 'none';
		for (i=0;i < x.length; i++) {
			x[i].style.display = status;
		}
	}

	// ----------------------------------------------------- fonctions aide   ------------------------------- //
	function Dom(chaine) {
		return document.getElementById(chaine);
	}

	function Get(chaine) {
		return document.getElementById(chaine).value;
	}
	function Focus(chaine) {
		return document.getElementById(chaine).focus();
	}
	function Set(chaine, value) {
		document.getElementById(chaine).value = value;
	}
	function Afficher(chaine) {
		document.getElementById(chaine).style.display = 'block';
	}
	function Cacher(chaine) {
		document.getElementById(chaine).style.display = 'none';
	}
	function Check(chaine) {
		document.getElementById(chaine).checked = true;
	}
	function IsChecked(chaine) {
		if(document.getElementById(chaine).checked == true) 
			return true;
		else
			return false;
	}
	
	// ----------------------------------------------------- fonctions site   ------------------------------- //
	old_ligue=0;
	function showLigue(id) {
		Cacher('ligue'+old_ligue);
		Afficher('ligue'+id);
		old_ligue = id;
	}
	
	old_club=0;
	function showClub(id) {
		Cacher('clubs'+old_club);
		Afficher('clubs'+id);
		old_club = id;
	}
	
	var ie5 = (document.all && document.getElementById); 
	var ns6 = (!document.all && document.getElementById); 
	function outImg(id) {
		Dom(id).style.borderColor = '#23CA36';
		if(ie5) Dom(id).filters.alpha.opacity = 75;
	//	if(ns6) Dom(id).style.MozOpacity = 0.75;	// oldMozilla
	//	Dom(id).style.opacity = 0.75;				// newMozilla ?
	}
	
	function overImg(id) {
		Dom(id).style.borderColor = 'black';
		if(ie5) Dom(id).filters.alpha.opacity = 100;
	//	if(ns6) Dom(id).style.MozOpacity = 1;		// oldMozilla
	//	Dom(id).style.opacity = 1;					// newMozilla ?						
	}