   function imgPop(caption) {
   Stamp = new Date();
   var ts;
   ts = Stamp.getHours() +''+ Stamp.getMinutes() +''+  Stamp.getSeconds();
	var toppos;
	toppos = document.all ? document.documentElement.scrollTop : window.pageYOffset;
	if (toppos>0) toppos++;
	 else  
	 {
	 toppos = document.all ? document.body.scrollTop : window.pageYOffset;
	 toppos++;
	 }
      if(!document.getElementById) {
	return;
      }
      var title = '<div align="right"><img src="thumb/iconPrint.gif" onclick="printImage(\'' + caption + '\')" border="0" style="cursor: pointer;cursor: hand" align="top"><img src="thumb/iconClose.gif" border="0" onclick="document.getElementById(\'imgPop'+ts+'\').style.display=\'none\';return false" style="cursor: pointer;cursor: hand" align="top"></div>';
      a = document.getElementById('imgPop'+ts);
      if(!a) {
	a = document.createElement('div');
	a.id = 'imgPop'+ts;
	document.body.appendChild(a, 0);
	a.style.display = 'none';
	a.style.border = 'solid 1px #556677';
	a.style.position = 'absolute';
	a.style.background = '#e0e0e0';
	a.style.zIndex   = 1000;
	a.style.top    =  Math.floor((Math.random()*80)+11+toppos)+"px";
	a.style.left = Math.floor((Math.random()*40)+10)+"px";
	a.style.marginLeft = "10px";
	a.style.marginRight = "10px";
	a.style.fontFamily = 'Arial, verdana, sans-serif';
	a.style.fontSize   = '11px';
	a.titlebar = document.createElement('div');
	a.titlebar.style.padding = '4px 10px';
	a.titlebar.style.background = '#54799F url(thumb/thumbBG.gif) repeat-x fixed center left';
	a.titlebar.style.color      = '#ffffff';
	a.appendChild(a.titlebar);
	a.content = document.createElement('div');
	a.content.style.padding = '9px';
	a.appendChild(a.content);
      }
      a.style.display = 'block';
      a.content.innerHTML = '<img src="' + caption + '">';
      a.titlebar.innerHTML = title;
    }
function printImage(imgUrl) {
  w = window.open('', 'printPopup');
  w.document.open();
  w.document.write("<img src='"+imgUrl+"'>");
  w.document.close();
  w.print();
  w.close();
}
