	function handleHttpResponse() {
	 if (http.readyState == 4) {
		if (http.responseText.indexOf('invalid') == -1) {
		  // Split the comma delimited response into an array
		  alert('product has been added to cart')
		}
	  }
	}
	function addToCart(prod_id) {
		  
	
		  http.open("GET", "add_cart.php?id=" + prod_id, true);
	
		  http.onreadystatechange = handleHttpResponse;
	
		  http.send(null);
	}
   var http = getHTTPObject(); // We create the HTTP Object
