function validateAddresses(form){
	if (form.bstate.value != "" && form.bstate.value != "Outside" && form.obstate.value != ""){
		alert("Billing State must be set to Outside US/Canada or empty to enter a value in the Other field.");
		form.bstate.value="Outside";
		return false;
	}
	
	if (form.bcountry.value != "" && form.bcountry.value != "OO" && form.obcountry.value != ""){
		alert("Billing Country must be set to empty to enter a value in the Other field.");
		form.bcountry.value="OO";
		return false;
	}
	
	if (form.state.value != "" && form.state.value != "Outside" && form.ostate.value != ""){
		alert("Shipping State must be set to Outside US/Canada or empty to enter a value in the Other field.");
		form.state.value="Outside";
		return false;
	}
	
	if (form.country.value != "" && form.country.value != "OO" && form.ocountry.value != ""){
		alert("Shipping Country must be set to empty to enter a value in the Other field.");
		form.country.value="OO";
		return false;
	}
	return true;
}

function doSubmit(form){
	if (validateAddresses(form)){
		form.submit();
	}
}
