function imgpop(a) {
	url = a.getAttribute('href');
	var wnd = window.open('', 'item', 'location=0,statusbar=1,menubar=1');
	wnd.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" \n"http://www.w3.org/TR/html4/loose.dtd">\n<html><head><title>Balloon Design</title><script type="text/javascript" src="js/imgpop.js"></script><style type="text/css">html, body, img {margin:0;padding:0}\nimg {border: 0px;cursor:pointer}</style></head><body onload="return imgpopinner();"><img id="i" alt="'+url+'" src="'+url+'" onclick="window.close();" title="Ablak bezárása" />');
	wnd.document.close();
	wnd.focus();
	return false;
}

function imgpopinner() {
	var i = document.getElementById('i');
	var w = i.width;
	var h = i.height;
	window.resizeTo(w, h);
	if (window.innerWidth) {
		dw = w-window.innerWidth;
		dh = h-window.innerHeight;
	} else if (window.document.documentElement && (window.document.documentElement.clientWidth || window.document.documentElement.clientHeight)) {
		dw = w-window.document.documentElement.clientWidth;
		dh = h-window.document.documentElement.clientHeight;
	} else if (window.document.body && (window.document.body.clientWidth || window.document.body.clientHeight)) {
		dw = w-window.document.body.clientWidth;
		dh = h-window.document.body.clientHeight;
	}
	if (dw&&dh) window.resizeTo(w+dw,h+dh);
	return false;
}