
var changed=false;
var BillingFirst = "";
var BillingLast = "";
var BillingCompany = "";
var BillingAddress = "";
var BillingAddress2 = "";
var Billinggeolocal = "";
var BillingCity = "";
var BillingState = "";
var BillingZip = "";
var BillingPhone = "";
var BillingFax = "";
var BillingEmail = "";

function InitSaveVariables(theForm) {
	BillingFirst = theForm.BillingFirst.value;
	BillingLast = theForm.BillingLast.value;
	BillingCompany = theForm.BillingCompany.value;
	BillingAddress = theForm.BillingAddress.value;
	BillingAddress2 = theForm.BillingAddress2.value;
	BillingCity = theForm.BillingCity.value;
	BillingState = theForm.BillingState.value;
	BillingZip = theForm.BillingZip.value;
	BillingPhone = theForm.BillingPhone.value;
	BillingFax = theForm.BillingFax.value;
	BillingEmail = theForm.BillingEmail.value;
}

function ShipToBillPerson(theForm) {
	if (theForm.Same_As_Contact.checked) {
		InitSaveVariables(theForm);
		theForm.BillingFirst.value = theForm.ContactFirst.value;
		theForm.BillingLast.value = theForm.ContactLast.value;
		theForm.BillingCompany.value = theForm.CompanyName.value;
		theForm.BillingAddress.value = theForm.ContactAddress.value;
		theForm.BillingAddress2.value = theForm.ContactAddress2.value;
		theForm.BillingCity.value = theForm.ContactCity.value;
		theForm.BillingState.value = theForm.ContactState.value;
		theForm.BillingZip.value = theForm.ContactZip.value;
		theForm.BillingPhone.value = theForm.ContactPhone.value;
		theForm.BillingFax.value = theForm.ContactFax.value;
		theForm.BillingEmail.value = theForm.ContactEmail.value;
	}else{
		theForm.BillingFirst.value = BillingFirst;
		theForm.BillingLast.value = BillingLast;
		theForm.BillingCompany.value = BillingCompany;
		theForm.BillingAddress.value = BillingAddress;
		theForm.BillingAddress2.value = BillingAddress2;
		theForm.BillingCity.value = BillingCity;
		theForm.BillingState.value = BillingState;
		theForm.BillingZip.value = BillingZip; 
		theForm.BillingPhone.value = BillingPhone;  
		theForm.BillingFax.value = BillingFax;  
		theForm.BillingEmail.value = BillingEmail;        
	}
}



