
	function show(what){
		document.getElementById(what).style.display = 'block';
	};
	
	function hide(what){
		document.getElementById(what).style.display = 'none';
	};

	function okynko(url, w, h){
		if (w > 1000){
			w=1000;
		}
		if (h > 750){
			h=750;
		}
		window.open(url, '_blank', 'scrollbars,menubar=0,width=' + w + ',height=' + h);
	};

	function checkall(form, value)
	{
		for(i in document.forms[form].elements){
			obj=document.forms[form].elements[i];
			if (typeof obj.checked == "boolean"){
				obj.checked=value;
			}
		}
	};

	var timeout=250;
	var closetimer=0;
	function show_cats(){
		cancel_cats_timeout();
		document.getElementById('prehled').className='prehled pactive';
		document.getElementById('cats').style.display='block';
	};
	function hide_cats(){
		document.getElementById('prehled').className='prehled';
		document.getElementById('cats').style.display='none';
	};
	function hide_cats_timeout(){
		closetimer = window.setTimeout(hide_cats, timeout);
	};
	function cancel_cats_timeout(){
		if(closetimer)
		{
			window.clearTimeout(closetimer);
			closetimer = null;
		}
	}


	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	};
	
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	};
	
	function eraseCookie(name) {
		createCookie(name,"",-1);
	};
