Expand|Select|Wrap|Line Numbers
- <script>
- var shipName = "";
- var shipStreet = "";
- var shipStreet2 = "";
- var shipCity = "";
- var shipcountrySelect = 0;
- var shipProvState = 0;
- var shipPostalZip = "";
- var shipDayPhone1 = "";
- var shipDayPhone2 = "";
- var shipDayPhone3 = "";
- var shipCellPhone1 = "";
- var shipCellPhone2 = "";
- var shipCellPhone3 = "";
- var shipEmail = "";
- function FillFields(box) {
- if(document.bookform.box.checked) {
- document.bookform.shipName.value = document.bookform.billName.value;
- document.bookform.shipStreet.value = document.bookform.billStreet.value;
- document.bookform.shipStreet2.value = document.bookform.billStreet2.value;
- document.bookform.shipCity.value = document.bookform.billCity.value;
- document.bookform.shipCountrySelect.selectedIndex = document.bookform.billCountrySelect.selectedIndex;
- document.bookform.shipProvState.selectedIndex = document.bookform.billProvState.selectedIndex;
- document.bookform.shipPostalZip.value = document.bookform.billPostalZip.value;
- document.bookform.shipDayPhone1.value = document.bookform.billDayPhone1.value;
- document.bookform.shipDayPhone2.value = document.bookform.billDayPhone2.value;
- document.bookform.shipDayPhone3.value = document.bookform.billDayPhone3.value;
- document.bookform.shipCellPhone1.value = document.bookform.billCellPhone1.value;
- document.bookform.shipCellPhone2.value = document.bookform.billCellPhone2.value;
- document.bookform.shipCellPhone3.value = document.bookform.billCellPhone3.value;
- document.bookform.shipEmail.value = document.bookform.billEmail.value;
- }
- else {
- document.bookform.shipName.value = shipName;
- document.bookform.shipStreet.value = shipStreet;
- document.bookform.shipStreet2.value = shipStreet2;
- document.bookform.shipCity.value = shipCity;
- document.bookform.shipcountrySelect.value = shipcountrySelect.options[0].selected = true;
- document.bookform.shipProvState.value = shipProvState.options[0].selected = true;
- document.bookform.shipPostalZip.value = shipPostalZip;
- document.bookform.shipDayPhone1.value = shipDayPhone1;
- document.bookform.shipDayPhone2.value = shipDayPhone2;
- document.bookform.shipDayPhone3.value = shipDayPhone3;
- document.bookform.shipCellPhone1.value = shipCellPhone1;
- document.bookform.shipCellPhone2.value = shipCellPhone2;
- document.bookform.shipCellPhone3.value = shipCellPhone3;
- document.bookform.shipEmail.value = shipEmail;
- }
- }
- </script>