var x=0,y=0,theTxt="",theVisible="hidden";

function popUp(i) {
	if (document.getElementById("ID" + [i]) != null){
		theTxt = document.getElementById("ID" + [i]).innerHTML
		theVisible = "visible";
	}else{
		theTxt = ""
		theVisible = "hidden";
	}

	window.document.onmousemove = mouseposition;

	ID.style.left = x + 10 ; 
	ID.style.top = y + 10 ;  

	popuptxt = '<TABLE bgcolor="#666666" cellspacing="1" cellpadding="3"><TR><TD bgcolor="#efefef">' + theTxt + '</TD></TR><TABLE>';
	ID.innerHTML = (popuptxt);
	ID.style.visibility = theVisible;
}

function mouseposition(position){
	if (window.createPopup){
		x = event.x + document.body.scrollLeft; //firefox以外
		y = event.y + document.body.scrollTop;	
	}else{
		x = position.pageX ; //firefox用
		y = position.pageY;
	}
}

function hidePop() {
	ID.style.visibility = "hidden";
}
