function JSC_strTrim_String(str) {

	str=str.replace(/^\s+/g,"");

	str=str.replace(/\s+$/g,"");

	return str;

}



function JSC_isNumber_String(str,hasComma) {

	str=JSC_strTrim_String(str);                                                // Enlevons les espaces inutiles !

	intFCT_virgules=0;                                                          // Nombre de séparateurs décimaux trouvés



	// On accepte les caractères "+" et "-" uniquement en début de chaîne

	if (str.charAt(0)=="-" || str.charAt(0)=="+")

		str=str.substring(1,str.length);                                        // On se débarasse du signe



	for (i=0 ; i<str.length ; i++)

		if (str.charAt(i)=="." || (hasComma && str.charAt(i)==","))

			intFCT_virgules++;                                                  // Et un séparateur décimal, un !

		else

			if (str.charAt(i)<"0" || str.charAt(i)>"9")                         // Pas numérique ?

				return false;                                                   // -> ce n'est pas un nombre

	if (intFCT_virgules>1)                                                      // Plus d'un séparateur décimal ?

		return false;                                                           // -> ce n'est pas un nombre

	return true;

}



function JSC_isEmail_String(str) {

	if (str.indexOf("'")!=-1)                                                   // "'" refusé

		return false;

	if (str.indexOf(" ")!=-1)                                                   // " " refusé

		return false;

	if (str.indexOf('"')!=-1)                                                   // '"' refusé

		return false;

	if (str.indexOf("#")!=-1)                                                   // "#" refusé

		return false;

	if (str.indexOf("(")!=-1)                                                   // "(" refusé

		return false;

	if (str.indexOf(")")!=-1)                                                   // ")" refusé

		return false;

	if (str.indexOf("/")!=-1)                                                   // "/" refusé

		return false;

	if (str.indexOf("\\")!=-1)                                                  // "\" refusé

		return false;

	if (str.indexOf("?")!=-1)                                                   // "?" refusé

		return false;

	if (str.indexOf(":")!=-1)                                                   // ":" refusé

		return false;

	if (str.indexOf(";")!=-1)                                                   // ";" refusé

		return false;

	if (str.indexOf("+")!=-1)                                                   // "+" refusé

		return false;

	if (str.indexOf("=")!=-1)                                                   // "=" refusé

		return false;

	if (str.indexOf("<")!=-1)                                                   // "<" refusé

		return false;

	if (str.indexOf(">")!=-1)                                                   // ">" refusé

		return false;

	if (str.indexOf("*")!=-1)                                                   // "*" refusé

		return false;

	if (str.indexOf("%")!=-1)                                                   // "%" refusé

		return false;

	if (str.indexOf("&")!=-1)                                                   // "&" refusé

		return false;

	if (str.indexOf(".@")!=-1)                                                  // "*.@*" refusé

		return false;

	if (str.indexOf("@.")!=-1)                                                  // "*@.*" refusé

		return false;

	if (".@".indexOf(str.charAt(0))!=-1)                                        // "@*" et ".*" refusés

		return false;

	if (".@".indexOf(str.charAt(str.length-1))!=-1)                             // "*@" et "*." refusés

		return false;

	if (str.search(/@.*@/g)!=-1)                                                // "*@*@*" et "*@@*" refusés

		return false;

	if (str.indexOf("..")!=-1)                                                  // "*..*" refusé

		return false;

	if (str.search(/@.*\./g)==-1)                                               // On refuse s'il n'y a pas de point à droite de "@"

		return false;

	if (str.length>5+str.lastIndexOf("."))                                      // On refuse les extensions de plus de 4 caractères

		return false;

	str=str.substr(str.lastIndexOf("."),5);

	return (str.length>1 && !JSC_isNumber_String(str,false));

}



function JSC_isTel_String(str) {

	if (str.search(/[^0-9\(\)+\-. ]/gi)!=-1)                                    // Y a-t-il des caractères autres que "0" à "9", "(", ")", "+", "-", " " et "." ?

		return false;                                                           // -> ce n'est pas un numéro de téléphone

	else

		return true;

}

