  var payMethod = 1;
  var gebyr = 0;
  
  function changeamount(rowid,amount) {
    var target = 'index.php?page=cart&action=modify&rowid='+rowid+'&amount='+amount;
	window.open(target, '_top', '');
  }

  function checkPayment(nObj) {
//    alert('checkPayment value: '+nObj.value);
    payMethod = nObj.value;
    switch (payMethod) {
      case '1'  : gebyr = oppkravsgebyr; break;
      case '2'  : gebyr = fakturagebyr; break;
      default : gebyr = oppkravsgebyr;
    } 
//    alert('checkPayment value: '+nObj.value+'  Gebyr: '+gebyr);
	document.all.gebyr.innerHTML = Number(gebyr).toLocaleString(); 
	document.all.total.innerHTML = '<b>'+Number(Number(sum) + Number(gebyr)).toLocaleString()+'</b>'; 
  }

  function toCart() {
    window.open('?p=cart', '_top', '');
  }  

  function toCounter() {
	window.open('?p=counter', '_top', '');
  }

  function toOrder() {
    var target = '=p=order&forsendelse='+payMethod;
//    alert('payMethod: '+payMethod+'  target: '+target);
	window.open(target, '_top', '');
  }

  function modifyUser() {
	window.open('?p=customer&action=modify', '_top', '');
  }
  
  function logoutUser() {
	window.open('?p=counter&action=logout', '_top', '');
  }

