function numberFormat($number){
if(!is_numeric($number)) return '';
$output = floatval(str_replace(array(' ',','), array('','.'), $number));
$output = number_format($number,(floor($number) == $number ? 0 : 2),'.',' ');
return $output;
}