var Sakitai = {

	//カード払い選択時のカード番号チェック
	cardChk: function(field) {
		e = document.getElementsByName("pay_method");
		e = e[e.length-1];

		if (e.checked) {
			Validator.check(field, 'num');
		}
	},

	//その他回数選択時の支払回数入力欄
	paychk: function(field) {
		e = document.getElementsByName("pay_number");
		e = e[e.length-1];

		if (e.checked) {
			Validator.check(field, 'num');
		}
	},

	//注文内容確認ボタン押下時
	submit: function(field) {
		if (!Validator.submit(field)) {
			return false;
		}
		return true;
	},

	//注文数変更時
	quantity: function(field, itemPrice) {

		qua = Number(field.value);
		pri = Number(itemPrice);

		if (!isNaN(qua) && !isNaN(pri)) {
			//合計金額を編集
			num = qua * pri;
			numStr = String(num);

			var cnt;
			for(cnt = 0; cnt < numStr.length/3; cnt++){
				numStr = numStr.replace(/^([+-]?\d+)(\d\d\d)/,"$1,$2");
			}

			totalPrice = "";
			e = "txt_";
			e += field.id;
			document.getElementById(e).innerHTML = numStr;
			return true;
		}
		return false;
	}

};
