var img_win;
var img_href_old;
var onf;

function fc1 (o) {
	if (img_win && img_win.open && !img_win.closed) {
		fc1_img_win_fill (o.href);
		img_win.focus();
	} else {
		img_win=window.open("","","width=1050,height=750,scrollbars=yes,resizable=yes");
		fc1_img_win_fill (o.href);
	}
	return false;
}

function fc1_img_win_fill (img_href) {
	if (img_href_old != img_href) {
		img_win.document.open()
		img_win.document.write(
			"<html><head></head>\n<body bgcolor=#000000><center>\n<a title=\"Kliknutím se vrátíte do původního okna.\" href=# onClick='opener.focus();return false;'>\n<img border=0 src="
			+ img_href
			+ ">\n</a>\n</center></body>\n</html>"
			);
		img_win.document.close()
		img_href_old = img_href;
		}
}

function close_img_win() {
	if (img_win && img_win.open && !img_win.closed) img_win.close();
}

// FF, O:
if (window.addEventListener)
window.addEventListener("unload", close_img_win, false);
// IE:
else if (window.attachEvent)
window.attachEvent("onunload", close_img_win);

else if (document.getElementById)
window.onunload=close_img_win;


