function TableHover(node,onClass,outClass) {
	this.table = node;
	this.onClass = onClass;
	this.outClass = outClass;
	var self = this;
	this.table.onmouseover = function(evt) {self.onmouseover.apply(self,[evt]); } 
	this.table.onmouseout = function(evt) {self.onmouseout.apply(self,[evt]); }
}
TableHover.prototype = {
	constructor : TableHover,
	onmouseover : function(e) {
		var event = e || window.event;
		var el = event.toElement || event.target;
		var selectedRow = this.getRow(el);
		if (selectedRow) { selectedRow.className = this.onClass; }
	},
	onmouseout : function(e) {
		var event = e || window.event;
		var el = event.fromElement || event.target;
		var selectedRow = this.getRow(el);
		if (selectedRow) { selectedRow.className = this.outClass; }
	},	
	getRow : function(node) {
		while (node.tagName != 'TR' && node.tagName != 'TABLE') {
			node = node.parentNode;
		}
		if (node.tagName == 'TR') return node;
		return false;
	}	
}
