function najdiVCombu(combo, val) {
  if (combo == null) return -1;
  for (idx = 0; idx < combo.length; idx++) {
    var o = combo[idx];
    if (o.value == val)
      return idx;
  }
  return -1;
}

function ChangeDisableOption(sel, show, pos, val, txt) {
    var idx = najdiVCombu(sel, val);
    if (show && (idx == -1)) {
      sel.options[pos] = new Option (txt, val, true);
    }
    if ((! show) && (idx != -1)) {
      sel.remove(idx);
      sel.selectedIndex = 0;
    }
}
function showHide(val, tabName) {
  var tab = document.getElementById(tabName);
  if (tab != null) {
    if (val)  {
      tab.style.display = '';
    } else {
      tab.style.display = 'none';
    }
  }
  return true;
}

