function getCenteredWindowFeatures(iw,ih) {
    var width = iw;
    var height = ih;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",left=" + left + ",top=" + top + 
        ",screenX=" + left + ",screenY=" + top;
    return windowFeatures;
}
function ZoomGalleryImage(lnk,dx,dy){
  //dx = dx+40;
  //dy = dy+60;
  wf = getCenteredWindowFeatures(dx,dy) 
  picWnd = window.open(lnk, "zoomWnd", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,"+wf+"");
  picWnd.window.focus();
}

