text: function compute()
  {
      var principal = document.getElementById("principal").value;
      if(principal == '' || principal <=0){
          alert("enter a positive number");
          document.getElementById("principal").focus();
          return;
      }
      var rate = document.getElementById("rate").value;
      var years = document.getElementById("years").value;
      var interst = principal*years*rate/100;
  
      var datenow = new Date();
      var yearnow = parseInt(datenow.getFullYear()) + parseInt(years);
      var resultdisplay = document.getElementById("result");
      resultdisplay.innerHTML= "If you deposit "+ "<span class= 'highlight'>" +principal+"</span>." +",<br> at an interst rate of "+"<span class = 'highlight' >" + rate + "</span>%."+"<br> you will recieve the amount of "+"<span class = 'highlight' > "+ interst +"</span>" + 
      ", <br> in the year "+ "<span class = 'highlight'>" +yearnow+ "</span>";
  }
  function SliderValue(){
      var slider = document.getElementById("rate");
      var output = document.getElementById("rate_display");
      output.innerHTML = slider.value;
      slider.oninput = function()
      {
          output.innerHTML = this.value;
      }
  }
  