function AtmStore_OptionModifyPrice(pOption){
	// alters a products display price based on selected option
	//console.log(pOption);
	
	var priceSpan = $('product-price');
	if(priceSpan && $('product-base-price')) {
	
		var prodBasePrice = Number($('product-base-price').get('value'));
		var finalPrice = prodBasePrice + Number(AtmStore_ProductOptions[pOption.id]);
		
		//console.log('priceSpan',priceSpan,'prodBasePrice',prodBasePrice,'finalPrice',finalPrice,'AtmStore_ProductOptions',AtmStore_ProductOptions);
		
		if(priceSpan) priceSpan.set('text', finalPrice.toFixed(2));

	}	
}

function AtmStore_UpdateOrderTotal(pElement){
	//submits form
	var deliveryOptionId = Number(pElement.getSelected().get('value'));
	//console.log(deliveryOptionId);
	
	var productPriceTotal = $('productPriceTotal').get('value');
	//console.log(productPriceTotal);
	
	var deliveryCost = 0;
	if($('deliveryOptionCost-' + deliveryOptionId )) deliveryCost = Number($('deliveryOptionCost-' + deliveryOptionId ).get('value'));
	
	var finalPrice = Number(deliveryCost) + Number(productPriceTotal);
	
	if($('orderTotalPriceStr')) $('orderTotalPriceStr').set('text', finalPrice.toFixed(2));
	//pForm.submit();
}









