<p>How can I use the Prototype library and create unobtrusive javascript to inject the onmouseover and onmouseout events to each row, rather than putting the javascript in each table row tag?</p>

<p>An answer utilizing the Prototype library (instead of mootools, jQuery, etc) would be most helpful.</p>

You can use Prototype's
```
addClassName
```
and
```
removeClassName
```
methods.
Create a CSS class "hilight" that you'll apply to the hilighted
```
<tr>
```
's.  Then run this code on page load:
```
```
var rows = $$('tbody tr');  
for (var i = 0; i < rows.length; i++) {  
    rows[i].onmouseover = function() { $(this).addClassName('hilight'); }  
    rows[i].onmouseout = function() { $(this).removeClassName('hilight'); }  
}
```
```