// JavaScript Document
 
function novyokno( odkaz )
{
    try
	{
		var test;
		
		test = ! window.open( odkaz );
		return test;
	}
	
	catch (e)
	{
		alert( "Při otvírání nového okna došlo k vnitřní chybě JavaScriptu. Zkuste povolit otevírání nových oken nebo kontaktujte správce webu! Odkaz se otevře ve stávajícím okně" );
		return true;
	}
}

function sanitizeRightBlock(name) {	
				maxHeight = ($('#eventsZalozkyObsah').height() - 30);
				if(maxHeight < 0) return;
				while((currHeight = $('#' + name + 'Tbl').height()) > maxHeight)
				{
					//alert(currHeight + ' je porad vic nez ' + maxHeight + ', takze musim ubrat');
					$('#' + name + 'Tbl tr:last').last().remove();
				}
				
				last = ($('#' + name + 'Tbl tr:last'));
				if(last.attr('class') == 'dat') last.remove();
}
