function getPos(inputElement) {
    var coords =  new Object();
    coords.x = 0;
    coords.y = 0;
    try {
        targetElement = inputElement;
        if(targetElement.x && targetElement.y) {
            coords.x = targetElement.x;
            coords.y = targetElement.y;
        } else {
            if(targetElement.offsetParent) {
                coords.x += targetElement.offsetLeft;
                coords.y += targetElement.offsetTop;
                while(targetElement = targetElement.offsetParent) {
                    coords.x += targetElement.offsetLeft;
                    coords.y += targetElement.offsetTop;
                }
            } else {
                //alert(\"Could not find any reference for coordinate positioning.\");
            }
        }
        return coords;
    } catch(error) {
        //alert(error.msg);
        return coords;
    }
}

var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4) skn=document.pdq
else if (ns6) skn=document.getElementById("pdq").style
else if (ie4) skn=document.all.pdq.style

function popupThumbnailComments(elementId,msg){
  imgElement = document.getElementById(elementId);
  var content="<div class=boxpopup>"+msg+"</div>";

  if(ns4){
    skn.document.write(content);
    skn.document.close();
    skn.visibility="visible";
  }
  if(ns6){
    document.getElementById("pdq").innerHTML=content;
    skn.display='';
  }
  if(ie4){
    document.all("pdq").innerHTML=content;
    skn.display='';
    skn.visibility = 'visible';
  }

  skn.left = getPos(imgElement).x + 138;
  skn.top = getPos(imgElement).y;
}

function remove_popup(){

yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
