var locX;
var locY;
floatertimer = null;
if(document.getElementById && !document.all){
	document.onmousemove=getPosM;
}
if(document.getElementById && document.all){
	document.onmousemove=getPosE;
}
function getPosM(e) {
	locX = e.pageX;
	locY = e.pageY;
}
function getPosE(e){
	// JTS 10/26/2006 Added try-catch to take care of null reference exception; could be symptom of something else, but works for now..
	try
	{
		locX = event.clientX + self.document.body.scrollLeft;
		locY = event.clientY + self.document.body.scrollTop;
	}
	catch (e) {}
}
function floater(info, event){
	if(document.all && !document.getElementById){
		//catch old ie's
		return false;
	}
	else if(document.all || document.getElementById){
		//catch ie with standards, but not quite junk as well as other standards based and let them through
	}
	else{
		//catch everything else
		return false;
	}
	var el = document.getElementById("floater");
	el.innerHTML = "";
	el.style.position = 'absolute';
	el.style.top = locY + 10 + 'px';
	el.style.left = locX - 120 + 'px'; 
	el.style.display = 'inline';
	el.innerHTML = info;
/*
	if (document.getElementById) { // NS6/IE5+
		//this is going to do some final checking to see if the floater is actually within the window after showing it and not scrolling off the page
		// window.innerWidth/Height is NS6, otherwise IE5+
		var nRightMargin = (window.innerWidth ? window.innerWidth + window.pageXOffset : document.body.clientWidth + document.body.scrollLeft);
		if ((locX - el.offsetWidth) < 0){  // floater runs off right
		  locX += el.offsetWidth + 10;
		}
		var nBottomMargin = (window.innerHeight ? (window.innerHeight + window.pageYOffset - 38) : (document.body.clientHeight + document.body.scrollTop - 20));
		if ((locY + el.offsetHeight) > nBottomMargin){ // floater runs off bottom
		  locY -= el.offsetHeight + 20;
		}
		el.style.left = locX - 120;
		el.style.top = locY + 10;
		el.style.display = 'inline';
	} 
*/
	floatertimer = setTimeout("moveIt()",50);
}

function moveIt() {
var el = document.getElementById("floater");
/*
		var nRightMargin = (window.innerWidth ? window.innerWidth + window.pageXOffset : document.body.clientWidth + document.body.scrollLeft);
		if ((locX - el.offsetWidth) < 0){  // floater runs off right
		  locX += el.offsetWidth + 10;
		}
		var nBottomMargin = (window.innerHeight ? (window.innerHeight + window.pageYOffset - 38) : (document.body.clientHeight + document.body.scrollTop - 20));
		if ((locY + el.offsetHeight) > nBottomMargin){ // floater runs off bottom
		  locY -= el.offsetHeight + 20;
		}
*/
		el.style.left = locX - 120;
		el.style.top = locY + 10;
		el.style.display = 'inline';
		floatertimer = setTimeout("moveIt()",50);
}

function floaterDone(){
	document.getElementById("floater").style.display = 'none';
	clearTimeout(floatertimer);
}
