function fill_form() {
	if( document.registration.billing_same_as_mailing.checked ) {
		document.registration.billing_churchname.value = document.registration.churchname.value;
		document.registration.billing_firstname.value = document.registration.firstname.value;
		document.registration.billing_lastname.value = document.registration.lastname.value;
		document.registration.billing_address_one.value = document.registration.user_address_one.value;
		document.registration.billing_address_two.value = document.registration.user_address_two.value;
		document.registration.billing_city.value = document.registration.user_city.value;
		document.registration.billing_state.value = document.registration.user_state.value;
		document.registration.billing_zip.value = document.registration.user_zip.value;
	} else {
		document.registration.billing_churchname.value = '';
		document.registration.billing_firstname.value = '';
		document.registration.billing_lastname.value = '';
		document.registration.billing_address_one.value = '';
		document.registration.billing_address_two.value = '';
		document.registration.billing_city.value = '';
		document.registration.billing_state.value = '';
		document.registration.billing_zip.value = '';
	}
}

function payLater(){
	document.registration.pay_cc.checked = false;
	document.registration.card_type.disabled = true;
	document.registration.card_number.disabled = true;
	document.registration.card_cvv.disabled = true;
	document.registration.card_exp_month.disabled = true;
	document.registration.card_exp_year.disabled = true;
	
	document.registration.card_number.value = '';
	document.registration.card_cvv.value = '';
}
function payCC(){
	document.registration.pay_later.checked = false;
	document.registration.card_type.disabled = false;
	document.registration.card_number.disabled = false;
	document.registration.card_cvv.disabled = false;
	document.registration.card_exp_month.disabled = false;
	document.registration.card_exp_year.disabled = false;
}

function orderInfo() {
    var subprice = 0;
	var price = 0;
	var order = '';
    for (var i = 0; i < registration.elements.length; i++ ) {
		if (registration.elements[i].checked == true) {
			subprice = subprice + parseFloat(registration.elements[i].value);
			price = subprice.toFixed(2);
			order += registration.elements[i].name + ', ';
		}
	}
    document.getElementById("order").innerHTML = order;
	document.getElementById("price").innerHTML = price;
	document.registration.order.value = order;
	document.registration.price.value = price;
} 

/* OLD SUBSCRIPTION PRICING

function price() {
	if (registration.three_to_six.checked == false && registration.seven_to_twelve.checked == false){
		yearlyPrice.innerText = '$0.00';
		quaterlyPrice.innerText = '$0.00';
	}
	if (registration.three_to_six.checked == true && registration.seven_to_twelve.checked == false){
		yearlyPrice.innerText = '$79.80 w/ FREE shipping';
		quaterlyPrice.innerText = '$19.95 + $6.95 shipping';
	}
	if (registration.three_to_six.checked == false && registration.seven_to_twelve.checked == true){
		yearlyPrice.innerText = '$79.80 w/ FREE shipping';
		quaterlyPrice.innerText = '$19.95 + $6.95 shipping';
	}
	if (registration.three_to_six.checked == true && registration.seven_to_twelve.checked == true){
		yearlyPrice.innerText = '$119.80 w/ FREE shipping';
		quaterlyPrice.innerText = '$29.95 + $6.95 shipping';
	}
}
*/ 