// JavaScript used with SalesTrans.html with the Purchase Transaction button
  function showhiderates()
  {
  if (document.FormName.check1.checked == 1) /* Sale Transaction */
  { 
  document.FormName.check1.checked=true;
  document.FormName.check2.checked=false;
  document.FormName.DisVal.value = Math.round(p).toFixed(2);
  document.getElementById("HomeLink").style.visibility = "hidden";
  document.getElementById("Discounts").style.visibility = "visible";
  /*document.getElementById("Prem2").style.visibility = "block";*/
  document.FormName.Zero2One.value = Math.round(p*.55).toFixed(2);
  document.FormName.One2Three.value = Math.round(p*.65).toFixed(2);
  document.FormName.Three2Four.value = Math.round(p*.70).toFixed(2);
  document.FormName.Four2Five.value = Math.round(p*.85).toFixed(2);
  document.FormName.Five2Six.value = Math.round(p*.90).toFixed(2);
  
  }
  else if (document.FormName.chkboxPandL.checked == 1 && document.FormName.check1.checked == 1 && document.FormName.purchase.value > 1 && document.FormName.loan.value > 1)
  {
  document.FormName.chkboxPandL.checked=true;
  document.FormName.check2.checked = false;
  document.getElementById("HomeLink").style.visibility = "hidden";
  document.getElementById("Discounts").style.visibility = "visible";
  document.FormName.Zero2One.value = Math.round(p*.55).toFixed(2);
  document.FormName.One2Three.value = Math.round(p*.65).toFixed(2);
  document.FormName.Three2Four.value = Math.round(p*.70).toFixed(2);
  document.FormName.Four2Five.value = Math.round(p*.85).toFixed(2);
  document.FormName.Five2Six.value = Math.round(p*.90).toFixed(2);
  document.FormName.DisVal.value = Math.round(p).toFixed(2);
  }
  else if (document.FormName.chkboxRefi.checked == 1 && document.FormName.check1.checked == 1 && document.FormName.refinance.value > 1)
  {
  document.FormName.check2.checked = false;
  document.getElementById("HomeLink").style.visibility ="hidden";
  document.getElementById("Discounts").style.visibility = "visible";
  document.FormName.Zero2One.value = Math.round(r*.55).toFixed(2);
  document.FormName.One2Three.value = Math.round(r*.65).toFixed(2);
  document.FormName.Three2Four.value = Math.round(r*.70).toFixed(2);
  document.FormName.Four2Five.value = Math.round(r*.85).toFixed(2);
  document.FormName.Five2Six.value = Math.round(r*.90).toFixed(2);
  document.FormName.DisVal.value = Math.round(r).toFixed(2);
  }
  else 
  {
  document.FormName.check1.checked = false;
  document.FormName.check2.checked = false;
  document.getElementById("HomeLink").style.visibility = "hidden";
  document.getElementById("Discounts").style.visibility = "hidden";
  document.getElementById("Prem").style.visibility = "hidden";
  document.getElementById("Prem2").style.visibility = "hidden";
  document.getElementById("Refi").style.visibility = "hidden";
  document.getElementById("box2I").value = "";
 }
  }
