function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function stripetables() {
	tables = $$('table.stripe');
	for(current=0; tables.length > current; current++) { 
		table = tables[current];
		var tbodies = table.getElementsByTagName("tbody");

		for (var h = 0; h < tbodies.length; h++) {
			// find all the <tr> elements... 
			var trs = tbodies[h].getElementsByTagName("tr");
      
 			// ... and iterate through them
			for (var i = 0; i < trs.length; i++) {	
				if((i % 2) == 0) { style = 'even'; } else { style = 'odd'; }
				Element.addClassName(trs[i],style);
			}
    }
	}
}

addLoadEvent(stripetables);