	// -------------------------------------------------------------------- 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;
	 }
	 
	 // -------------------------------------------------------------------- is_date -------------------------------------------------------------- //
	 function is_date(tmp) {
		if (tmp.length !=10) return false;
		if ((isNaN(tmp.substr(0,2)))||(isNaN(tmp.substr(3,2)))||(isNaN(tmp.substr(6,4)))) return false;
		if((tmp.substr(2,1) !="/") && (tmp.substr(5,1) !="/")) return false;
		j = Number(tmp.substr(0,2)); m = Number(tmp.substr(3,2)); a = Number(tmp.substr(6,4));
		if (a%4 == 0) {fev = '29';} else {fev = '28';}
		nbJours = new Array(31,fev,31,30,31,30,31,31,30,31,30,31);
		if ((j > nbJours[m-1])||(j<1)) return false;
		if ((m > 12)||(m <1)) 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=yes,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 = '#F19315';
		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 ?						
	}
	
	function validMoteur() {
		if( !Dom('radioMoteur1').checked && !Dom('radioMoteur2').checked && !Dom('radioMoteur3').checked ) {
			alert('Choisissez où vous voulez effectuer vos recherches');
			return false;
		}
	/*	if( Dom('motsclefsMoteur').value=='' || Dom('motsclefsMoteur').value=='mot(s)-clef(s)' ) {
			alert('Saisissez le ou les mot(s)-clef(s) recherchés');
			return false;
		}*/
		return true;
	}
	
	function activerPV() {
		Dom('tdDocument').innerHTML = '';
		Dom('tdActus').innerHTML = '';
	}
	function activerDocument() {
		Dom('tdDocument').innerHTML = '<input type=text maxlength=30 name=motsclefsMoteur id=motsclefsMoteur class=champ value="mot(s)-clef(s)" onclick="if(this.value==\'mot(s)-clef(s)\'){this.value=\'\';}" onfocus="if(this.value==\'mot(s)-clef(s)\'){this.value=\'\';}">';
		Dom('tdActus').innerHTML = '';
	}
	
	function activerActus() {
		Dom('tdActus').innerHTML = '<input type=text maxlength=30 name=motsclefsMoteur id=motsclefsMoteur class=champ value="mot(s)-clef(s)" onclick="if(this.value==\'mot(s)-clef(s)\'){this.value=\'\';}" onfocus="if(this.value==\'mot(s)-clef(s)\'){this.value=\'\';}">';
		Dom('tdDocument').innerHTML = '';
	}

	/***********************************************/
	/***************** INFO BULLE ******************/
	/***********************************************/
	var i=false; // La variable i : visible ou non
	function moveInfoBulle(e) {
		if(i) {  // bulle visible, calcule la position
			if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
				if(Dom("curseur")) {
					Dom("curseur").style.left=e.pageX + 5+"px";
					Dom("curseur").style.top=e.pageY + 10+"px";
				}
			}
			else {
				if(Dom("curseur")) {
					Dom("curseur").style.left=window.event.x + 5+"px";
					Dom("curseur").style.top=window.event.y + 10 + document.body.scrollTop+"px"; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !
				}
			}
		}
	}
	function montreInfoBulle(text) {
		if(i==false) {
			Dom("curseur").style.visibility="visible";Dom("curseur").innerHTML = text;i=true;
		}
	}
	function cacheInfoBulle() {
		if(i==true) {
			Dom("curseur").style.visibility="hidden";i=false;
		}
	}
	document.onmousemove=moveInfoBulle;
	/***************************************************/
	/***************** FIN INFO BULLE ******************/
	/***************************************************/