var bIE = document.all?true:false;

if (!bIE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

var tempX = 0;
var tempY = 0;

//DHTML over for product image div.
function showImageDiv(sThumb) {
   return false;
   //Get height and width of thumbnail.
   iImgWidth = document.images[sThumb].width;
   iImgHeight = document.images[sThumb].height;

   //Div for popup.
   oThumbDiv = document.getElementById("divThumb");
   
   //Load content.
   oThumbDiv.innerHTML = document.getElementById("content" + sThumb).innerHTML;
   oThumbDiv.onclick = function() {
      document.location.href = "/View.asp/id/" + sThumb;
   };
   
   //Place the popover.
   oThumbDiv.style.top = findPosY(document.images[sThumb]) + (iImgHeight / 2.5) + "px";
   oThumbDiv.style.left = findPosX(document.images[sThumb]) - 10 + "px";
   oThumbDiv.style.width = iImgWidth + 20 + "px";
   oThumbDiv.style.height = (iImgHeight / 2.1) + "px";
   oThumbDiv.style.visibility = "visible";
   
   if ((iImgHeight / 2.1) < 60) {
      oThumbDiv.style.height = "65px";
   }
}

function hideImageDiv(evt) {
   var e = evt || window.event;
   var oTarget;
   
   if (e.target) oTarget = e.target;
   if (e.srcElement) oTarget = e.srcElement;
   
   if (oTarget.tagName != "TD") {
       e.cancelBubble = true;
       return false;
   }
   
   //return false;
   //Div for popup.
   oThumbDiv = document.getElementById("divThumb");
   
   iPosY = findPosY(oThumbDiv);
   iPosX = findPosX(oThumbDiv);
   
   iWidth = oThumbDiv.clientWidth;
   iHeight = oThumbDiv.clientHeight;
   
   if ((tempX >= iPosX) && (tempX <= iPosX + iWidth) && (tempY >= iPosY) && (tempY <= iPosY + iHeight)) {
      return false;
   }else{
      oThumbDiv.style.visibility = "hidden";
      return true;
   }
}