
function togglePaymentMethod(obj) {
	if(obj.value == 'CC') {
		enableCreditCardWidgets();
		disableAchWidgets();
	}
	if(obj.value == 'ACH') {
		disableCreditCardWidgets();
		enableAchWidgets();
	}
	if(obj.value == '') {
		enableCreditCardWidgets();
		enableAchWidgets();
	}
}

function enableCreditCardWidgets() {
	$('BillingInfoCctype').disabled = false;
	$('BillingInfoCcnumber').disabled = false;
	$('BillingInfoCcmonth').disabled = false;
	$('BillingInfoCcyear').disabled = false;
}

function disableCreditCardWidgets() {
	$('BillingInfoCctype').disabled = true;
	$('BillingInfoCcnumber').disabled = true;
	$('BillingInfoCcmonth').disabled = true;
	$('BillingInfoCcyear').disabled = true;
}

function enableAchWidgets() {
	$('BillingInfoAchname').disabled = false;
	$('BillingInfoAchrouting').disabled = false;
	$('BillingInfoAchnumber').disabled = false;
	$('BillingInfoAchholder').disabled = false;
	$('BillingInfoAchtype').disabled = false;
}

function disableAchWidgets() {
	$('BillingInfoAchname').disabled = true;
	$('BillingInfoAchrouting').disabled = true;
	$('BillingInfoAchnumber').disabled = true;
	$('BillingInfoAchholder').disabled = true;
	$('BillingInfoAchtype').disabled = true;
}

function incrementMultiFile() {
	multiFileCount++;
	$('LookupAttachments').value = multiFileCount;
	newInput = document.createElement('input');
	newInput.setAttribute('type', 'file');
	newInput.setAttribute('name', 'lookupAttachment' + multiFileCount);
	newInput.setAttribute('id', 'lookupAttachment' + multiFileCount);
	$('multiFile').appendChild(newInput);
	newBreak = document.createElement('br');
	$('multiFile').appendChild(newBreak);
	
}