<!--

function boxClicked(box) {
	
if(box.checked)
  { 
  	box.form.billing_fname.value = box.form.ship_fname.value;
  	box.form.billing_lname.value = box.form.ship_lname.value;
  	box.form.billing_add1.value = box.form.ship_add1.value;
  	box.form.billing_add2.value = box.form.ship_add2.value;
  	box.form.billing_city.value = box.form.ship_city.value;
  	box.form.billing_state.value = box.form.ship_state.value;
  	box.form.billing_zip.value = box.form.ship_zip.value;
  	box.form.billing_phone.value = box.form.ship_phone.value;
  	box.form.billing_email.value = box.form.ship_email.value;
  	box.form.billing_fax.value = box.form.ship_fax.value;
  }
  else
  {
 	box.form.billing_fname.value = "";
  	box.form.billing_lname.value = "";
  	box.form.billing_add1.value = "";
  	box.form.billing_add2.value = "";
  	box.form.billing_city.value = "";
  	box.form.billing_state.value = "";
  	box.form.billing_zip.value = "";
  	box.form.billing_phone.value = "";
  	box.form.billing_email.value = "";
  	box.form.billing_fax.value = "";	
  }
}

/*
function validForm(theForm){					
			//validate shipping inputs			
	alert('boo');
			if(Trim(theForm.ship_fname.value).length == 0){
				alert("Please enter your FIRST NAME\nIn the Shipping Address form.");
				theForm.ship_fname.focus();
				return false;
			}
			if(Trim(theForm.ship_lname.value).length == 0){
				alert("Please enter your LAST NAME\nIn the Shipping Address form.");
				theForm.ship_lname.focus();
				return false;
			}
			if(Trim(theForm.ship_add1.value).length == 0){
				alert("Please enter your STREET ADDRESS\nIn the Shipping Address form.");
				theForm.ship_add1.focus();
				return false;
			}
			if(Trim(theForm.ship_city.value).length == 0){
				alert("Please enter your CITY\nIn the Shipping Address form.");
				theForm.ship_city.focus();
				return false;
			}
			if(Trim(theForm.ship_state.value).length == 0){
				alert("Please select your STATE/PROVINCE\nIn the Shipping Address form.");
				theForm.ship_state.focus();
				return false;
			}
			if(Trim(theForm.ship_state.value) == 'Outside US/Canada'){
				alert("Sorry, but we can only ship to addresses within the United States and Canada at this time.");
				theForm.ship_state.focus();
				return false;
			}
			if(Trim(theForm.ship_zip.value).length == 0){
				alert("Please enter your ZIP/POSTAL CODE\nIn the Shipping Address form.");
				theForm.ship_zip.focus();
				return false;
			}
			if(Trim(theForm.ship_cntry.value).length == 0){
				alert("Please select your COUNTRY\nIn the Shipping Address form.");
				theForm.ship_cntry.focus();
				return false;
			}
			if(Trim(theForm.ship_phone.value).length <= 10){
				alert("Please enter your HOME PHONE NUMBER\nIn the Shipping Address form.");
				theForm.ship_phone.focus();
				return false;
			}
			if(Trim(theForm.ship_email.value).length == 0){
				alert("Please enter your EMAIL ADDRESS\nIn the Shipping Address form.");
				theForm.ship_email.focus();
				return false;
			}
			if(!validateEmail(theForm.ship_email.value)){
				alert('Your EMAIL ADDRESS does not appear to be valid.\nPlease correct any errors and submit again.');
				theForm.ship_email.focus();
				return false;
			}
			
			//validate BILLING inputs
			if(Trim(theForm.billing_fname.value).length == 0){
				alert("Please enter your FIRST NAME\nIn the Billing Information form.");
				theForm.billing_fname.focus();
				return false;
			}
			if(Trim(theForm.billing_lname.value).length == 0){
				alert("Please enter your LAST NAME\nIn the Billing Information form.");
				theForm.billing_lname.focus();
				return false;
			}
			if(Trim(theForm.billing_add1.value).length == 0){
				alert("Please enter your STREET ADDRESS\nIn the Billing Information form.");
				theForm.billing_add1.focus();
				return false;
			}
			if(Trim(theForm.billing_city.value).length == 0){
				alert("Please enter your CITY\nIn the Billing Address form.");
				theForm.billing_city.focus();

				return false;
			}
			if(Trim(theForm.billing_state.value).length == 0){
				alert("Please select your STATE/PROVINCE\nIn the Billing Address form.");
				theForm.billing_state.focus();
				return false;
			}
			if(Trim(theForm.billing_state.value) == 'Outside US/Canada'){
				alert("Sorry, but we can only accept payment from accounts based in the United States and Canada at this time.");
				theForm.billing_state.focus();
				return false;
			}
			if(Trim(theForm.billing_zip.value).length == 0){
				alert("Please enter your ZIP/POSTAL CODE\nIn the Billing Information form.");
				theForm.billing_zip.focus();
				return false;
			}
			
			if(Trim(theForm.billing_phone.value).length == 0){
				alert("Please enter your BILLING PHONE NUMBER\nIn the Billing Address form.");
				theForm.billing_phone.focus();
				return false;
			}
			if(Trim(theForm.billing_email.value).length == 0){
				alert("Please enter your BILLING EMAIL ADDRESS\nIn the Billing Address form.");
				theForm.ship_email.focus();
				return false;
			}
			if(!validateEmail(theForm.billing_email.value)){
				alert('Your EMAIL ADDRESS does not appear to be valid.\nPlease correct any errors and submit again.');
				theForm.ship_email.focus();
				return false;
			}
			
			if(Trim(theForm.billing_ccnum.value).length == 0){
				alert("Please enter your CREDIT CARD NUMBER\nIn the Billing Information form.");
				theForm.billing_ccnum.focus();
				return false;
			}
			if(!luhnCheckCC( Trim(theForm.billing_ccnum.value) ) ){
				alert("The CREDIT CARD NUMBER you've entered is incorrect.\nPlease check your entry for errors and try again.");
				theForm.billing_ccnum.focus();
				return false;
			}
			if(!validateCCExpDate(theForm.billing_expmo.value, theForm.billing_expyr.value)){
				alert('Your credit card appears to be expired.');
				theForm.billing_expmo.focus();
				return false;
			}
			if(Trim(theForm.billing_cvv.value).length == 0){
				alert("Please enter your CREDIT CARD's CVV Code\nIn the Billing Information form.\n\nIf your CVV code is missing or illegible, please call\ncustomer service @ 1-800-614-1392 to place your order.");
				theForm.billing_ccnum.focus();
				return false;
			}
	
			<? if($oCart->cartHasAutoShip()){?>
			alert('cart has autoship');
			if(!theForm.oap.checked){
				alert("In order to proceed with checkout, you must indicate that you understand and agree to the terms of the Order Assurance Program.");
				theForm.oap.focus();
				return false;
			}
			
			<? } ?>
								
			//finally ... if all is well ... submit the form and move on...			
			return true;
		}
		
*/

function submitform()
{
  document.order_form.submit();
  //enter code to disable the Place your order button here
  document.getElementById('bs_bn').disabled = true;
  document.getElementById('cart_bn').disabled = true;
}


		function doSubmit(theForm){
			//set the buttons to prevent duplicate submits	
			document.getElementById('bs_bn').disabled = true;
			document.getElementById('cart_bn').disabled = true;
			document.getElementById('submit_bn').disabled = true;
			document.getElementById('submit_bn').value = 'Processing ... please wait';	
			
		}
//-->