function openimg(img,width,height,alt,leftpos,toppos) {
	if (!leftpos || !toppos) {
		leftpos = (screen.height - height)/2;
		toppos  = (screen.width - width)/2;
	}
	win = window.open("","win","width="+width+",height="+height+",left="+leftpos+",top="+toppos);
	win.document.open();
	win.document.write('<html><title>'+alt+'</title><body bgcolor="#ffffff" style="margin:0;" onBlur="self.close()">'); 
	win.document.write('<img src='+img+' width='+width+' height='+height+' alt='+alt+'>'); 
	win.document.write('</body></html>');
	win.document.close();
	win.focus();
}

function targetopener(mylink, noclose, closeonly) {
	if (!(window.focus && window.opener)) return true;
	window.opener.focus();
	if (!closeonly) window.opener.location.href=mylink.href;
	if (!noclose) window.close();
	return false;
}