title: javascript help, unable to decode
body: <p>So i've been asked to rebuild a website, however I'm trying to figure out what the below javascript actually does, from what i've found online it's written very badly and probably why i can't figure it out.</p>
  
  <p>it's mainly 'SPCost += (nBks
  
  <p>The website of the complete form is <a href="http://dynamic-stationery.com/online_order_form/" rel="nofollow noreferrer">http://dynamic-stationery.com/online_order_form/</a></p>
  
  <pre><code>var setup = 110;  // film and screen
  var perBk = 0.77;  // printing cost per book
  var thresh = 200;
  var minCost = 20;
  var GST = 0.1;
  var numCostPBk = nums ? 1.0 : 0.0;
  
  var SPCost;
  if (CC) {
    SPCost = nInks * (setup + nBks * (perBk + numCostPBk));
    SPCost += nBks &lt; thresh ? minCost : nBks * minCost / thresh;
    SPCost *= 1 + GST;
    SPCost = Round(SPCost);
  } else {
    SPCost = 0;
  }
  </code></pre>