jQuery.fn.float=function(opt){
		
		this.each(function(opt){
			
			var precision = 2;
			var adjust = true;
			if(opt.precision != null) precision = opt.precision;
			if(opt.adjust != null) adjust = opt.adjust;
			
			if(adjust)
			{
				if(isNaN($(this).val())) $(this).val('0');
				
				$(this).val(parseFloat($(this).val()).toFixed(precision));
				return;
				
			}
			
			//crea il template dell'oggetto
			var span_error = $("<span name='error' class='error_icon' onClick=\"alert('Formato numero non valido.')\" style=\"margin-left: 4px\" >?</span>");
			
			//Accetta valori decimali di cui valore dopo la ',' corrisponde a precision 
			var float_reg_exp = new RegExp("^-?\\d+\\.\\d{" + precision + "}?$");
		  	if (!float_reg_exp.test(this.value))
		  	{

				$(this).addClass('error');
				$(this).record('disableSave');
				if( $(this).parent().parent().find('span[name=error]').length <= 0 ) {
					$(this).parent().parent().append(span_error);
				}
			}
		  	else
		  	{
				$(this).removeClass('error');
				$(this).record('enableSave');
				if( $(this).parent().parent().find('span[name=error]').length > 0 ) {
					$(this).parent().parent().find('span[name=error]').remove();
				}
			}
		});

};

/*$('document').ready(function(){
	client.search.ready(function(){
		$('#SCREEN .float').change(function(){$(this).float();});
	},{type:"permanent"});
});*/
//Commentato da Simone Pavlovich 31/03/2010