function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&confirmed=1';
    }

    return is_confirmed;
}

function pytanko(url, pyt)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(pyt);
    if (is_confirmed) {
        url.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}

function update_lb(checkbox_node)
{
  while(document.getElementById('zaw').item(0))
    document.getElementById('zaw').remove(0);

  var zawody='';
  for(var i=0; i<num_zawody; i++)
  {
    var cb=document.getElementById('cb_'+i);
    var lab=cb.parentNode;
    if(cb.checked)
    {
      var oOption = document.createElement("OPTION");
      var re=RegExp("^lcb_([0-9]+)$");
      var m=re.exec(lab.id);
      var psid=m[1];
      oOption.text=lab.title;
      oOption.value=psid;
      try{
        document.getElementById('zaw').add(oOption, null);
      }catch(ex)
      {
        document.getElementById('zaw').add(oOption);
      }
      zawody=zawody + psid + ',';
    }
  }
  document.getElementById('zawody').value=zawody;
}

