function DeleteFromCart(r) {
	if (confirm('Are you sure you want to delete this item from your cart: ' + r)) location.href = '/Cart?action=deleteFromCart&row=' + r;
}
function pop(URL) {
	winname	= 'pop';
	props	= '"location=0,status=0,scrollbars=0,width=700,height=450"';
	window.open(URL,winname,props);
}
function goToOrder() {
	var fobj		= document.getElementById('update_qty');
	var fNotes		= escape(fobj.Notes.value);
	var fCPO		= escape(fobj.ClientPurchaseOrder.value);
	var goURL		= '/Order.php?Notes=' + fNotes + '&ClientPurchaseOrder=' + fCPO;
	location.href	= goURL;
}

function printOrder(pobj,nobj) {
	location.href = '/Print-Order.php?po=' + pobj.value + '&notes=' + nobj.value;
}

function UpdateQuantity(r,q) {
	location.href = 'Cart.php?action=update_qty&row=' + r + '&qty=' + q;
}

function togglePrice() {
	var sp = readCookie('showprice');
	if (sp == 'no') {
		eraseCookie('showprice');
		createCookie('showprice','yes',0);
		$('div#prices').show('clip');
		$('p#toggleprice a').html('hide price');
	} else {
		eraseCookie('showprice');
		createCookie('showprice','no',0);
		$('div#prices').hide('clip');
		$('p#toggleprice a').html('show price');
	}
}
