function calculate_byte($download_max_b)
{
$calc_opts = array(1 => $this->locale['fields_0490'], 1000 => $this->locale['fields_0491'], 1000000 => $this->locale['fields_0492']);
foreach ($calc_opts as $byte => $val) {
if ($download_max_b / $byte <= 999) {
return $byte;
}
}
return 1000000;
}