document.write("<style>.navtext_div{border:1px solid #89a;color:#333;background-color:#ffc;font-family: Courier New,tahoma,arial;font-size: 12px;}</style>");

var xalt = new Object();
xalt.cfg_txt_tag='alt';
xalt.cfg_xoffset=10;
xalt.cfg_yoffset=20; 
xalt.cfg_move=true;
xalt._topDivZIndex = 10000;
xalt._oBody = null;
xalt._oHelperIframe = null;
xalt._xaltDiv = null;
xalt._mousePos = new Object();

xalt._init = function(){
	window.onerror = xalt.kill_errors;
	xalt._oBody = document.getElementsByTagName("BODY").item(0);
	xalt._oHelperIframe = document.createElement("IFRAME");
	xalt._oHelperIframe.style.border = 0;
	xalt._oHelperIframe.width = 0;
	xalt._oHelperIframe.height = 0;
	xalt._oHelperIframe.style.position = "absolute";
	xalt._oBody.appendChild(xalt._oHelperIframe);
	xalt._xaltDiv = document.createElement("DIV");
	xalt._xaltDiv.style.border = 0;
	xalt._xaltDiv.width = 0;
	xalt._xaltDiv.height = 0;
	xalt._xaltDiv.style.position = "absolute";	
	xalt._oBody.appendChild(xalt._xaltDiv);	
	xalt._attachToEvent(document, 'onmousemove', xalt._mousemove);	
	xalt.scanDOM(document.body);
}

xalt.scanDOM = function(curNode) {
	while(curNode )	{
		if(curNode.nodeName != 'OBJECT' && curNode.nodeName != 'EMBED' 
			&& curNode.nodeType == 1){
			var txt = curNode.getAttribute(xalt.cfg_txt_tag);
			if (curNode.alt) curNode.alt = "";
			if (curNode.title) curNode.title = "";
			if(txt != null && txt != ''){
				var r = curNode;
				curNode.setAttribute('xalt_txt', txt);
				curNode.setAttribute(xalt.cfg_txt_tag, '');
				xalt._attachToEvent(curNode, 'onmouseover', function() {xalt.showToolTip(r.getAttribute('xalt_txt'));});
				xalt._attachToEvent(curNode, 'onmouseout', function() {xalt.hideToolTip();});
			}
		}
		xalt.scanDOM(curNode.firstChild);
		curNode=curNode.nextSibling;
	}
}

xalt.kill_errors = function() {
	return true;
}

xalt._getToolTipDivWidth = function(){
	var tableWidth = "" + xalt._xaltDiv.getElementsByTagName("table").item(0).offsetWidth;
	if(tableWidth.indexOf('px') > -1){
		return parseInt(tableWidth.substring(0, tableWidth.infexOf('px')));
	} else {
		return tableWidth;
	}
}

xalt._getToolTipDivHeight = function(){
	var tableHeight = "" + xalt._xaltDiv.getElementsByTagName("table").item(0).offsetHeight;
	if(tableHeight.indexOf('px') > -1){
		return parseInt(tableHeight.substring(0, tableHeight.infexOf('px')));
	} else {
		return tableHeight;
	}
}

xalt._mousemove = function(e){
	if(!xalt.cfg_move)return '';
	if(typeof(e) == 'undefined')e = event;
		xalt._mousePos.Y = e.clientY;
		xalt._mousePos.X = e.clientX;
	if(xalt._xaltDiv.style.visibility == 'visible'){
		xalt._fixTipPosition();
	}
}

xalt._fixTipPosition = function(){
	var w_y=(document.all)?document.body.clientHeight:window.innerHeight;
	var w_x=(document.all)?document.body.clientWidth:window.innerWidth;	
	if(Math.round( w_y - xalt._mousePos.Y - xalt.cfg_yoffset) < xalt._getToolTipDivHeight()){
		xalt._oHelperIframe.style.top = xalt._mousePos.Y - xalt._getToolTipDivHeight() + xalt._oBody.scrollTop - xalt.cfg_yoffset; 
	} else {
		xalt._oHelperIframe.style.top = xalt._mousePos.Y + xalt._oBody.scrollTop + xalt.cfg_yoffset; 
	}
	if(Math.round( w_x - xalt._mousePos.X - xalt.cfg_xoffset) < xalt._getToolTipDivWidth()){
		xalt._oHelperIframe.style.left = xalt._mousePos.X - xalt._getToolTipDivWidth() + xalt._oBody.scrollLeft - xalt.cfg_xoffset; 
	} else {
		xalt._oHelperIframe.style.left = xalt._mousePos.X + xalt.cfg_xoffset + xalt._oBody.scrollLeft; 
	}
	xalt._xaltDiv.style.top = xalt._oHelperIframe.style.top;
	xalt._xaltDiv.style.left = xalt._oHelperIframe.style.left;
}

xalt._attachToEvent = function(obj, name, func) {
	name = name.toLowerCase();
	if(typeof(obj.addEventListener) != "undefined") {
		if(name.length > 2 && name.indexOf("on") == 0) name = name.substring(2, name.length);
			obj.addEventListener(name, func, false);
		} else if(typeof(obj.attachEvent) != "undefined"){
			obj.attachEvent(name, func);
		} else {
			if(eval("obj." + name) != null){
			var oldOnEvents = eval("obj." + name);
			eval("obj." + name) = function(e) {
				try{
					func(e);
					eval(oldOnEvents);
				} catch(e){}
			};
		} else {
			eval("obj." + name) = func;
		}
	}
}

xalt.showToolTip = function(toolTipMessage){
	xalt._oHelperIframe.style.zIndex = xalt._topDivZIndex++;
	var divContent = "<table class='navtext_div' cellspacing='2' cellpading='0'><tr><td>" + toolTipMessage + "</td></tr></table>";
	xalt._xaltDiv.innerHTML = divContent; 
	xalt._mousePos
	xalt._xaltDiv.style.zIndex = xalt._topDivZIndex++;
	xalt._oHelperIframe.style.top = xalt._xaltDiv.style.top;
	xalt._oHelperIframe.style.left = xalt._xaltDiv.style.left;
	xalt._oHelperIframe.width = xalt._getToolTipDivWidth();
	xalt._oHelperIframe.height = xalt._getToolTipDivHeight();
	xalt._oHelperIframe.style.visibility = 'visible';
	xalt._xaltDiv.style.visibility = 'visible';
	xalt._fixTipPosition();
}
 
xalt.hideToolTip = function(){
	xalt._oHelperIframe.style.visibility = 'hidden';
	xalt._xaltDiv.style.visibility = 'hidden';
}
 
xalt._attachToEvent(window, 'onload', xalt._init);