currency={'brl': '1','usd': '0.58','jpy': '48.6','gbp': '0.37','eur': '0.45'};

function currency_convert () {
  cForm  = document.getElementById('currency_form');
  var result = ((cForm.amount.value / currency[cForm.from.value]) * currency[cForm.to.value]);
  cForm.result.value = (Math.round(result*100)/100) + ' ' + cForm.to.value.toUpperCase();
  return false;
}