lock_cal = false;
req_cal  = false;
path = '..';

 if(window.XMLHttpRequest)
  {
   try
    {
     req_cal = new XMLHttpRequest();
    }
   catch(e)
    {
     req_cal = false;
    }
   }
  else if(window.ActiveXObject)
   {
    try
     {
      req_cal = new ActiveXObject("Msxml2.XMLHTTP");
     }
    catch(e)
     {
      try
       {
        req_cal = new ActiveXObject("Microsoft.XMLHTTP");
       }
      catch(e)
       {
        req_cal = false;
       }
     }
   }


function pc_kalender(id,date,mode,Ziel_hoehe)
{
  if(typeof global_path == "undefined")
  {
    global_path = "..";
  }

  if(req_cal)
  {
    if(!lock_cal)
    {
      try
      {
      lock_cal = true;
     
      
      req_cal.open("GET", global_path + '/ajax/a_kalender.php?id=' + id + '&date=' + date + '&mode=' + mode + '&target_height=' + Ziel_hoehe, true);
      req_cal.onreadystatechange = new Function('f','get_http_response_cal()');
      req_cal.send(null);
      }
      catch(er)
      {
        req_cal = false;
      }
    }
  }
}