/*
 * Requires scriptaculous.js (and therefore prototype.js) be loaded before this. 
 * Checks for any tables with the class "in" and a pseudo-indicator '<table hover="true">'
 * Reviews all rows of the table and excludes any with the pseudo-indicator '<tr nohover="true">'
 * Sets onMouseOver and OnMouseOut events for each cell of the row to set or 
 *    reset the background color of each cell in the row 
*/
function ch_bg( e, which ) { if ( which == 'on' ) { this.select('td').each( function (s) { s.setStyle({ backgroundColor: '#DDFFDD' }); } ); } else { this.select('td').each( function (s) { s.setStyle({ backgroundColor: '#FFFFCC' }); } ); } }

document.observe("dom:loaded", function () {  self.setTimeout('hover_rows()', 2000); } );

function hover_rows() { var d1 = Element.extend( document ).body; var d2 = d1.body; var d = Element.extend( d1 ); d.select('table.in[hover="true"] tr').each( function (s) { var s1 = Element.extend(s); if ( s1.getAttribute('nohover') == "true" ) {} else { s1.select('td').each( function (s3) { var s4 = Element.extend(s3); Event.observe(s4, 'mouseout', ch_bg.bindAsEventListener(s1,'off') ); Event.observe(s4, 'mouseover', ch_bg.bindAsEventListener(s1,'on') ); } ); } } ); } 
