// JavaScript Document
var objPopUp=null;
function mjmpopup(event, objectID) {
	objPopTrig=document.getElementById(event);
	objPopUp=document.getElementById(objectID);
  yPos = getCoordinates(objPopTrig).y+objPopTrig.offsetHeight;
  xPos = getCoordinates(objPopTrig).x;
	if(xPos + objPopUp.offsetWidth>document.body.clientWidth) xPos=xPos-objPopUp.offsetWidth;
	if(yPos + objPopUp.offsetHeight>document.body.clientHeight) yPos=yPos-objPopUp.offsetHeight-objPopTrig.offsetHeight;
  objPopUp.style.top = yPos;
  objPopUp.style.left = xPos;
	objPopUp.style.visibility='visible';
}
function mjmpophide() {
	objPopUp.style.visibility='hidden';
	objPupUp=null;
}
function getCoordinates(obj) {
  var newObj = new Object();
  newObj.x = obj.offsetLeft;
  newObj.y = obj.offsetTop;
  theParent = obj.offsetParent;
  while(theParent != null) {
    newObj.y += theParent.offsetTop;
    newObj.x += theParent.offsetLeft;theParent = theParent.offsetParent;
  }   
  return newObj;
};

	
