Javascript Mouseovers

<SCRIPT>
var ibc=0;

function ibx(srcId,par) {
var txt=(typeof par=='undefined')?'&nbsp;?&nbsp;':par;
	document.write("<SPAN onMouseOver='infoText(\""+srcId+"\")' "+"onMouseOut='infoText(\"ibx"+srcId+"\")'"+">");
	document.write(txt);
	document.write("</SPAN>");
	}

function infoText(srcId) {
var ds=document.getElementById(srcId).style;
	if (ds.visibility=='visible') ds.visibility='hidden';
	else {
		topVal=eval(event.offsetY+15);
		leftVal=eval(event.offsetX-125);
		rightVal=leftVal+250;
		if (rightVal>screen.availWidth-25) {
			rightVal=screen.availWidth-25;
			leftVal=rightVal-250;
			};
		if (leftVal<2) leftVal=2;
		ds.top=topVal;
		ds.left=leftVal;
		if (event.type=='mouseover') 
			ibId=setTimeout("document.getElementById('"+srcId+"').style.visibility='visible'",500);
		if (event.type=='mouseout') 
			clearTimeout(ibId);
		};
	};
</SCRIPT>

...


<SCRIPT>ibx(ibc++,"tool tip")</SCRIPT>
...

Questions:

See also: