// -----------------------------------------------------------------------------------------------------------------------------------------------------------------
//  Copyright 2003 Petr Vojta ( vojta@neotech.cz), All Rights Reserved
//  ----------------------------------------------------------------------------------------------------------------------------------------------------------------

// VARIABLE
var prevrow = "";	// OZNACENY RADEK V TABULCE

// OPEN WINDOW
function owindow(odkaz,width,height,scrollbars,name)
{
	var scrollbars= (scrollbars==0) ? "no" : "yes";
	if ( name=='' ) name='wdialog';
	width=width+20;
	var left=(screen.width) ? (screen.width-width)/2 : 100;
	var top=(screen.height) ? (screen.height-height)/2 : 100;
	eval("wdialog=window.open('"+odkaz+"','"+name+"','scrollbars="+scrollbars+",toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,modal=yes,width="+width+",height="+height+",top="+top+",left="+left+"')");
	wdialog.focus();
}

// OPENDIALOG
function odialog(odkaz,width,height,name)
{
	var scrollbars = "no";
	if ( name=='' ) name='wdialog';
	height = height - 30;
	var left=(screen.width) ? (screen.width-width)/2 : 100;
	var top=(screen.height) ? (screen.height-height)/2 : 100;
	eval(name+"=window.open('"+odkaz+"','"+name+"','scrollbars="+scrollbars+",toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,modal=yes,width="+width+",height="+height+",top="+top+",left="+left+"')");
	eval(name+".focus();");
	
	/*
	if ( name=='' ) name='wdialog';
	var scrollbars="no";
	var width=width;
	var left=(screen.width) ? (screen.width-width)/2 : 100;
	var top=(screen.height) ? (screen.height-height)/2 : 100;
	eval("var wdialog=window.open('"+odkaz+"','"+name+"','scrollbars="+scrollbars+",fullscreen=1,toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,width="+width+",height="+height+",top="+top+",left="+left+"')");
	window.focus();
	var sw = window.screen.availWidth;
	var sh = window.screen.availHeight;
	var w = width;
	var h = height;
	wdialog.resizeTo(w, h);
	wdialog.moveTo((sw - w) / 2, (sh - h) / 2);
	wdialog.focus();
	*/
}

// OPEN DIALOG
function opreloader(odkaz,name)
{
	hits = document.all.length;
	odkaz=odkaz+"&hits="+hits+"&file="+name;
	if ( name=='' ) name='index';
	var scrollbars="no";
	var height=10;
	var width=10;
	var left=-100;
	var top=-100;
	eval("window.open('"+odkaz+"','"+name+"','scrollbars="+scrollbars+",toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,width="+width+",height="+height+",top="+top+",left="+left+"')");
}

// SET WINDOW
function set_window(object,width,height)
{
	self.focus();
	self.resizeTo(width,height);	
}

// LOAD URL
function load_url(path)
{
	self.location = path;
}

// LOAD URL
function loadUrl(path)
{
	self.location = path;
}

