function shippingEqualsBilling(checkbox){
	if($F(checkbox) == 1){
		$('order_shipping_street_one').value = $F('order_billing_street_one');
		$('order_shipping_street_two').value = $F('order_billing_street_two');
		$('order_shipping_city').value = $F('order_billing_city');
		$('order_shipping_state').value = $F('order_billing_state');
		$('order_shipping_zipcode').value = $F('order_billing_zipcode');
	} else {
		$('order_shipping_street_one').value = '';
		$('order_shipping_street_two').value = '';
		$('order_shipping_city').value = '';
		$('order_shipping_state').value = '';
		$('order_shipping_zipcode').value = '';	
	}
}

function validate(form){
	errors = new Array("There were errors while submitting your information:\n");
	Form.getElements($(form)).each(function(element){
			if((element.type == "text" || element.type == "textarea") && element.value == ""){
				errors.push("- " + element.name.replace(/_/g," ").capitalize() + " can't be left blank.\n");
			}
		}
	);
	if(errors.length > 1){
		var errors = errors.join("\n");
		alert(errors);
		return false;
	} else {
		return;		
	}
}