var setTableHover = function(){
	function setTableHover(){
		var sfEls = document.getElementById("data").getElementsByTagName("TD");
		for (var i=0; i<sfEls.length; i++) {
			var cell = sfEls[i];
			if( cell.className.indexOf("right") != -1){
				cell.div = document.getElementById( setTableHover.trim(cell.innerHTML).toLowerCase() );
				cell.onmouseover=function() {
					this.className +=" hover";
					if(this.div != undefined){
						this.div.style.left = 'auto';
						//this.div.parentNode.height = this.div.offsetHeight+"px";
					}
				}
				cell.onmouseout=function() {
					this.className = this.className.replace(new RegExp(" hover\\b"), "");
					if(this.div != undefined) this.div.style.left = '-999em';
		  		}
			}
		}
	}
	var self = setTableHover;
	
	function trim(sInString) {
		sInString = sInString.replace( /^\s+/g, "" );// strip leading
		return sInString.replace( /\s+$/g, "" );// strip trailing
	};
	
	function setup(){
		if(typeof window.onload == "function"){
			var fOld = window.onload;
			window.onload = function(){ fOld(); setTableHover(); };
		} else {
			window.onload = setTableHover;
		};
	};
	
	/* Public Fields */
	self.setup = setup;
	self.trim = trim;
	
	return self;
}();

if(typeof setTableHover == "function" ){
	setTableHover.setup();
};
