// JavaScript Document

		function pause(numberMillis)
		{
			var now = new Date();
			var exitTime = now.getTime() + numberMillis;
			while (true)
			{
				now = new Date();
				if (now.getTime() > exitTime)
				return;
			}
		} 

		function showHide(id)
      {
        el = document.getElementById(id).style;
        el.display = (el.display == 'block') ? 'none' : 'block';
      }

      function hideShow(id)
      {
        el = document.getElementById(id).style;
        el.display = (el.display == 'none') ? 'block' : 'none';
      }

		function refresh_opener_and_close_with_delay(bla)
		{
			setTimeout(window.close(),5000);
			opener.location.reload();
		}

		function w_refresh()
		{
			window.location.replace(window.location);
		}

		function refresh_with_delay()
		{
			//window.location.reload();

			

// 			setTimeout('w_refresh()',3000);
		}

		function refresh_preview()
		{
				var hodnota = document.getElementsByName('sloupce_i')[0].value;
				var preview = document.getElementsByName('preview')[0];

				while(hodnota.indexOf('\n') > 0) hodnota = hodnota.replace("\n", "€");

				preview.src='http://plantanaturalis.klenot.cz/source/nahled_sloupcu_louky.php?sloupce_i='+hodnota;
				setTimeout('refresh_preview()',3000);
		}