jQuery.fn.numeric=function(opt){
		
		this.each(function(){
			//crea il template dell'oggetto
			var span_error = $("<span name='error' class='error_icon' onClick=\"alert('Richiede un valore numerico.')\" style=\"margin-left: 4px\" >?</span>");
			if(isNaN(this.value)){
				$(this).addClass('error');
				$(this).record('disableSave');
				if( $(this).parent().find('span[name=error]').length <= 0 ) {
					$(this).parent().append(span_error);
				}
			
			}else{
				$(this).removeClass('error');
				$(this).record('enableSave');
				if( $(this).parent().find('span[name=error]').length > 0 ) {
					$(this).parent().find('span[name=error]').remove();
				}
				
			}
		});

};

/*$('document').ready(function(){
	client.search.ready(function(){		
			$('#SCREEN .numeric').each(function(){
				if($(this).val() == '')$(this).val(0);
				$(this).change(function(){$(this).numeric();});
			})
	},{type:"permanent"});
});*/
//Commentato da Simone Pavlovich 31/03/2010
