	function print_detail(id_polozky) {
		w = 700;
		h = 600;
		meta_h = 40;

		wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
		wleft = Math.round((screen.width - w) / 2);
			
		info = window.open('/print_details.php?DetID=' + id_polozky, '', 'width=' + w + ', height=' + h + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
	}
	
	function tell_friend(id_polozky) {
		w = 400;
		h = 300;
		meta_h = 40;

		wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
		wleft = Math.round((screen.width - w) / 2);
			
		info = window.open('/tell_friend.php?DetID=' + id_polozky, '', 'width=' + w + ', height=' + h + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
	}
	
	function checkType(hodnota) {
//		alert(hodnota);
		if (hodnota == 1) {
				document.getElementById('velikost').style.visibility = 'visible';
				document.getElementById('velikost').style.display = 'block';
/*
				document.getElementById('velikost_select').style.visibility = 'visible';
				document.getElementById('velikost_select').style.display = 'block';
*/
		}
		else {
				document.getElementById('velikost').style.visibility = 'hidden';
				document.getElementById('velikost').style.display = 'none';
/*				document.getElementById('velikost_select').style.visibility = 'hidden';
				document.getElementById('velikost_select').style.display = 'none';
*/
		}		
	}

		function large_picture(nam, file, w, h) {

			meta_h = 60;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
	
			pic = window.open('', '', 'width=' + (w + 20) + ', height=' + (h + meta_h) + ',resizable=yes,top=' + wtop + ',left=' + wleft);
			pic.document.open();
			pic.document.writeln('\
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\
			"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\
		\
		<html>\
		<head>\
		<title>' + nam + '</title>\
		<style type="text/css">\
		BODY { margin: 0px; background: #ccc; }\
		</style>\
		</head>\
		<body>\
		<center>\
		<table align="center">\
		<tr height="6">\
			<td></td>\
		</tr>\
		</table>\
		<a href="javascript:window.close();"><img src="' + file + '" width="' + w + '" height="' + h + '" alt="Kliknutím na obrázek okno zavřete" border="1" style="border: 1px gray solid;" /></a>\
		</center>\
		<table align="center">\
		<tr>\
			<td style="text-align: center; font-family: Tahoma; font-size: 11px"><br>' + nam +'</td>\
		</tr>\
		</table>\
		</body>\
		</html>\
		');
			pic.document.close();
		}

	function virtual_tour(id_polozky) {
		w = 970;
		h = 670;
		meta_h = 0;

		wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
		wleft = Math.round((screen.width - w) / 2);
			
//		vt = window.open('/virtual_tour/' + id_polozky + '/start.html', '', 'width=' + w + ', height=' + h + ',resizable=no,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);
		vt = window.open('/virtual-tour-' + id_polozky, '', 'width=' + w + ', height=' + h + ',resizable=no,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);

	}
	
