1 function focus_budget(i) {
3 i.setAttribute('_last', get_amount(i.name));
6 function blur_budget(i) {
7 var amount = get_amount(i.name);
8 var total = get_amount('Total', 1);
10 if(amount<0) amount = 0;
11 price_format(i.name, amount, 0);
12 price_format('Total', total+amount-i.getAttribute('_last'), 0, 1, 1);
17 '.amount': function(e) {
18 e.onblur = function() {
21 e.onfocus = function() {
27 Behaviour.register(budget_calc);