function count_display(){
	_width = screen.width / 2;
	_width = _width - 250;
	return _width;
}

function init_baner(){
	if ( cookies_function() && !baner_showed() ){
		_baner = document.getElementById("baner_jaro");
		_baner.style.left = count_display() + 'px';
		_baner.style.display = 'block';
		Set_Cookie( 'baner_showed', 'yes', '', '/', '', '' );
	}
}

function close_baner(){
	_baner = document.getElementById("baner_jaro");
	_baner.style.display = 'none';
	return false;
}

function show_details(){
	window.location = 'http://www.bazeny-morava.cz/akce-jaro-2012.htm';
	return true;
}

function cookies_function(){
	// name, value, expires, path, domain, secure
	Set_Cookie( 'test_cookies', 'none', '', '/', '', '' );
	
	// otestuju jestli se zapsala
	if ( Get_Cookie( 'test_cookies' ) )	{
		// zapsala se, takze muzu smazat a vratit se
		Delete_Cookie('test_cookies', '/', '');
		return true;
	}
	return false;
}

function baner_showed(){
	if ( Get_Cookie( 'baner_showed' ) == 'yes' ){
		return true;
	}
	return false;
}
