function ajax(post_data, fnc) {
    var h=false;
    post_data=post_data.replace("+", "%2B");
    if (window.XMLHttpRequest) {
      h=new XMLHttpRequest();
    } else if (window.ActiveXObject) {
      try {
        h=new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          h=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
          h=false;
        }
      }
    }

    if(!h) {
      return;
    } else {
      h.onreadystatechange = function() {
        if(h.readyState==4) {
          if(h.status == 200) {
           fnc(h);
          }
        }
      };
      h.open('POST', '../../src/moduly/kalendar/forajax.php', true);
      h.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
      h.send(post_data);
    }
  }
