function openWindow(w, h, uri)
{
	x = Math.floor((screen.width-w)/2);
	y = Math.floor((screen.height-h)/2);
	window.open(uri,'','toolbar=no,scrollbars=yes,location=no,status=no,left='+x+',top='+y+',width='+w+',height='+h+'resizable=1');
}

function locOpenEditAdresa(lang, formname, formfield)
{
	eval('id = document.'+formname+'.'+formfield+'.value');
	openWindow(400,400,'/'+lang+'/technical/address-edit.html?id='+id+'&formname='+formname+'&formfield='+formfield);
	return(false);
}

function locPerm(lang, module, perm, id)
{
	openWindow(400,400,'/'+lang+'/technical/perm-edit.html?module='+module+'&perm='+perm+'&id='+id);
	return(false);
}

function rozbalovac(id)
{
	elem = document.getElementById(id);
	
	if (elem == null) return;
	
	if (elem.style.display == 'block')
	{
		elem.style.display = 'none';
	}
		else
	{
		elem.style.display = 'block';
	}
}

function obsahSize()
{
	elem = document.getElementById('obsah');
	elem.style.width = document.body.clientWidth - 201 + 'px';
}
