
function openwinfull(url,name,width,height) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = Math.floor((aw - width) / 2);
    var yc = Math.floor((ah - height) / 2);
    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
    // alert(screen.availWidth + "x" + screen.availHeight + "\n" + xc + "x" + yc);
  }
  str += ",directories=1,location=1,menubar=1,personalbar=1,scrollbars=1,status=1,toolbar=1";
  return window.open(url,name,str);
}

function otevri_okno(url, name, width,height ) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;
    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  return window.open(url, name, str + ",scrollbars,status");
}

function openwin_(url,name,width,height) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = Math.floor((aw - width) / 2);
    var yc = Math.floor((ah - height) / 2);
    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
    // alert(screen.availWidth + "x" + screen.availHeight + "\n" + xc + "x" + yc);
  }
  str += ",directories=0,location=0,menubar=1,personalbar=0,scrollbars=1,status=0,toolbar=1";
  return window.open(url,name,str);
}

function Konec() {
	top.window.opener.document.location.replace(window.opener.document.location); 
	window.opener=null;
	window.close()
    }

 function printing()  {
   window.print();
 } 
