how can I get the position of a cell in a table using javascript?
<p>By position I mean, how many columns are to the left of the cell and how many rows are on top of it. What I need exactly is two functions:</p>

<pre><code>function FindColPos(element)
{
/* find column position */
return colPos;
}

function FindRowPos(element)
{
/* find row position */
return rowPos;
}
</code></pre>

<p>the functions MUST be written that way, I can't add other stuff to my document like ID's since I only have access to the head of the document where I would insert the javascript functions. (All this is part of another project in C#). The element passed to the function would be a cell in a row (a <code>&lt;TD&gt;</code> element) but it would be better if I can pass any element inside the <code>&lt;TD&gt;</code> and the function can recognize the parent <code>&lt;TD&gt;</code>. I'm not advanced enough on javascript to figure it out myself. I actually don't even know if it's possible. Hope you can help.</p>
