﻿function chbxLstSelectAll(chbxLst, value) {
  //budu prochazet stranku dokud nenajdu
  var i = 0;
  while (1 == 1) {
    var chbx = document.getElementById(chbxLst + '_' + i.toString());

    if (chbx == null)
      break;
    else {
      chbx.checked = value;
      i = i + 1;
    }
  }
}

function reloadOpener() {
  try {
    if (window.opener != null && !window.opener.closed && window.opener.Reload)
      opener.Reload();
  } catch (e) { }
}

function postBackOpener() {
  try {
    if (window.opener != null && !window.opener.closed && window.opener.PostBack)
      opener.PostBack();
  } catch (e) { }
}

function popup(url, name, width, height) {
  if (!name) name = 'popupWin';
  if (!width) width = 400;
  if (!height) height = 400;
  window.open(url, name, 'width=' + width + ', height=' + height + ', scrollbars=yes, resizable=yes, status=1');
}

function isPopup() {
  return window.opener != null;
}
