var ajax_state = "card";
if(ajax_state == "card") {
$("#regist-form").attr('action', '/order/pay_write_card');
$("#regist-form").submit();
}else if(ajax_state =="cash") {
$("#regist-form").attr('action', '/order/order_write_cash');
$("#regist-form").submit();
}
location.href="/main";