function ow ( title, url, w, h, b_scrollbars, b_resizable )
{
        var twidth = w;
        var theight = h;

	var i_scrollbars = b_scrollbars ? 1 : 0;
	var i_resizable = b_resizable ? 1 : 0;

        if(twidth > screen.width - 40) twidth = screen.width - 40;
        if(theight > screen.height - 40) theight = screen.height - 40;

        var pos_x = (screen.width - twidth - 10)/2;
        var pos_y = (screen.height - theight - 29)/2;

        if(typeof(document_nahlad_obrazku) == "undefined" || document_nahlad_obrazku.closed)
        document_nahlad_obrazku = window.open(url,'document_nahlad_obrazku','status=no,menubar=0,toolbar=0,location=0,scrollbars=' + i_scrollbars + ',screenX='+pos_x+',screenY='+pos_y+',left='+pos_x+',top='+pos_y+',width='+twidth+',height='+theight+',resizable=' + i_resizable );
	else document_nahlad_obrazku.location.href = url;

        document_nahlad_obrazku.focus();
}

function oo ( title, url, w, h )
{
	ow ( title + ', Slobodné Fórum', url, w, h, false, true );
}

var s_opened = '';
var t = null;

function Ukaz ( s )
{
	clearTimeout ( t );

	if ( s_opened == s ) return;
	else if ( s_opened != '' ) _NaozajSkry ( s_opened );

	var o_obj = document.getElementById ( s );

	if ( o_obj == null ) return;

	o_obj.style.zIndex = 1000;
	o_obj.style.display = 'block';

	s_opened = s;
}

function Skry ( s )
{
	t = setTimeout ( "_NaozajSkry('" + s + "')", 500 );
}

function _NaozajSkry ( s )
{
	clearTimeout ( t );

	var o_obj = document.getElementById ( s );

	if ( o_obj == null ) return;

	o_obj.style.display = 'none';

	s_opened = '';
}

function UkazKomentar ( o )
{
	var o_parent = o.parentNode;
	var o_komentar = o_parent.nextSibling;

	o_parent.style.display = "none";
	o_komentar.style.display = "inline";
}

function SkryKomentar ( o )
{
	var o_parent = o.parentNode;
	var o_komentar = o_parent.previousSibling;

	o_parent.style.display = "none";
	o_komentar.style.display = "inline";
}

