function jakyProhl() {
  var agt=navigator.userAgent.toLowerCase();
  var major = parseInt(navigator.appVersion);
  this.ie=((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1))?1:0;
  this.ie6  = (this.ie && (major == 4) && (agt.indexOf("msie 6.")!=-1) ) ? 1:0;
  this.gecko = (agt.indexOf('gecko') != -1)?1:0;
  this.dom=document.getElementById?1:0;
  this.ie4=(document.all && !this.dom)?1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  return this;
}
 
function dostupSirka() {
	if (jakyProhl.ns4 || (jakyProhl.dom && !jakyProhl.ie)) return window.innerWidth;
   	else return document.body.clientWidth;
}

function dostupVyska() {
	if (jakyProhl.ns4 || (jakyProhl.dom && !jakyProhl.ie)) return window.innerHeight;
   	else return document.body.clientHeight;
}
function rtobr(co)
{
	if (document.helpOkno)
		if (!document.helpOkno.closed)
			document.helpOkno.close();
	document.helpOkno = window.open(co,"noveOkno","width=400,height=450,resizable=yes,scrollbars=yes");
}

function rtobrpohyb(co,sirka,vyska)
{
	if (document.helpOkno)
		if (!document.helpOkno.closed)
			document.helpOkno.close();
	var s = dostupSirka();
	var v = dostupVyska();
	if ((s < sirka) || (v < vyska)) {
		document.helpOkno = window.open(co,"noveOkno","width="+s+",height="+v+",resizable=yes,scrollbars=yes");
	} else {
		document.helpOkno = window.open(co,"noveOkno","width="+sirka+",height="+vyska+",resizable=no,scrollbars=no");
	}
}

function oedit(co)
{
	if (document.helpOkno)
		if (!document.helpOkno.closed)
			document.helpOkno.close();
	document.helpOkno = window.open(co,"editOkno","width=700,height=550,resizable=no,scrollbars=no");
} 

function ozavri(co)
{
	if (document.helpOkno)
		if (!document.helpOkno.closed)
			document.helpOkno.close();
	document.helpOkno = window.close();
} 