
	function isNumber(inputval)
			{
				for (var Contatore=0 ; Contatore < inputval.length; Contatore++)
					{
					var Buffer;
					Buffer = inputval.substring(Contatore,Contatore+1);
					if ((Buffer<"0")||(Buffer>"9"))
						{
						//alert ("La quantità impostata non è un valore numerico");
						return false
						}//fine ciclo if
					}//fine ciclo for
				return true
			}
	function isFloat(valore)
			{
				for (var Contatore=0 ; Contatore < mioForm.value.length; Contatore++)
					{
					var Buffer;
					Buffer = mioForm.value.substring(Contatore,Contatore+1);
					if (((Buffer<"0")||(Buffer>"9"))&&(Buffer != "," ))
						{
						alert ("Il campo " + controllaVariabile("errore",cont) + " puo' contenere soltanto numeri");
						return false
						}//fine ciclo if
					}//fine ciclo for
				return true
			}//fine controllo isFloat
		
	function isEmail(mail)
			{
				
				
				if ((mail.value.search("@") == -1) || (mail.value.indexOf(".") == -1))
					{
					alert("Il campo non contiene una E-mail valida");
					mail.focus()
					return false
					}
					
				return true
			}//fine ciclo isEmail
	
	function isVuoto(valore) {
				
		if (AllTrim(valore.value) == '')
					{
					alert("Tutti gli spazi appositi vanno compilati");
					valore.focus();
					return false
					}
					
				return true
			}//fine ciclo
			
function LeftTrim(String,TrimChar) {
 
 String += ""         // Force argument to string.
 TrimChar += ""       // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " ";
 if(String.length == 0)
  return(String)
 var Count = 0
 for(Count = 0;Count < String.length;Count++)
 {
  if(!(String.charAt(Count) == TrimChar))
   return(String.substring(Count,String.length))
 }
 return("")
}

function RightTrim(String,TrimChar)
{

 String += ""        // Force argument to string.
 TrimChar += ""      // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " "
 if(String.length == 0)
  return(String)
 var Count = 0
 for(Count = String.length -1;Count >= 0;Count--)
 {
  if(!(String.charAt(Count) == TrimChar))
   return(String.substring(0,Count + 1))
 }
 return("")
}

function AllTrim(String,TrimChar)
{
 String += ""        // Force argument to string.
 TrimChar += ""      // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " "
 return(RightTrim(LeftTrim(String,TrimChar),TrimChar))
}										
	
