      var total;
      var totaltp;
   
  function Calcular(){
      
      llam = document.foDatos.nrllam.value;
      min = document.foDatos.nrmin.value;
      sms = document.foDatos.nrsms.value;
      total =llam*0.15+min*precio+sms*preciosms;
      totaltp =llam*0.15+min*preciotp+sms*preciosms;
      document.getElementById('total').innerHTML = round(total, 2) + "€";
      document.getElementById('total2').innerHTML = round(totaltp, 2) + "€";
      div = document.getElementById('totalsimul'); 
      div.style.display = 'block';
      div2 = document.getElementById('simultplana'); 
      div2.style.display = 'block';
      div3 = document.getElementById('aea_pepecar');
      div3.style.display = 'block'; 
      document.getElementById('aeapuntos').innerHTML = round(total, 2) + "€";
 }   
  function round(number,X) {
    // rounds number to X decimal places, defaults to 2
    X = (!X ? 2 : X);
    num = Math.round(number*Math.pow(10,X))/Math.pow(10,X);
    return num.toFixed(2);
  }    
          


/*function mostrardiv() {

div = document.getElementById('totalsimul');

div.style.display = '';
document.getElementById('total').innerHtml = total;
}
 */
  function cerrar() {

    div = document.getElementById('totalsimul'); 
    div.style.display = 'none';
    div2 = document.getElementById('simultplana'); 
    div2.style.display = 'none';
    div3 = document.getElementById('aea_pepecar');
    div3.style.display = 'none'; 
  }


