
	function openCenteredPopup(anchor,w,h,name,params)
	{	//{{{
		sw=screen.availWidth;
		sh=screen.availHeight;
		xpos=(sw-w)/2;
		ypos=(sh-h)/2;
		win = window.open(anchor,name,"width="+w+",height="+h+",top="+ypos+",left="+xpos+","+params);
		win.focus();
	}	//}}}

	// flash detector
	var MM_contentVersion = 6;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			for (var i = 0; i < words.length; ++i)
			{
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i];
			}
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}

	var detailVisible = 0;
	function showDetail(id) {
		if (detailVisible>0) {
			var o = document.getElementById('detail'+detailVisible);
			o.style.display = "none";
			detailVisible = 0;
		}
		var o = document.getElementById('detail'+id);
		o.style.display = "block";
		detailVisible = id;
	}

	function closeDetail(id) {
		if (detailVisible>0) {
			var o = document.getElementById('detail'+detailVisible);
			o.style.display = "none";
			detailVisible = 0;
		}
	}

	var minNewsHeight = 400;

/*	window.onload = function() {
		var h = 0;
		var h2 = 0;

		if (document.defaultView) {
			obj = document.getElementsByTagName('html')[0];
			h2 += parseInt(getCStyle(obj,'height'));
			var obj = document.getElementById('news');
			obj.style.height = (parseInt(h2)-292)+'px';
			var obj = document.getElementById('footer');
			if (h2<minNewsHeight) h2=minNewsHeight;
			obj.style.top = (parseInt(h2)-32)+'px';
		} else {
			var obj = document.getElementById('menu');
			h2 += obj.offsetHeight;
			var obj = document.getElementById('content');
			h += obj.offsetHeight;
			if (h2>h) {
				h = h2;
			}
			if (h==0) h=650;
			if (h==120) h=1085;

			if (h<minNewsHeight) h = minNewsHeight;

			var obj = document.getElementById('news');
			obj.style.height = (parseInt(h)-120)+'px';

			var obj = document.getElementById('footer');
			obj.style.top = (290+parseInt(h)-122)+'px';
		}
	} */

	function getCStyle(obj,prop) {
		if (document.defaultView) {
			var v = document.defaultView.getComputedStyle(obj, "").getPropertyValue(prop);
		} else {
			var v = eval('obj.currentStyle.'+prop);
		}
		return v;
	}

	var tt = ['ěščřžýáíéťdňúůĚŠČŘŽÝÁÍÉĎŤŇÚŮabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
			  'escrzyaietdnuuescrzyaiedtnuuabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'];
	function urlize(inf,outf) {
		var out = '';
		for (var i=0;i<inf.value.length;i++) {
			var c = tt[0].indexOf(inf.value.substr(i,1));
			if (c>-1) {
				out += tt[1].substr(c,1);
			} else {
				out += '-';
			}
		}
		outf.value = out;
	}

	function askDelete(url) {
		if (confirm('Are you sure?')) {
			document.location.href = url+'?referer='+document.location;
		}
	}