var hObj = null;
var efIE = document.all?true:false;
var tempX = 0; var tempY = 0;
if(!efIE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
	
function makeBox(name,content){
 	document.write('<div id="'+name+'" name="'+name+'" style="position:absolute;visibility:hidden;z-index:20;top:0px;left:0px;width:300px;">'+content+'</div>');
}
function catchObj(el){
	return (document.layers)?document.layers[el]:(document.all)?document.all[el]:null?document[el]:(document.getElementById(el)?document.getElementById(el):0);
}
function helpBox(obj,v) { // show | hide
	if(obj){ if(obj.style){ obj=obj.style; v = (v=='show')?'visible':(v=='hide')?'hidden':v; } obj.visibility = v; }
}

function getMouseXY(e){
	if(efIE){ tempX = event.clientX + document.body.scrollLeft; tempY = event.clientY + document.body.scrollTop;
	} else { tempX = e.pageX; tempY = e.pageY; }  
	if(tempX<0){ tempX = 0; }
	if(tempY<0){ tempY = 0; }
	return true;
}

function nohelpi(){
	if(hObj) helpBox(hObj,'hide');
	hObj = null;
}

function helpi(el,adjlef){
	hObj = catchObj(el);
	if(adjlef){ tempX = tempX - adjlef; tempY = tempY + 10; }
	hObj.style.left = tempX + 6;
	hObj.style.top = tempY;
	helpBox(hObj,'show');
}
function helpin(el,content){
	hObj = catchObj(el);
	hObj.innerHTML = '&nbsp;'+content+'&nbsp;';
	hObj.style.left = tempX + 16;
	hObj.style.top = tempY;
	helpBox(hObj,'show');
}
function helpiFest(el,adjto){
	hObj = catchObj(el);
	tmpObj = document.getElementById(adjto);
	if(tmpObj){
		realLeft = tmpObj.offsetLeft;
		realTop = tmpObj.offsetTop;
		realHeight = tmpObj.height;
		while (tmpObj = tmpObj.offsetParent){
			realLeft = realLeft + tmpObj.offsetLeft;
			realTop = realTop + tmpObj.offsetTop;
		}
		hObj.style.left = realLeft;
		hObj.style.top = realTop + realHeight;
		helpBox(hObj,'show');
	}
}
