//data_table is the class of the table
document.onload = $$('.data_table tr ').each(function(e){ highlight_row(e); } );
//css class 'highlight' is the css code that contains the highlighted background color etc.
function highlight_row(e) {
e.onclick = function() {
class_list = e.className;
//alert(class_list.search(/highlight/i));
if (class_list.search(/highlight/i) > -1) {
e.removeClassName('highlight');
} else {
e.addClassName('highlight');
}
}
}