 
				function createXMLHttpRequest(){
					if(window.ActiveXObject){
						var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
					}
					else if(window.XMLHttpRequest){
						var xmlHttp = new XMLHttpRequest();
					}
					return xmlHttp;
				}

				function add(id,amount,price,name,eenheid){
					var url="/javascript/ajax/add_item.php";
					url=url+"?_+_"+id;
					url=url+"_+_"+amount;
					url=url+"_+_"+price;
					url=url+"_+_"+name;
					url=url+"_+_"+eenheid;

					var xmlHttp = createXMLHttpRequest();
					xmlHttp.onreadystatechange = function(){vervolgfunctie(xmlHttp);}
					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					xmlHttp.send(null);
					
				}
				
				function change_item(id, amount, price, name, eenheid){
					if(amount == ''){
					remove(id);	
					}
					else{
					add(id,amount,price,name,eenheid);	
					}
				}
						
				function remove(id){
					var url="/javascript/ajax/remove_item.php";
					url=url+"?_+_"+id;

					var xmlHttp = createXMLHttpRequest();
					xmlHttp.onreadystatechange = function(){vervolgfunctie(xmlHttp);}
					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					xmlHttp.send(null);
				}
				
				function dump(){
					var url="/javascript/ajax/dump.php";
					
					var xmlHttp = createXMLHttpRequest();
					xmlHttp.onreadystatechange = function(){vervolgfunctie(xmlHttp);}
					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					xmlHttp.send(null);
				}
				
				function opacity(id, opacStart, opacEnd, millisec) { 
					//speed for each frame 
					var speed = Math.round(millisec / 100); 
					var timer = 0; 
				
					//determine the direction for the blending, if start and end are the same nothing happens 
					if(opacStart > opacEnd) { 
						for(i = opacStart; i >= opacEnd; i--) { 
							setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
							timer++; 
						} 
					} else if(opacStart < opacEnd) { 
						for(i = opacStart; i <= opacEnd; i++) 
							{ 
							setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
							timer++; 
						} 
					} 
				} 
				
				//change the opacity for different browsers 
				function changeOpac(opacity, id) { 
					var object = document.getElementById(id).style; 
					object.opacity = (opacity / 100); 
					object.MozOpacity = (opacity / 100); 
					object.KhtmlOpacity = (opacity / 100); 
					object.filter = "alpha(opacity=" + opacity + ")"; 
				}

				function vervolgfunctie(xmlHttp){
					if(xmlHttp.readyState == 4){
						if(xmlHttp.status == 200){
							xmlDoc=xmlHttp.responseXML;
							
							//verander het totaal wanneer de div met het id cart_total bestaat
							var cart_total = xmlDoc.getElementsByTagName("total")[0].childNodes[0].nodeValue;
							var cart_total_container = document.getElementById("cart_total");
							if(cart_total_container){
								document.getElementById("cart_total").innerHTML= cart_total;
							}
							
							//laat de melding zien
							var cart_mess = xmlDoc.getElementsByTagName("text")[0].childNodes[0].nodeValue;
							if(cart_mess != 'ongewijzigd'){
								document.getElementById("cart_mess").innerHTML= cart_mess;
								opacity('cart_mess', 0, 50, 2000);
								setTimeout("opacity('cart_mess', 50, 0, 2000);",5000);
							}
							
							// vernieuw het winkelwagenvoerzicht als de div cart bestaat
							var cart_container = document.getElementById("cart");
							//alert('hoi');
							if(cart_container) {
								//alert('test');
								refresh_cart();	
							}
								
						}
					}
				}
				
				function refresh_cart() {
					var url="/javascript/ajax/refresh_cart.php";

					var xmlHttp = createXMLHttpRequest();
					xmlHttp.onreadystatechange = function(){show_cart(xmlHttp);}
					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					xmlHttp.send(null);
				}
				
				function show_cart(xmlHttp){
					if(xmlHttp.readyState == 4){
						if(xmlHttp.status == 200){
							var text = xmlHttp.responseTEXT;
							document.getElementById("cart").innerHTML = text;
						}
					}
				}
