/* nieuwe basketfuncties */ 
function addToBasket(id, type, adtId)
{
  pic = document.getElementById('chart_' + id);
  function myReady(err)
  {
    if (err.match(/VOL/))
    {
      alert ('Uw mandje zit vol. U mag maximaal 8 stukken reserveren.');
    }
    else
    {
      pic.className = '_dis';
      pic.src = "http://files.archieven.nl/" + adtId + "/i/addtochart_dis.gif";
      alert ('Het stuk is toegevoegd aan uw mandje.');
    }
  }
  (pic.className != '_dis') ? Xpost('zk2.basket_add', 'p_id=' + id + '&p_type=' + type + '&p_adt_id=' + adtId, myReady, false) : alert ('Dit stuk zit al in uw boodschappenmandje.');
}

function delFromBasket(id)
{
  function myReady()
  {
    window.location.reload();
    window.opener.location.reload();
  }
 Xpost('zk2.basket_del', 'p_id=' + id, myReady, false);
}

function delAllFromBasket(adtId, t)
{
  function myReady()
  {
    window.location.reload();
  }
  if (confirm('Weet u zeker dat u uw mandje wilt leegmaken?'))
    Xpost('zk2.basket_del_all', 'p_adt_id=' + adtId + '&p_type=' + t, myReady, false);
}
function basketIsEmpty()
{
  alert ('Uw mandje is leeg. Dit venster wordt gesloten.');
  self.close();
}

