
//####################################
function ShowPopup(hoveritem,e,footer)
{
	var hp = document.getElementById("hoverpopup");
	var arrPos = getMouseXY(e);
	if(footer){
		hp.style.left = arrPos[0]+50;
		hp.style.top = arrPos[1]-45;
	}else{
		hp.style.left = arrPos[0]-300;
		hp.style.top = arrPos[1]+15;
	}
	hp.style.visibility = "Visible";
}

//####################################
function HidePopup()
{
	var hp = document.getElementById("hoverpopup");
	hp.style.visibility = "Hidden";
}

//####################################
function getMouseXY(e) {
	var tempX = 0;
	var tempY = 0;
	var IE = document.all?true:false
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  

  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
	var arrPos = new Array(tempX, tempY);
  return arrPos;
}