   function imgPop(caption,title) {
   Stamp = new Date();
   var ts;
   ts = Stamp.getHours() +''+ Stamp.getMinutes() +''+  Stamp.getSeconds();

var formstuff ='<form method="post" action="modView.sp" name="vcard'+ts+'"> \
<input type="hidden" name="image" value="'+caption+'" /> \
<input type="hidden" name="caption" id="caption" value="'+title+'"> \
<input type="hidden" name="form" value="vcard"></form>';
cForm2='<img src="thumb/ecard.gif" alt="Send this picture to a friend" border="0" width="24" height="24" style="margin-left:28px;" style="cursor: pointer;cursor: hand" align="top" ONCLICK="document.vcard'+ts+'.submit();return false">'

	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"><b>'+title+'</b>'+cForm2 +'<img src="thumb/iconPrint.gif" onclick="printImage(\'' + caption + '\')" border="0" style="cursor: pointer;cursor: hand" align="top" width="24" height="24"><img src="thumb/iconClose.gif" border="0" onclick="document.getElementById(\'imgPop'+ts+'\').style.display=\'none\';return false" style="cursor: pointer;cursor: hand" align="top" width="24" height="24"></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    =  (20 + toppos) + 'px';
	a.style.marginLeft = "7px";
	a.style.marginRight = "7px";
	a.style.fontFamily = 'Arial, verdana, sans-serif';
	a.style.fontSize   = '11px';
	a.titlebar = document.createElement('div');
	a.titlebar.style.padding = '2px';
	a.titlebar.style.fontSize= '14px';
	a.titlebar.style.background = '#999999';
	a.titlebar.style.color      = '#ffffff';
	a.appendChild(a.titlebar);
	a.content = document.createElement('div');
	a.content.style.padding = '6px';
	a.appendChild(a.content);
      }
      a.style.display = 'block';
      a.content.innerHTML = '<span style="float:left;">'+formstuff+'</span><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();
}
