// prida do oblibenych polozek pro ruzne prohlizece
function AddToFavorites(url, title)
{
	if(window.sidebar && window.sidebar.addPanel)
		window.sidebar.addPanel(title, url, '');
	else if(window.external && (navigator.platform == 'Win32' || (window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1)))
		window.external.AddFavorite(url, title);
	else if(window.opera && window.print)
		return true;
	else if(document.layers)
		window.alert('Please click OK then press Ctrl+D to create a bookmark');
	else
		window.alert('Please use your browser\'s bookmarking facility to create a bookmark');
}

// zobrazi popis k nejake amenities
function ShowDesc(tit, text)
{
	var WndProc = window.open('', '', 'width = 180, height = 220, left = 600, top = 200');
	
	with(WndProc.document)
	{
		writeln('<HTML>');
		writeln('<HEAD>');
		writeln('<TITLE>.::Description::.</TITLE>');
		writeln('<META http-equiv="Content-Type" content="text/html; charset=UTF-8">');
		writeln('<STYLE type="text/css">');
		writeln('.atxt {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FF3300}');
		writeln('</STYLE>');
		writeln('</HEAD>');
		writeln('<BODY bgcolor="#FFFFFF" text="#000000">');
		writeln('<TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="162">');
  		writeln('<TR>');
    	writeln('<TD width="13"><IMG name="left" src="img/left.gif" width="13" height="14" border="0"></TD>');
		writeln('    <TD width="137"><IMG name="top" src="img/top.gif" width="137" height="14" border="0"></TD>');
		writeln('    <TD width="12"><IMG name="right" src="img/right.gif" width="12" height="14" border="0"></TD>');
		writeln('  </TR>');
		writeln('  <TR>');
		writeln('    <TD width="13"><IMG name="aleft" src="img/aleft.gif" width="13" height="158" border="0"></TD>');
		writeln('    <TD width="137" class="atxt" valign="top"><B>' + tit + '</B><BR>');
		writeln(text);
		writeln('	 <BR>');
		writeln('    </TD>');
		writeln('    <TD width="12"><IMG name="aright" src="img/aright.gif" width="12" height="158" border="0"></TD>');
		writeln('  </TR>');
		writeln('  <TR>');
		writeln('    <TD colspan="3"><A href="javascript:window.close();"><IMG name="close" src="img/aclose.gif" width="162" height="20" border="0" alt=""></A></TD>');
		writeln('  </TR>');
		writeln('</TABLE>');
		writeln('</BODY>');
		writeln('</HTML>');
	}
}

function ShowPicture(pictureUrl, pictureDesc, pictureWidth, pictureHeight)
{
	var WndProc = window.open('', '', 'width = ' + pictureWidth + ', height = ' + pictureHeight + ', status=no, toolbar=no');
	
	with(WndProc.document)
	{
		writeln('<html>');
		writeln('<head>');
		writeln('<title>.::' + pictureDesc + '::.</title>');
		writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />');
		writeln('<style type="text/css">');
		writeln('body { border: 0px; padding: 0px; margin: 0px; }');
		writeln('</style>');
		writeln('</head>');
		writeln('<body>');
		writeln('<a href="javascript:window.close();">');
		writeln('<img src="' + pictureUrl + '" width="'+ pictureWidth +'" height="'+ pictureHeight +'" border="0" alt="'+ pictureDesc +'" />');
		writeln('</a>');
		writeln('</body>');
		writeln('</html>');
	}
}


// kontroluje platny email
function CheckEmail(email)
{
	re = new RegExp("^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,6}\$");
	return re.test(email);
}


function startClocks(elementID)
{
	element = document.getElementById(elementID);
	clock = new String(element.innerHTML);
	mytime = new Date();

	clocks = clock.split(':');
		
	mytime.setHours(clocks[0]);
	mytime.setMinutes(clocks[1]);
	mytime.setSeconds(clocks[2]);
	
	updateClocks(element, mytime);
}

function updateClocks(element, mytime)
{
	hours = mytime.getHours();
	minutes = mytime.getMinutes();
	seconds = mytime.getSeconds();
	
	clocks = new String();
	
	if (hours < 10)
	{
		clocks += '0';
	}
	
	clocks += hours;
	clocks += ':';
	
	if (minutes < 10)
	{
		clocks += '0';
	}
	
	clocks += minutes;
	clocks += ':';
	
	if (seconds < 10)
	{
		clocks += '0';
	}
	
	clocks += seconds;
	
	element.innerHTML = clocks;
	
	mytime.setTime(mytime.getTime() + 1000);
	setTimeout('updateClocks(element, mytime)', 1000);
}


