var picDescrip='';
var picAlt='';
var picWidth=0;
var picHeight=0;
var picCopy='';
var picUrl = '';
function ZoomImage(container){
  var addWidth = 0, addHeight = 0, wWidth = 0, wHeight = 0;
  picUrl = container.firstChild.firstChild.innerHTML;
  if(picUrl.length == '')return false;
  picWidth = container.firstChild.childNodes['1'].innerHTML;
  picHeight = container.firstChild.childNodes['2'].innerHTML;
  
  
  adjustHeight = 45;
  adjustHeight = (container.firstChild.childNodes[2].innerHTML*1)+adjustHeight;

  wLeft = (screen.width - picWidth) / 2;
  wTop = (screen.height - adjustHeight) / 2;

  picScroll = 'no';
  if(screen.height < (picHeight*1 + 50) || screen.width < picWidth){
    picScroll = 'yes';
    adjustHeight+=25;
  }

  wWidth = container.firstChild.childNodes[1].innerHTML*1;
  wHeight = adjustHeight*1;

  if(screen.height < (picHeight*1 + 50)){
    wHeight = screen.height - 100;
    addWidth=18;
    wTop = 0;    
  }
  if(screen.width < picWidth){
    wWidth = screen.width;
    addHeight=18;
    wLeft = 0;
  }

  wWidth+=(addWidth*1);
  wHeight+=(addHeight*1);

  var win = window.open("/lipZI.php",
    '',
    'left='+wLeft+',top='+wTop+','+
    'width='+wWidth+', '+
    'height='+wHeight+', '+
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars='+picScroll+', resizable=no'
  );

  win.window.moveTo(wLeft,wTop);

  
  imgAlt = container.getElementsByTagName('IMG');
  picAlt = imgAlt[0].alt;

  picDescrip=container.offsetParent.rows[1].cells[0].innerHTML;
  picCopy=container.offsetParent.rows[3].cells[0].firstChild.childNodes[1].innerHTML;

  // Just in case left and top are ignored
  win.focus();
}