entriestmp = new Array;
  
function checkCart( cartForm, id )
{
  entries = cartForm.cart.value.split(',');
  for(n=0; n<entries.length; n++)
  	entriestmp[entries[n]] = true;
  
  checkbox = eval('cartForm.prospekt_'+id);
  if(checkbox.checked)
  	entriestmp[id] = true;
  else
  	entriestmp[id] = false;
  
  cartForm.cart.value = "";
  	
  for(i=0;i<entriestmp.length; i++)
    if(entriestmp[i])
      cartForm.cart.value += i+',';
  cartForm.cart.value = cartForm.cart.value.substring(0, cartForm.cart.value.length-1);  
}

function cartSubmit( cartForm, meldung )
{
  if(cartForm.cart.value)
  {
  	cartPopup = window.open('index.php?scriptlet=CMS/Products/CartProcessor&dialogMode=popup&action=update&cartString='+cartForm.cart.value, 'cartPopup', 'scrollbars=yes,resizable=yes,width=600,height=260');
  	cartPopup.self.focus();
  }
  else
  {
  	alert(meldung);
  }
}

function cartClear()
{
  cartPopup = window.open('index.php?scriptlet=CMS/Products/CartProcessor&dialogMode=popup&action=clear', 'cartPopup', 'width=400,height=160');
  cartPopup.self.focus();
}

function cartDeleteItem( lang,  itemId )
{
  cartPopup = window.open('index.php?scriptlet=CMS/Products/CartProcessor&dialogMode=popup&action=del&lang='+lang+'&cartString='+itemId, 'cartPopup', 'width=400,height=160');
  cartPopup.self.focus();
}