/**
*	Controllo il campo telefono se è corretto
*/
function isTelephoneNumber(telefono) {
	var ret = false;
	if ($.trim(telefono).length > 0) {
		ret = true;
	}
	return true;
}

/*
*	Funzione che mi controlla la mail
*	mi restituisce true se il valore non è nullo altrimenti false
*/
function controlloMail(mail){
	var espressione = /^(.+)@(.+)\.(.+)$/;
	if (!espressione.test(mail)){
		    return false;
	} else {
		return true;
	}
}

/**
*	Controllo che la stringa passata sia numerica e più
*	precisamente che contenga solo i caratteri validi passati in strvalidChars
*/
function IsValidChar(strString,strValidChars){
   //var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }