

  // -------- Cambia Colore agli input sul fuoco -------------

  function ColoreInput(obj,codice){
    if(codice){    
      eval ("document.form1." + obj.name + ".className = 'textattivo';");
    }
    else{
      eval ("document.form1." + obj.name + ".className = 'textnonattivo';");
    }
  }


  function ColoreDisabled(obj,codice){  
    if(codice){    
      eval ("document.form1." + obj.name + ".className = 'textdisabled';");
    }
    else{
      eval ("document.form1." + obj.name + ".className = 'textnonattivo';");
    }
  }


 
  
  	function isNumber(sText)
  	{
  	var  validChars="0123456789,.";
  	var  isNumber=true;
  	var  character='';
  
  
  	if (sText=='')
  	{
  	isNumber=false
  	}
  	else
  	{
  	for (i=0; i<sText.length && isNumber==true; i++)
  	{
  	character=sText.charAt(i);
  	if (validChars.indexOf(character)==-1)
  	{
  	isNumber=false;
  
  	}
  	}
  	}
  	return isNumber;
  
  	}
  

