// validation check for creditcard pay
// none empty
// expiry in MMYY form

var ready = true;

function submit_check() {
	var result = true
	var msg = "Error:\n"
	
	if (document.payBill.c_id.value == "") {
		msg += "Missing Customer ID\n"
		result = false
	}
	if (document.payBill.pc.value == "") {
		msg += "Missing Postal Code\n"
		result = false
	}
	if (document.payBill.c_amount.value == "") {
		msg += "Missing Amount\n"
		result = false
		}


	if (! result) {
		alert(msg)
	} else if (ready) {
		if (confirm(document.payBill.c_id.value + "\n" + document.payBill.c_cc.value + "\n" + "$ " + document.payBill.c_amount.value + "\n\n" + "Are you sure?")) {
			ready = false
			return true
		}
	}	else {
		alert("You have clicked the submit button already.")
	}
	return false
}