function findPosition( oLink ) {
  if( oLink.offsetParent ) {

    for( var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent ) {
      posX += oLink.offsetLeft;
      posY += oLink.offsetTop;
    }

    return [ posX, posY ];
  } else {
    return [ oLink.x, oLink.y ];
  }
}

function Zoom(zoomid,catnum) {
 var thethum = document.getElementById("thumb" + zoomid);
 var srcstring = thethum.src;
 srcstring = srcstring.split('thumbnails');
 imgzoom.src = srcstring[0] + 'standard' + srcstring[1];
 var pos = findPosition(thethum);

 thezoom.style.left = pos[0] - 60+'px';
 thezoom.style.top = pos[1] -60+'px';
 //alert ( "Left: " + thezoom.style.left );
 //alert ( "Top: " + thezoom.style.top );
 zoomcap.innerHTML = catnum;
 thezoom.style.visibility = "visible";
}

function hide() {
 thezoom.style.visibility = "hidden";
}

