Need row highlighted in table
<p>I need to write a function (or building onto code below) that will highlight a specific row in a table. It needs to always ignore the table headers so start a row count of 0 after table headers.</p>

<pre><code>&lt;style type="text/css"&gt;
#myTbl {
     border: 1px solid black
}
#myTbl td, th {
     border: 1px solid black
}

#myTbl tr.normal td {
    color: black;
    background-color: white;
}
#myTbl tr.highlighted td {
    color: white;
    background-color: gray;
}
&lt;/style&gt;

  &lt;table id="myTbl"&gt;
     &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;ID&lt;/th&gt;
        &lt;th&gt;CreatedDate&lt;/th&gt;
        &lt;th&gt;Name&lt;/th&gt;
        &lt;th&gt;Colour&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;DFRF&lt;/td&gt;
        &lt;td&gt;05/03/2010&lt;/td&gt;
        &lt;td&gt;Lamp&lt;/td&gt;
        &lt;td&gt;Blue&lt;/td&gt;
      &lt;/tr&gt;
Ect...  
    &lt;/tbody&gt;
  &lt;/table&gt;

&lt;script type="text/javascript"&gt;
var table = document.getElementById("myTbl");
var thead = table.getElementsByTagName("thead")[0];
var tbody = table.getElementsByTagName("tbody")[0];

tbody.onclick = function (e) {
   e = e || window.event;
   var td = e.target || e.srcElement; 
//so must be no other elements inside the td
   var row = td.parentNode;
    alert('Row is ' + (row.rowIndex - 1))
   if (this.lst&amp;&amp;this.lst!=row){
    this.lst.className='';
   }
   row.className = row.className==="highlighted" ? "" : "highlighted";
   this.lst=row;
}

thead.onclick = function (e) {
   e = e || window.event;
   var th = e.target || e.srcElement;  
//so must be no other elements in the th
   alert(th.innerHTML);
}
&lt;/script&gt;
</code></pre>

<p>Something like </p>

<pre><code>function goToRow('2')
</code></pre>

<p>To select row 2.</p>

<p>Need help please</p>
