var mpX, mpY;
var popped = 'null';

function showdiv(id,lid) {

	if(document.getElementById(id)) {					
		if (document.all) {
			oScrollCoords = getScrollCoords();
			document.getElementById(id).style.left = event.clientX + oScrollCoords.x + 10;
			document.getElementById(id).style.top = event.clientY + oScrollCoords.y + 20;
		}
		else {
			document.getElementById(id).style.left = mpX+"px";
			document.getElementById(id).style.top = mpY+"px";
		}
		document.getElementById(id).style.visibility='visible';				
	}
	else if ((document.all)&&(document.all[id])) {
		oScrollCoords = getScrollCoords();
		document.all[id].style.left = event.clientX + oScrollCoords.x + 10;
		document.all[id].style.top = event.clientY + oScrollCoords.y + 20;
	}
	popped = id;
}

function hidediv(id,lid) { 
	if(document.getElementById(id)) {
		document.getElementById(id).style.visibility='hidden';
	}
	else if ((document.all)&&(document.all[id])) {
		document.all[id].style.visibility='hidden';
	}
}

function getDiv(id) {
	var o;
    o = document.getElementById( id );
    return o;
}

function getScrollCoords () {
  if (typeof window.pageXOffset != 'undefined')
    return {x: window.pageXOffset, y: window.pageYOffset};
  else if ((!document.compatMode || document.compatMode == 'BackCompat')
           && document.body && typeof document.body.scrollLeft != 'undefined')
    return {x: document.body.scrollLeft, y: document.body.scrollTop};
  else if (document.compatMode == 'CSS1Compat' &&
           document.documentElement && typeof document.documentElement.scrollLeft != 'undefined')
    return {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};
  else
    return null;
}

