	function jss_custom_ajaxAddProcess(xmldoc,resultcode,resulttext) {
		var minicart;
		var pos;
		var minicartexpand;
		var message;
        var totals;
        var products;
        var qty;
        var order;
        var results;
        var minicartitems;
        var minicartitem;
        var minicartitemthumb;
        var thehtml;
        var code;
        var name;
        var price;
        var thumbnail;
        var elem;
        
        if (resultcode == 0) {
			minicart = document.getElementById('mini-cart');
			pos = jss_getElementPosition(minicart);
			minicartexpand = document.getElementById("mini-cart-expand");
			message = xmldoc.getElementsByTagName('message')[0].firstChild.data;
			minicartexpand.innerHTML = minicartexpand.innerHTML.replace("/message/",jss_replaceChars(message));
			pos[1] = pos[1] + minicart.offsetHeight;
			//minicartexpand.style.top = pos[1]+"px";
			//minicartexpand.style.left = pos[0]+"px";
			//minicartexpand.style.width = minicart.offsetWidth+"px";

			totals = xmldoc.getElementsByTagName("totals");
			products = totals[0].getElementsByTagName("products")[0].firstChild.data;
			qty = totals[0].getElementsByTagName("qty")[0].firstChild.data;
			order = totals[0].getElementsByTagName("order")[0].firstChild.data;
			changeContent("jss_ajaxCartTotalQty","",jss_replaceChars(qty));
			changeContent("jss_ajaxCartTotalOrder","",jss_replaceChars(order));
			changeContent("customOrderTotal","",jss_replaceChars(order));

			results = xmldoc.getElementsByTagName("items");
			results = results[0].getElementsByTagName("item");
			minicartitems = document.getElementById("mini-cart-items");
			minicartitems.innerHTML = "";

			minicartitem = document.getElementById("mini-cart-item");
			minicartitem.style.visibility = "hidden";
			minicartitem.style.display = "none";

			for (j = 0; j < results.length; j++) {
				minicartitem = document.getElementById("mini-cart-item").cloneNode(true);
				minicartitem.setAttribute('id','mini-cart-item'+j);
				minicartitem.style.visibility = "visible";
				minicartitem.style.display = "block";
				thehtml = minicartitem.innerHTML;
				code = results[j].getElementsByTagName("code")[0].firstChild.data;
				qty = results[j].getElementsByTagName("qty")[0].firstChild.data;
				name = results[j].getElementsByTagName("name")[0].firstChild.data;
				price = results[j].getElementsByTagName("price")[0].firstChild.data;
				if (results[j].getElementsByTagName("thumbnail")[0]) {
					thumbnail = results[j].getElementsByTagName("thumbnail")[0].firstChild.data;
                    //thehtml = thehtml.replace("/thumbnail/",'/'+jss_replaceChars(thumbnail));
                    thehtml = thehtml.replace("/thumbnail/",'<img src="'+jss_replaceChars(thumbnail)+'"/>');
				}
				thehtml = thehtml.replace("/code/",jss_replaceChars(code));
				thehtml = thehtml.replace("/qty/",jss_replaceChars(qty));
				thehtml = thehtml.replace("/name/",jss_replaceChars(name));
				thehtml = thehtml.replace("/price/",jss_replaceChars(price));
				
				minicartitem.innerHTML = thehtml;
                
				minicartitems.appendChild(minicartitem);
			}

			minicartitems.style.display = "inline";

			minicartexpand.style.visibility = "visible";

			setTimeout (jss_custom_hideCart, 3000);

			elem = document.getElementById('mini-cart-empty');
			elem.style.display = "none";
			elem.style.visibility = "hidden";
			elem = document.getElementById('mini-cart-notempty');
			elem.style.display = "inline";
			elem.style.visibility = "visible";
			return true;
		}
		return false;
	}

	function jss_custom_hideCart() {
        var minicartexpand;
        var minicartitems;
        
		minicartexpand = document.getElementById("mini-cart-expand");
		minicartitems = document.getElementById("mini-cart-items");
		minicartitems.style.display = "none";
		minicartexpand.style.visibility = "hidden";
	}
