function calculateTotal(inputItem) {
  with (inputItem.form) {
    // Process each of the different input types in the form.

      // Subtract the previously selected radio button value from the total.
      calculatedTotal.value = eval(calculatedTotal.value) - eval(previouslySelectedRadioButton.value);
      // Save the current radio selection value.
      previouslySelectedRadioButton.value = eval(inputItem.alt);
      // Add the current radio button selection value to the total.
      calculatedTotal.value = eval(calculatedTotal.value) + eval(inputItem.alt);

    // Return total value.
    return(formatCurrency(calculatedTotal.value));
  }
}
function calculateTotal2(inputItem) {
  with (inputItem.form) {
    return(formatCurrency(eval(inputItem.alt)));
  }
}
// Format a value as currency.
function formatCurrency(num) {
  num = num.toString().replace(/\$|\,/g,'');
  if(isNaN(num))
     num = "0";
  sign = (num == (num = Math.abs(num)));
  num = Math.floor(num*100+0.50000000001);
  cents = num%100;
  num = Math.floor(num/100).toString();
  if(cents<10)
      cents = "0" + cents;
  for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
      num = num.substring(0,num.length-(4*i+3)) + ',' + num.substring(num.length-(4*i+3));


  sk = num+'.'+cents;
  sk = sk*30.126;
  //sk = (Math.round(sk) * 100) / 100).toFixed(2);
  sk = sk.toFixed(2);
  sk = Math.round(sk);

  return (((sign)?'':'-') + num + ',' + cents + '€(' + sk + ' SKK)');

  //return (((sign)?'':'-') + num + ',' + cents + '€');

}