var shipfirst = "";

var shiplast = "";

var addressship = "";

var cityship = "";

var stateship = "";

var zipship = "";

var phoneship = "";



function InitSaveVariables(form) {

shipfirst = form.shipfirst.value;

shiplast = form.shiplast.value;

addressship = form.addressship.value;

cityship = form.cityship.value;

zipship = form.zipship.value;

phoneship = form.phoneship.value;

stateship = form.stateship.selectedIndex;



}



function ShipToBillPerson(form) {

if (form.copy.checked) {

InitSaveVariables(form);

form.shipfirst.value = form.billfirst.value;

form.shiplast.value = form.billlast.value;

form.addressship.value = form.addressbill.value;

form.cityship.value = form.citybill.value;

form.zipship.value = form.zipbill.value;

form.phoneship.value = form.phonebill.value;

form.stateship.selectedIndex = form.statebill.selectedIndex;

}

else {

form.shipfirst.value = shipfirst;

form.shiplast.value = shiplast;

form.addressship.value = addressship;

form.cityship.value = cityship;

form.zipship.value = zipship;    

form.phoneship.value = phoneship;      

form.stateship.selectedIndex = stateship;

   }

}
