function popUpImageKill()
{
   if (typeof(subwin)=='undefined')
    return;
   if (typeof(subwin.closed)=='undefined')
    return;
   if (subwin.closed==true)
    return;
   subwin.close();
}

function popUpImage(anch, width, height)
{
	var targetUrl = anch.href;
	var title = anch.firstChild.alt;
	popUpImageKill();
 //  	popUpProps(subwin);return false;

   	swleft  = Math.round((screen.width - width)/2);
   	swtop   = Math.round((screen.height - height)/3);

	subwin=window.open("","","height="+height+",width="+width+", left="+swleft+", top="+swtop+", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no");
    	subwin.document.write('<html><head><title>'+title+'</title><style>body {background: #000; margin: 0px; padding: 0px; width:'+width+'; height:'+height+'}</style></head>\n');
    	subwin.document.write('<body><img width="'+width+'" height="'+height+'" src="'+targetUrl+'" onclick="window.close();" /></body>\n');
    	subwin.document.write('</html>\n');

	subwin.focus();
}
