Javascript new object reference
<p>what is the correct syntax to create a new instance of the object as opposed to a pointer to the original?  Here is my example:</p>

<pre><code>var oItem = { element: null, colIndex: 0 };
var oInputs = { Qty: oItem, Tare: oItem, Rate: oItem, Total: oItem };
for (var oTitle in oInputs) {
    oInputs[oTitle].element = ...
</code></pre>

<p>when I set the value of <code>oInputs[oTitle].element</code> for any <code>oTitle</code> it sets the value of them all.  I know that javascript passes objects by reference, so I am assuming it's because they are all referring to the same object. I tried this but it is obviously wrong.</p>

<pre><code>var oInputs = { Qty: new oItem, Tare: new oItem, Rate: new oItem, Total: new oItem };
</code></pre>

<p>Thanks in advance.</p>
