// hide link border in IE
function blurlink(obj) {
	if (document.all) {
		obj.blur();
	}
}

// for print icon
function printpage(obj) {
	blurlink(obj);
	window.print();
}

// for bookmark icom
function bookmark(obj) {
	blurlink(obj);
	if ((document.all) && (window.external)) {
		window.external.AddFavorite('http://www.nyarasdi.hu', 'Nyárasdi és Társa - Építő, Szerelő-Szolgáltató Kft.');
	} 
}

// show picture in popup
var popup = null;
function showpic(pic, w, h, label, obj) {
	blurlink(obj);
	if ((popup) && (!popup.closed)) {
		popup.close();
	}
	popup = window.open('','kea','directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,width='+String(w)+',height='+String(h)+',left='+String(Math.floor((screen.width-w)/2))+',top='+String(Math.floor((screen.height-h)/2)-22));
	with (popup.document) {
		open('text/html');
		writeln('<html>');
		writeln('<head>');
		writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />');
		writeln('<title>' + ((label != '') ? label + ' - ' : '') + 'KEA</title>');
		writeln('<style>');
		writeln('body {margin: 0px; padding: 0px; background-color: #ffffff; overflow: hidden;}');
		writeln('a, img {display: block; border: none; margin: 0px; padding: 0px;}');
		writeln('</style>');
		writeln('</head>');
		writeln('<body>');
		writeln('<a href="javascript:;" onclick="self.close();"><img src="'+pic+'" /></a>');
		writeln('</body>');
		writeln('</html>');
		close();
	}
	popup.focus();
}

