window.onload = function() {
  $("sumform").onsubmit = function() {
    submitSum();
    return false;
  }
}

function submitSum() {
  var definedFigures = {
    figure1: $("figure1").value,
    figure2: $("figure2").value,
    figure3: $("figure3").value
  }
  ajaxCaller.get("sum.phtml", definedFigures, onSumResponse, false, null);
  return false;
}

function onSumResponse(text, headers, callingContext) {
  self.$("sum").innerHTML = text;
}
