function getproduct(){
	var id = $("#quickmenu").val();
	window.location = webpath + "/?p=cart&pid="+id;
}
function delitem(id){
	$.ajax( {
		type : "POST",
		url : webpath + "/?",
		data : "p=delitem&id="+id,
		beforeSend : function(httpreq) {
			httpreq.setRequestHeader("Content-Transfer-Encoding", "UTF-8");
		},
		success : function(re){
			window.location.reload();
		}
	});
}

function add2cart(id,count,instant){
	$.ajax( {
		type : "POST",
		url : webpath + "/?",
		data : "p=add2cart&id="+id+"&count="+count+"&instant="+instant,
		beforeSend : function(httpreq) {
			httpreq.setRequestHeader("Content-Transfer-Encoding", "UTF-8");
		},
		success : function(re){
			if(instant){
				window.location = webpath + "/?p=showcart";
			}
			else{
				window.location.reload();
			}
		}
	});
	
	
}

function emptycart(){
	$.ajax( {
		type : "POST",
		url : webpath + "/?",
		data : "p=emptycart",
		beforeSend : function(httpreq) {
			httpreq.setRequestHeader("Content-Transfer-Encoding", "UTF-8");
		},
		success : function(re){
			window.location.reload();
		}
	});
}
