function ById(id) {
  return (document.getElementById) ? document.getElementById(id) : false;
}

function NicePrice(price) {
  var decimals=2;
  price=Math.round(price*Math.pow(10,decimals))/Math.pow(10,decimals);
  price=price.toString();
  var dp=price.indexOf('.');
  if (dp==-1) {
    places=0;
    price+=(decimals>0) ? '.' : '';
  }
  else
    places=price.length-dp-1;
  pad=decimals-places;
  if (pad>0)
    for (iDecimals=0; iDecimals<pad; iDecimals++)
      price+='0';
  return price;
}
