
function UseCheck() {

	if (document.getElementById) {
	// this is the way the standards work
		document.getElementById('CreditCardInformation').style.display='none';
	} else if (document.all) {
	// this is the way old msie versions work
		document.all['CreditCardInformation'].style.display='none';
	} else if (document.layers) {
	// this is the way nn4 works
		document.layers['CreditCardInformation'].style.display='none';
	}
}

function GetSelectedItem() {
ind = document.trainingForm.state.selectedIndex;
chosen = document.trainingForm.state.options[ind].value;
return chosen;
} 


function FillBilling() {

  if(document.trainingForm.billingcopy.checked == true) {
    document.trainingForm.BillFirstName.value = document.trainingForm.first_name.value;
    document.trainingForm.BillLastName.value = document.trainingForm.last_name.value;
    document.trainingForm.BillAddressLine1.value = document.trainingForm.address.value;
    //document.enrollment.BillAddressLine2.value = document.enrollment.conf_per_address2.value;
    document.trainingForm.BillCity.value = document.trainingForm.city.value;
    document.trainingForm.BillState.value = GetSelectedItem();
    document.trainingForm.BillZip.value = document.trainingForm.zip.value;
	document.trainingForm.BillPhone.value = document.trainingForm.phone.value;
  }
}

// PAYMENT TYPE
function UseCreditCard() {
	if (document.getElementById) {
	// this is the way the standards work
		document.getElementById('CreditCardInformation').style.display='';
	} else if (document.all) {
	// this is the way old msie versions work
	document.all['CreditCardInformation'].style.display='';
	} else if (document.layers) {
	// this is the way nn4 works
	document.layers['CreditCardInformation'].style.display='';
	}
}


