// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function cart_toggleProcessing() {
	Element.toggle('checkout_Buttons');
	Element.toggle('cart_processing');
}

function admin_calcDiscount(regularPrice, discountField, targetField) {
	$(targetField).value = (Math.round((regularPrice - ((regularPrice * $(discountField).value / 100))) * 100) / 100).toFixed(2);
}

function cart_toggleFeedback() {
	Element.toggle('cart_feedbackSubmit');
	Element.toggle('cart_feedbackProcessing');
}

function cart_completeFeedback() {
	$('cart_feedbackField').readOnly = true;
	$('cart_feedbackProcessing').innerHTML = '<span style="color: green; font-size: 11px;">Thank you!<br /> Your feedback has been sent.</span>';
}

function cart_updateShippingEstimate(destination) {
	$('shippingEstValue').innerHTML = shippingEst[destination];
}