var hover_color = null;
function highlight_row(obj,w){
	if (hover_color == null) hover_color = getStyle('hover', "backgroundColor");
	var tds = obj.getElementsByTagName('td');
	for(i=0;i < tds.length;i++) {
		if (w == 1) {
			tds[i].style.backgroundColor = hover_color;
		} else tds[i].style.backgroundColor = "";
	}
}
function getStyle(el, style) {
	el = document.getElementById(el);
	var value = el.style[style];
	if(!value) value = el.currentStyle[style];
	return value;
}
function hover_init() {
	if (document.all && document.getElementById && !window.opera) {
		table = document.getElementById('tb');
		trs = table.getElementsByTagName('tr');
		for(var i = 0; i < trs.length; i++){
			trs[i].onmouseover = function(){ highlight_row(this,1); }
			trs[i].onmouseout = function(){ highlight_row(this,0); }
		}
	}
}
window.onload = hover_init;