Rewriting a Javascript equation
<p>I have the following piece of code</p>

<pre><code>var total = 5;
var arr = new Array("750", "400", "432", "355", "263");
id = 0;
num = 100;
var ht = 310;
var max = 750;
var cm = 20;
var bHg = 0;
var wdt = 100;
var bm = 20;
for (var i = 0; i &lt; total; i++) {
    ar = parseInt(arr[i]);
    // how to rewrite these equations
    **bHg = (ar * ht / max) / num * id;
    printfu(cm + 50 + (i * (wdt + bm)) + bm,
                cm + (ht - bHg), wdt, bHg);**
}

function printfu(a,b,c,d) {
    document.write(a + b + c + d + "\n");
}
</code></pre>

<p>From a learning purpose, how can I write the 2 lines with a different equation to produce the same output</p>

<pre><code>bHg = (ar * ht / max) / num * id;
printfu(cm + 50 + (i * (wdt + bm)) + bm, cm + (ht - bHg), wdt, bHg);
</code></pre>

<p>OUTPUT of the above</p>

<p>520 640 760 880 1000 </p>
