		function makeAddr( username , tucny)
		{
		domainname = "kontaktreal.cz"
		at = "@"
		    if( makeAddr.arguments.length == 2 ) {
				document.write("<a href='mailto:" + username + "" + at + "" + domainname + "' style='color: #dddddd;'>")
				if (tucny==1) document.write("<strong>")
				document.write("" + username + "" + at + "" + domainname + "")
				if (tucny==1) document.write("</strong>")
				document.write("</a>")
		    }
		}

        function centred_window_scroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
		}

        function centred_window_noscroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=no,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);
		}

        function print_order(theURL) {

			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(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
		}

		function large_picture(nam, file, pic_celk, poradi, idr, w, h) {

			okraje_top_bottom = 140;
			okraje_left_right = 125;

			wtop = Math.round((screen.height - h - okraje_top_bottom) / 2);
			wleft = Math.round((screen.width - w - okraje_left_right) / 2);
	
			pic = window.open('', '', 'width=' + (w + okraje_left_right) + ', height=' + (h + okraje_top_bottom) + ',status=1,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 />\
		<BASE href="<?php echo $base ?>"> \
		<style type="text/css">\
		BODY { margin: 0px; background: black; }\
		</style>\
		</head>\
		<body>\
		<center>\
		<table align="center">\
		<tr>\
		<td style="text-align: center; font-family: Tahoma; font-size: 11px;padding-bottom:5px;color:white;"><br><br>');
	 if (pic_celk > 1 && poradi > 1) pic.document.writeln('&nbsp;&nbsp; &laquo <a href="http://www.kontaktreal.cz/gallery.php?idr='+idr+'&pic='+ (poradi-1) +'" style="color:white">Předchozí</a>');
			pic.document.writeln('<b> ' + poradi + ' / ' + pic_celk + '</b>');

	 if (pic_celk > 1 && poradi < pic_celk) pic.document.writeln('&nbsp;&nbsp;<a href="http://www.kontaktreal.cz/gallery.php?idr='+idr+'&pic='+ (poradi+1) +'" style="color:white">Další</a> &raquo');

pic.document.writeln('\
			</td>\
		</tr>\
		</table>\
		<table align="center">\
		<tr height="6">\
			<td></td>\
		</tr>\
		</table>\
		<a href="javascript:window.close();" title="Kliknutím na obrázek okno zavřete"><img src="' + file + '" width="' + w + '" height="' + h + '" style="border-color: red;" alt="Kliknutím na obrázek okno zavřete" border="1"/></a>\
		</center>\
		<br>\
		<table align="center" width="100%">\
		<tr>\
			<td style="text-align: center; vertical-align: middle; font-family: Tahoma; font-size: 11px;color: #ffd500; background-color: #cf171c;"><strong>' + nam +'</strong></td>\
		</tr>\
		</table>\
		</body>\
		</html>\
		');
			pic.document.close();
		}


		function large_picture2(nam, file, w, h) {

			meta_h = 50;

			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 + 10) + ',scrollbars=1,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: black; }\
		</style>\
		</head>\
		<body>\
		<center>\
		<table align="center">\
		<tr height="6">\
			<td></td>\
		</tr>\
		</table>\
		<a href="javascript:window.close();" title="Kliknutím na obrázek okno zavřete"><img src="' + file + '" width="' + w + '" height="' + h + '" style="border-color: white;" alt="Kliknutím na obrázek okno zavřete" border="1"/></a>\
		</center>\
		<br>\
		<table align="center" width="100%">\
		<tr>\
			<td style="text-align: center; vertical-align: middle; font-family: Tahoma; font-size: 11px;color: gold; background-color: red"><strong>' + nam +'</strong></td>\
		</tr>\
		</table>\
		</body>\
		</html>\
		');
			pic.document.close();
		}
		function jenCisla() {
			with (event)
			if (keyCode<48 || keyCode>57) returnValue=false;
		}

