hackFirefoxToolTip = function(){
	var list = new Array('tabbed', 'motif');

	for(j = 0; j < list.length; j++) {
		var tabTable = document.getElementById(list[j]);
		if (tabTable == null) continue;
		
		var tabs = tabTable.getElementsByTagName('IMG');
	
	 	var toolTip = document.createElement('DIV');
		var shadow = document.createElement('DIV');
		
		document.body.appendChild(toolTip);
		document.body.appendChild(shadow);
		
		with (toolTip.style) {
			position = 'absolute';
			backgroundColor =  'ivory';
			border = '1px solid #333';
			padding = '1px 3px 1px 3px';
			font = '500 11px arial';
			zIndex = 10000;
			display = "none";
		}
	 	
		with (shadow.style) {
			position = 'absolute';
			MozOpacity = 0.3;
			MozBorderRadius = '3px';
			background = '#000';
			zIndex = toolTip.style.zIndex - 1;
			display = "none";
		}
		
		for(i=0; i < tabs.length; i++){
			if(tabs[i].getAttribute('title') != null || tabs[i].getAttribute('alt') != null){
				tabs[i].onmouseover=function(e){
					var _title = this.getAttribute('title')!=null ? this.getAttribute('title') : this.getAttribute('alt');
	
					this.setAttribute('title', '');
	
					toolTip.style.left = 20 + document.documentElement.scrollLeft + e.clientX + 'px';
					toolTip.style.top = 10 + document.documentElement.scrollTop +e.clientY + 'px';
					toolTip.innerHTML = _title.replace(/\r\n/g,'<br />').replace(/\s/g,' ');
	
					with (shadow.style){
						width = toolTip.offsetWidth -2 + 'px';
						height = toolTip.offsetHeight -2 + 'px';
						left = parseInt(toolTip.style.left) + 5 + 'px';
						top = parseInt(toolTip.style.top) + 5 + 'px';
					}
					
					toolTip.style.display = "block";
					shadow.style.display = "block";				
					
					var imgSrc = this.getAttribute('src');
					imgSrc = imgSrc.replace('_active.png', '_select.png');
					this.setAttribute('src', imgSrc);
				}
			
				tabs[i].onmouseout=function(){
					this.setAttribute('title', toolTip.innerHTML.replace(/<br \/>/g,'&#13;&#10;').replace(/&nbsp;/g,' '));
					toolTip.style.top = '-1000px';
					shadow.style.top = '-1000px';
					toolTip.innerHTML = '';
					
					toolTip.style.display = "none";
					shadow.style.display = "none";
					
					if (document.getElementById('tabStatus') != null) {
						var status = document.getElementById('tabStatus').value;
						if (this.getAttribute('name') != status) {
							var imgSrc = this.getAttribute('src');
							imgSrc = imgSrc.replace('_select.png', '_active.png');
							this.setAttribute('src', imgSrc);
						}
					}
				}
			}
		}
	}
}

