PageSourceSearch

https://www.amanofd.jp/file/calpis.js?201805

js amanofd.jp collected 2026-09-26 00:11:17 UTC 40,116 bytes, 1,200 lines download raw bytes

1//二度押し防止フラグ
2var submitFlg = 'false';
3
4/*
5 * 二度押し防止チェック関数。
6 */
7function checkSubmitFlg() {
8	window.onbeforeunload = null;
9	if (submitFlg == 'true') {
10		alert('すでに送信されています。送信処理が完了するまでしばらくお待ちください。');
11		return false;
12	}
13	return true;
14}
15
16/*
17 * 二度押し防止チェック関数を呼び出したのち、 パスを指定してサブミットします。
18 */
19function doSubmitForm2(obj) {
20	window.onbeforeunload = null;
21	if (checkSubmitFlg() == true) {
22		// サブミットフラグをON
23		submitFlg = 'true';
24
25		window.onbeforeunload = null;
26		obj.submit();
27		return true;
28	}
29	return false;
30}
31
32function doSubmitForm(obj) {
33	window.onbeforeunload = null;
34	obj.submit();
35}
36
37var select_array;
38function doSubmit(product_id, action) {
39	var value = document.getElementById("select" + product_id).value;
40	var r_value = document.getElementsByName("check_every" + product_id);
41	for (i = 0; i < r_value.length; i++) {
42		if (r_value[i].checked) {
43			document.shopcartform.pay_radio.value = r_value[i].value;
44			if (r_value[i].value == '1') {
45				document.shopcartform.select_1.value = document
46						.getElementById("select_1" + product_id).value;
47			} else if (r_value[i].value == '2') {
48				document.shopcartform.select_1.value = document
49						.getElementById("select_2" + product_id).value;
50				document.shopcartform.select_2.value = document
51						.getElementById("select_3" + product_id).value;
52			} else if (r_value[i].value == '4') {
53				document.shopcartform.select_1.value = document
54						.getElementById("select_4" + product_id).value;
55			}
56		}
57	}
58	document.shopcartform.p_id.value = product_id;
59	if (action.length > 0) {
60		document.shopcartform.p_action.value = action;
61	}
62	document.shopcartform.p_num.value = value;
63	window.onbeforeunload = null;
64	document.shopcartform.submit();
65}
66
67function doSubmitA(product_code) {
68	var pInterval = "";
69	if (document.getElementById("select2_" + product_code) != null) {
70		pInterval = "&p_interval=" + document.getElementById("select2_" + product_code).value;
71	}
72
73	var linkUrl = "/shopcart/?p_static=1&p_item=" + product_code + "&p_num="
74			+ document.getElementById("select" + product_code).value
75			+ pInterval;
76	location.href = linkUrl;
77}
78
79function doSubmitPl(product_code) {
80	var linkUrl = "/shopcart/?p_static=1&p_item=" + product_code + "&p_num=1";
81	location.href = linkUrl;
82}
83
84function doSubmitAForGift(product_code,product_code_gift) {
85	var pInterval = "";
86	var p_code=product_code;
87	if (document.getElementById("select2_" + product_code) != null) {
88		pInterval = "&p_interval=" + document.getElementById("select2_" + product_code).value;
89	}
90	
91	if(document.getElementById("giftBag_" + product_code).value == 1) {
92		p_code = product_code_gift;
93	}
94
95	var linkUrl = "/shopcart/?p_static=1&p_item=" + p_code + "&p_num="
96			+ document.getElementById("select" + product_code).value
97			+ pInterval;
98	location.href = linkUrl;
99}
100
101function doSubmit2(product_id, action) {
102	var value = document.getElementById("select2_" + product_id).value;
103	var r_value = document.getElementsByName("check_every" + product_id);
104	for (i = 0; i < r_value.length; i++) {
105		if (r_value[i].checked) {
106			document.shopcartform.pay_radio.value = r_value[i].value;
107			if (r_value[i].value == '1') {
108				document.shopcartform.select_1.value = document
109						.getElementById("select_1" + product_id).value;
110			} else if (r_value[i].value == '2') {
111				document.shopcartform.select_1.value = document
112						.getElementById("select_2" + product_id).value;
113				document.shopcartform.select_2.value = document
114						.getElementById("select_3" + product_id).value;
115			} else if (r_value[i].value == '4') {
116				document.shopcartform.select_1.value = document
117						.getElementById("select_4" + product_id).value;
118			}
119		}
120	}
121	document.shopcartform.p_id.value = product_id;
122	if (action.length > 0) {
123		document.shopcartform.p_action.value = action;
124	}
125	document.shopcartform.p_num.value = value;
126	window.onbeforeunload = null;
127	document.shopcartform.submit();
128}
129
130function doSubmit3(product_id, action) {
131	var value = document.getElementById("select" + product_id).value;
132	document.shopcartform.pay_radio.value = document
133			.getElementsByName("check_every" + product_id)[0].value;
134	document.shopcartform.select_1.value = document.getElementById("select_4"
135			+ product_id).value;
136	document.shopcartform.p_id.value = product_id;
137	if (action.length > 0) {
138		document.shopcartform.p_action.value = action;
139	}
140	document.shopcartform.p_num.value = value;
141	window.onbeforeunload = null;
142	document.shopcartform.submit();
143}
144
145function addup() {
146	document.shopcartform.p_action.value = 'addup';
147	window.onbeforeunload = null;
148	document.shopcartform.submit();
149}
150
151function flex(targetid, slideFlg, anqueteFlg) {
152	if (slideFlg == undefined) {
153		slideFlg = false;
154	}
155
156	if (anqueteFlg == undefined) {
157		anqueteFlg = false;
158	}
159
160	target = document.getElementById(targetid);
161	if (hidden_flag == true) {
162		if (slideFlg == true) {
163			$('#' + targetid).slideUp();
164		} else {
165			target.style.display = "none";
166		}
167	} else if (hidden_flag == false) {
168		if (anqueteFlg != true) {
169			// アンケートのクリック以外の場合は値を設定する
170			set_Value();
171		}
172		if (slideFlg == true) {
173			$('#' + targetid).slideDown();
174		} else {
175			target.style.display = "block";
176		}
177	}
178}
179
180function openNew(targetid) {
181	hidden_flag = false;
182	flex(targetid);
183	if (document.getElementById('sel_info_0').checked == true) {
184		set_Value('0'); // 記録情報から
185	} else {
186		set_Value(); // 新規入力
187	}
188	// 別の送付先を選択する場合は、代引きが不可とする。
189	set_Daibiki(1);
190}
191
192function openRow(targetid) {
193	document.getElementById(targetid).style.display = "";
194}
195
196// 定期変更でopenNewと同じ動作をする関数
197function openNew_teiki(targetid) {
198	hidden_flag = false;
199	flex(targetid, true);
200	if (document.getElementById('sel_info_0').checked == true) {
201		set_Value('0'); // 記録情報から
202	} else {
203		set_Value(); // 新規入力
204	}
205	// 別の送付先を選択する場合は、代引きが不可とする。
206	document.getElementById("payment3").disabled = true;
207}
208
209function closeNew(targetid) {
210	hidden_flag = true;
211	flex(targetid);
212	// 自分自身を選択する場合は、代引きが可とする。
213	set_Daibiki(0);
214}
215
216// 定期変更でcloseNewと同じ動作をする関数
217function closeNew_teiki(targetid) {
218	hidden_flag = true;
219	flex(targetid, true);
220	// 自分自身を選択する場合は、代引きが可とする。
221	set_Daibiki(0);
222	document.getElementById("payment3").disabled = false;
223}
224
225function closeRow(targetid) {
226	document.getElementById(targetid).style.display = "none";
227}
228
229// お届け日を指定しないを選択した際に、日付と時間帯をクリアする
230function clearDeliveryDateAndTime() {
231	document.getElementsByName('delivery_date')[0][0].selected = true;
232	document.getElementsByName('delivery_time_zone')[0][0].selected = true;
233}
234
235function firstViewDeliveryDateAndTime() {
236	var delivery_select = document.getElementsByName('delivery_select');
237	if (delivery_select[1].checked == true) {
238		// 戻ってきた際に、お届け日を指定するを選択していたら日付と時間帯を表示する
239		openRow('delivery_time_zone_row');
240		openRow('delivery_date_select');
241	}
242}
243
244// お届け日を指定するを選択した際に初期値を当日+5日に設定する
245function setDeliveryDate() {
246	document.getElementsByName('delivery_date')[0][1].selected = true;
247}
248
249function set_Value(type) {
250	if (type == '0') {
251		// 記録情報から
252		document.getElementById('other_kanjiname_sei').value = other_kanjiname_sei_default;
253		document.getElementById('other_kanjiname_mei').value = other_kanjiname_mei_default;
254		document.getElementById('other_kananame_sei').value = other_kananame_sei_default;
255		document.getElementById('other_kananame_mei').value = other_kananame_mei_default;
256		document.getElementById('other_postal_3digit').value = other_postal_3digit_default;
257		document.getElementById('other_postal_4digit').value = other_postal_4digit_default;
258		document.getElementById('other_address_town').value = other_address_town_default;
259		document.getElementById('other_address_code').value = other_address_code_default;
260		document.getElementById('other_address_build').value = other_address_build_default;
261		document.getElementById('other_tel_home').value = other_tel_home_default;
262
263		aryCity = [ null, '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県',
264				'茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県',
265				'石川県', '福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県',
266				'京都府', '大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県',
267				'山口県', '徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県',
268				'大分県', '宮崎県', '鹿児島県', '沖縄県' ];
269		for (var i = 0; i < aryCity.length; i++) {
270			if (aryCity[i] == other_address_city_default) {
271				document.getElementById('other_address_city').options[i].selected = true;
272			}
273		}
274	} else {
275		// 新規入力
276		if (isSetValueOhters) {
277			document.getElementById('other_kanjiname_sei').value = other_kanjiname_sei;
278			document.getElementById('other_kanjiname_mei').value = other_kanjiname_mei;
279			document.getElementById('other_kananame_sei').value = other_kananame_sei;
280			document.getElementById('other_kananame_mei').value = other_kananame_mei;
281			document.getElementById('other_postal_3digit').value = other_postal_3digit;
282			document.getElementById('other_postal_4digit').value = other_postal_4digit;
283			document.getElementById('other_address_town').value = other_address_town;
284			document.getElementById('other_address_code').value = other_address_code;
285			document.getElementById('other_address_build').value = other_address_build;
286			document.getElementById('other_tel_home').value = other_tel_home;
287
288			aryCity = [ null, '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県',
289					'茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県',
290					'石川県', '福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県',
291					'京都府', '大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県',
292					'山口県', '徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県',
293					'大分県', '宮崎県', '鹿児島県', '沖縄県' ];
294			for (var i = 0; i < aryCity.length; i++) {
295				if (aryCity[i] == other_address_city) {
296					document.getElementById('other_address_city').options[i].selected = true;
297				}
298			}
299		}
300		try {
301			const radios = document.querySelectorAll(`input[type="radio"][name="other_address_no"]`);
302			if (other_address_no != '') {
303				radios.forEach(radio => {
304					radio.checked = (radio.value === other_address_no);
305				});
306			}
307		}catch(e){}
308	}
309}
310var isSetValueOhters = true;
311
312function clear_Value() {
313	document.getElementById('other_kanjiname_sei').value = "";
314	document.getElementById('other_kanjiname_mei').value = "";
315	document.getElementById('other_kananame_sei').value = "";
316	document.getElementById('other_kananame_mei').value = "";
317	document.getElementById('other_postal_3digit').value = "";
318	document.getElementById('other_postal_4digit').value = "";
319	document.getElementById('other_address_city').value = "";
320	document.getElementById('other_address_town').value = "";
321	document.getElementById('other_address_code').value = "";
322	document.getElementById('other_address_build').value = "";
323	document.getElementById('other_tel_home').value = "";
324}
325
326function getCityName(value) {
327	aryCity = [ null, '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県', '茨城県',
328			'栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県', '石川県',
329			'福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県', '京都府',
330			'大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県', '山口県',
331			'徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県', '大分県',
332			'宮崎県', '鹿児島県', '沖縄県' ];
333	for (var i = 0; i <= aryCity.length; i++) {
334		if (i == value) {
335			return aryCity[i];
336		}
337	}
338	return "";
339}
340
341function setMailDelivery() {
342	var mailDlvVisible = true;
343	var mailDlvAvailable = true;
344	var mailDlvAvailableBefore = !document.getElementById("sel_nextdlvymd1").disabled;
345	var sel_nextdlvymdBefore = $("input[name='sel_nextdlvymd']:checked").val();
346
347	// ==========================================
348	// メール便の表示/非表示・使用可否の値を設定
349	// ==========================================
350	if (document.getElementById("pre_weight").value >= 10) { // 重み値が10を超えている
351		mailDlvVisible = false;
352		mailDlvAvailable = false;
353	}
354
355	if ($("input[name='pay_method']:checked").val() == 4) { // 代引きが選択されている
356		mailDlvAvailable = false;
357	}
358
359	if (document.getElementById("disp_type").value == 2) { // 明細のみ表示
360		if (document.getElementById("pre_gift_kbn").value == 1
361				|| $("input[name='pay_method']:checked").val() == 4) { // ギフト
362			// or
363			// 代引き
364			mailDlvVisible = false;
365		}
366	}
367
368	if (($("input[name='sel_address']:checked").val() == 1)
369			&& ($("input[name='gift_kbn']:checked").val() == 1)) { // 商品を別送且つ請求書が自分(ギフト)の場合
370		mailDlvAvailable = false;
371	}
372
373	// =============================================
374	// メール便の表示/非表示・使用可否の表示切り替え
375	// =============================================
376	document.getElementById("nextdlvymd_mail").style.display = (mailDlvVisible ? 'block'
377			: 'none');
378	document.getElementById("sel_nextdlvymd1").disabled = !mailDlvAvailable;
379	if (mailDlvAvailable) {
380		$("#nextdlvymd_mail .ui-datepicker-trigger").removeAttr("disabled");
381	} else {
382		$("#nextdlvymd_mail .ui-datepicker-trigger").attr("disabled",
383				"disabled");
384	}
385
386	// 変更しない=メール便の場合の処理
387	if (document.getElementById("pre_haiso").value == "02"
388			|| document.getElementById("pre_haiso").value == "08") {
389		document.getElementById("calendarOff").disabled = !mailDlvAvailable;
390	}
391
392	// ==========================================================
393	// メール便の表示/非表示・使用可否の変更に伴う他の要素の制御
394	// ==========================================================
395	// ヘッダ情報のみ表示中で、メール便を選択していたが使用不可になった場合→宅配便で同日に変更
396	if (document.getElementById("disp_type").value == "1") {
397		if (mailDlvAvailable == false) {
398			if ((document.getElementById("pre_haiso").value == "02" || document
399					.getElementById("pre_haiso").value == "08")
400					&& (sel_nextdlvymdBefore == 0)) {
401				// 変更しない=メール便を選択中だった場合
402				$("input[name='sel_nextdlvymd']").val([ '2' ]).click();
403				$("#nextdlvymd_year2").val(
404						document.getElementById("pre_next_date_year").value);
405				$("#nextdlvymd_month2")
406						.val(
407								Number(document
408										.getElementById("pre_next_date_month").value));
409				$("#nextdlvymd_day2")
410						.val(
411								Number(document
412										.getElementById("pre_next_date_day").value));
413			}
414			if (sel_nextdlvymdBefore == 1) {
415				// メール便を選択中だった場合
416				$("input[name='sel_nextdlvymd']").val([ '2' ]).click();
417				$("#nextdlvymd_year2").val($("#nextdlvymd_year").val());
418				$("#nextdlvymd_month2").val($("#nextdlvymd_month").val());
419				$("#nextdlvymd_day2").val($("#nextdlvymd_day").val());
420			}
421		}
422	}
423
424}
425
426function submitorder(url) {
427	document.getElementById("login_user_mail").value = document
428			.getElementById("user_mail").innerText;
429	document.getElementById("login_name_sei").value = document
430			.getElementById("name_sei").innerText;
431	document.getElementById("login_name_mei").value = document
432			.getElementById("name_mei").innerText;
433	document.getElementById("login_kananame_sei").value = document
434			.getElementById("kananame_sei").innerText;
435	document.getElementById("login_kananame_mei").value = document
436			.getElementById("kananame_mei").innerText;
437	document.getElementById("login_postal_3digit").value = document
438			.getElementById("postal_3digit").innerText;
439	document.getElementById("login_postal_4digit").value = document
440			.getElementById("postal_4digit").innerText;
441	document.getElementById("login_address_city").value = document
442			.getElementById("address_city").innerText;
443	document.getElementById("login_address_town").value = document
444			.getElementById("address_town").innerText;
445	document.getElementById("login_address_build").value = document
446			.getElementById("address_build").innerText;
447	document.getElementById("login_address_code").value = document
448			.getElementById("address_code").innerText;
449	document.getElementById("login_tel_home").value = document
450			.getElementById("tel_home").innerText;
451	document.getElementById("login_tel_ontime").value = document
452			.getElementById("tel_ontime").innerText;
453
454	document.getElementById("submit_user_mail").value = document
455			.getElementById("user_mail").innerText;
456	document.getElementById("submit_tel_ontime").value = document
457			.getElementById("tel_ontime").innerText;
458
459	var r_value = document.getElementsByName("sel_address");
460	for (i = 0; i < r_value.length; i++) {
461		if (r_value[i].checked) {
462			if (r_value[i].value == '0') {
463
464				document.getElementById("submit_user_mail").value = document
465						.getElementById("user_mail").innerText;
466				document.getElementById("submit_name_sei").value = document
467						.getElementById("name_sei").innerText;
468				document.getElementById("submit_name_mei").value = document
469						.getElementById("name_mei").innerText;
470				document.getElementById("submit_kananame_sei").value = document
471						.getElementById("kananame_sei").innerText;
472				document.getElementById("submit_kananame_mei").value = document
473						.getElementById("kananame_mei").innerText;
474				document.getElementById("submit_postal_3digit").value = document
475						.getElementById("postal_3digit").innerText;
476				document.getElementById("submit_postal_4digit").value = document
477						.getElementById("postal_4digit").innerText;
478				document.getElementById("submit_address_city").value = document
479						.getElementById("address_city").innerText;
480				document.getElementById("submit_address_town").value = document
481						.getElementById("address_town").innerText;
482				document.getElementById("submit_address_build").value = document
483						.getElementById("address_build").innerText;
484				document.getElementById("submit_address_code").value = document
485						.getElementById("address_code").innerText;
486				document.getElementById("submit_tel_home").value = document
487						.getElementById("tel_home").innerText;
488				// gift_kbn ADD 2009/1/29
489				document.getElementById("submit_gift_kbn").value = "お客様(ご本人)登録先";
490
491			} else if (r_value[i].value == '1') {
492				try {
493					document.getElementById("submit_name_sei").value = document
494							.getElementById("other_kanjiname_sei").value;
495					document.getElementById("submit_name_mei").value = document
496							.getElementById("other_kanjiname_mei").value;
497					document.getElementById("submit_kananame_sei").value = document
498							.getElementById("other_kananame_sei").value;
499					document.getElementById("submit_kananame_mei").value = document
500							.getElementById("other_kananame_mei").value;
501					document.getElementById("submit_postal_3digit").value = document
502							.getElementById("other_postal_3digit").value;
503					document.getElementById("submit_postal_4digit").value = document
504							.getElementById("other_postal_4digit").value;
505					document.getElementById("submit_address_city").value = getCityName(document
506							.getElementById("other_address_city").value);
507					document.getElementById("submit_address_town").value = document
508							.getElementById("other_address_town").value;
509					document.getElementById("submit_address_build").value = document
510							.getElementById("other_address_build").value;
511					document.getElementById("submit_address_code").value = document
512							.getElementById("other_address_code").value;
513					document.getElementById("submit_tel_home").value = document
514							.getElementById("other_tel_home").value;
515				}catch(e){}
516
517				// gift_kbn ADD START 2009/1/29
518				var gift_kbn = document.getElementsByName("gift_kbn");
519				for (i = 0; i < gift_kbn.length; i++) {
520					if (gift_kbn[i].checked) {
521						if (gift_kbn[i].value == '1') {
522							document.getElementById("submit_gift_kbn").value = "お客様(ご本人)登録先";
523						} else if (gift_kbn[i].value == "9") {
524							document.getElementById("submit_gift_kbn").value = "商品のお届け先";
525						}
526					}
527				}
528				// gift_kbn ADD END 2009/1/29
529
530			}
531		}
532	}
533
534	var delivery_time_date = document.getElementsByName("delivery_date");
535	document.getElementById("submit_deliver_date").value = "指定なし";
536	for (var i = 0; i < delivery_time_date.length; i++) {
537		if (delivery_time_date[i].checked) {
538			if (delivery_time_date[i].value != "") {
539				document.getElementById("submit_deliver_date").value = delivery_time_date[i].value;
540				break;
541			}
542		}
543	}
544	var delivery_time_zone = document.getElementsByName("delivery_time_zone");
545	document.getElementById("submit_deliver_zone").value = "指定なし";
546	for (i = 0; i < delivery_time_zone.length; i++) {
547		if (delivery_time_zone[i].checked) {
548			if (delivery_time_zone[i].value == '00') {
549				document.getElementById("submit_deliver_zone").value = "指定なし";
550			} else if (delivery_time_zone[i].value == '01') {
551				document.getElementById("submit_deliver_zone").value = "午前中";
552			} else if (delivery_time_zone[i].value == '02') {
553				document.getElementById("submit_deliver_zone").value = "12:00~14:00";
554			} else if (delivery_time_zone[i].value == '03') {
555				document.getElementById("submit_deliver_zone").value = "14:00~16:00";
556			} else if (delivery_time_zone[i].value == '04') {
557				document.getElementById("submit_deliver_zone").value = "16:00~18:00";
558			} else if (delivery_time_zone[i].value == '05') {
559				document.getElementById("submit_deliver_zone").value = "18:00~20:00";
560			} else if (delivery_time_zone[i].value == '06') {
561				document.getElementById("submit_deliver_zone").value = "19:00~21:00";
562			} else if (delivery_time_zone[i].value == '07') {
563				document.getElementById("submit_deliver_zone").value = "20:00~21:00";
564			}
565		}
566	}
567	var pay_method = document.getElementsByName("pay_method");
568	for (i = 0; i < pay_method.length; i++) {
569		if (pay_method[i].checked) {
570			if (pay_method[i].value == '1') {
571				document.getElementById("submit_payment").value = "クレジットカード";
572			} else if (pay_method[i].value == '3') {
573				document.getElementById("submit_payment").value = "代金引換";
574			} else if (pay_method[i].value == '2') {
575				document.getElementById("submit_payment").value = "後払い(コンビニエンスストア・ゆうちょ銀行・郵便局またはスマホ決済)";
576				// kouza ADD START 2011/4/12
577			} else if (pay_method[i].value == '5') {
578				document.getElementById("submit_payment").value = "口座自動引き落とし";
579				// kouza ADD END 2011/4/12
580			}
581		}
582	}
583
584	// アンケート部分
585	var chk_questions = document.orderForm.question_chk;
586	var questionValue = "";
587	for (var i = 0; i < chk_questions.length; i++) {
588		if (chk_questions[i].checked) {
589			if (questionValue != "") {
590				questionValue += ",";
591			}
592			questionValue += chk_questions[i].value;
593		}
594	}
595	document.orderForm.question.value = questionValue;
596
597	document.orderForm.action = url;
598	window.onbeforeunload = null;
599	document.orderForm.submit();
600}
601
602function setPay() {
603	alert("setPay");
604	var flag = document.orderForm.sel_address;
605	var method = document.orderForm.pay_method;
606
607	set_Daibiki(flag);
608	selectPayMethod(method);
609}
610
611function doConfirmRegist(objForm) {
612
613	var birthday_year = objForm.birthdayyear.value;
614	var birthday_month = objForm.birthdaymonth.value;
615	var birthday_day = objForm.birthdayday.value;
616
617	if (birthday_month.length == 1) {
618		birthday_month = "0" + birthday_month;
619	}
620	if (birthday_day.length == 1) {
621		birthday_day = "0" + birthday_day;
622	}
623
624	objForm.birthday.value = birthday_year + birthday_month + birthday_day;
625
626	var chk_questions = objForm.question_chk;
627	var questionValue = "";
628	for (var i = 0; i < chk_questions.length; i++) {
629		if (chk_questions[i].checked) {
630			if (questionValue != "") {
631				questionValue += ",";
632			}
633			questionValue += chk_questions[i].value;
634		}
635	}
636	objForm.question.value = questionValue;
637}
638function doModifyRegist(objForm) {
639	var birthday_year = objForm.birthdayyear.value;
640	var birthday_month = objForm.birthdaymonth.value;
641	var birthday_day = objForm.birthdayday.value;
642
643	if (birthday_month.length == 1) {
644		birthday_month = "0" + birthday_month;
645	}
646	if (birthday_day.length == 1) {
647		birthday_day = "0" + birthday_day;
648	}
649	objForm.birthday.value = birthday_year + birthday_month + birthday_day;
650}
651function displayBirthDay(objForm) {
652	var birthday = objForm.birthday.value;
653	objForm.birthdayyear.value = birthday.substring(0, 4);
654	objForm.birthdaymonth.value = birthday.substring(4, 6);
655	objForm.birthdayday.value = birthday.substring(6);
656}
657
658function displaySex(str) {
659	if (str == "女性")
660		document.getElementById("gender_0").checked = true;
661	if (str == "男性")
662		document.getElementById("gender_1").checked = true;
663}
664
665function displayTelSelect(str) {
666	if (str != "" && str != null) {
667		document.getElementById("telselect_1").checked = true;
668	} else {
669		document.getElementById("telselect_0").checked = true;
670	}
671}
672
673function displaySegment1(str) {
674	if (str == "希望する")
675		document.getElementById("segment1_0").checked = true;
676	if (str == "希望しない")
677		document.getElementById("segment1_1").checked = true;
678}
679
680function displaySegment2(str) {
681	if (str == "希望する")
682		document.getElementById("segment2_0").checked = true;
683	if (str == "希望しない")
684		document.getElementById("segment2_1").checked = true;
685}
686
687// 注文履歴から買い物かごへ遷移する場合
688function doHistoryCartSubmit(product_id, pay_radio, select_1, select_2) {
689
690	document.shopcartform.pay_radio.value = pay_radio;
691	document.shopcartform.select_1.value = select_1;
692	document.shopcartform.select_2.value = select_2;
693
694	document.shopcartform.p_id.value = product_id;
695	document.shopcartform.p_action.value = 'add';
696	document.shopcartform.p_num.value = 1;
697	window.onbeforeunload = null;
698	document.shopcartform.submit();
699
700}
701
702// 選択したコントロールのチェックを有効にします。
703function AutoCheck(checkname) {
704	document.getElementById(checkname).checked = true;
705}
706
707// 代引きの場合の切り替え
708function set_Daibiki(flag) {
709	if (flag == 1) {
710		document.orderForm.pay_method[1].disabled = true;
711	} else {
712		document.orderForm.pay_method[1].disabled = false;
713	}
714}
715
716// 日中の連絡先ロック
717function set_Disabled(ctrl, flag) {
718	if (flag == '1') {
719		ctrl.disabled = true;
720	} else {
721		ctrl.disabled = false;
722	}
723}
724
725function selectPayMethod(method) {
726	switch (method) {
727	case 1:
728		// クレジットカード
729		break;
730	case 2: // 郵便振替
731		document.getElementById('pay_method_use').checked = false;
732		// お届け先:登録住所とは別の住所へお届けする
733		break;
734	case 3: // 代引き
735		document.getElementById('pay_method_use').checked = false;
736		// 商品を別のご住所にお届けする(プレゼントなど)
737		break;
738	// kouza ADD START 2011/4/12
739	case 4: // 口座自動引き落とし
740		document.getElementById('pay_method_use').checked = false;
741		break;
742	// kouza ADD END 2011/4/12
743	default:
744		// エラー
745		break;
746	}
747}
748
749function selectCardReuse() {
750	document.getElementById('pay_method_use').checked = true;
751}
752
753// 既定の桁数に達したら指定されたコントロールにフォーカスを移す
754function setNextControl(i, n, m) {
755	var e = windowEvent();
756	if (e.keyCode == 9) {
757		return;
758	} // tab
759	if (e.keyCode == 16) {
760		return;
761	} // shift
762	if (e.keyCode == 8) {
763		return;
764	} // backspace
765	if (e.keyCode == 37) {
766		return;
767	} // ←
768	if (e.keyCode == 38) {
769		return;
770	} // ↑
771	if (e.keyCode == 39) {
772		return;
773	} // →
774	if (e.keyCode == 40) {
775		return;
776	} // ↓
777
778	if (i.value.length >= m) {
779		i.form.elements[n].focus();
780	}
781}
782
783// クロスブラウザイベント
784function windowEvent() {
785	if (window.event) {
786		return window.event;
787	}
788
789	var caller = arguments.callee.caller;
790	while (caller) {
791		var ob = caller.arguments[0];
792		if (ob) {
793			return ob;
794		}
795		caller = caller.caller;
796	}
797	return null;
798}
799
800function isIE() { // ie?
801	if (window.navigator.userAgent.toLowerCase().indexOf("msie") >= 1)
802		return true;
803	else
804		return false;
805}
806
807if (!isIE()) { // firefox innerText define
808	HTMLElement.prototype.__defineGetter__("innerText", function() {
809		var anyString = "";
810		var childS = this.childNodes;
811		for (var i = 0; i < childS.length; i++) {
812			if (childS[i].nodeType == 1)
813				// anyString += childS[i].tagName=="BR" ? "\n" :
814				// childS[i].innerText;
815				anyString += childS[i].innerText;
816			else if (childS[i].nodeType == 3)
817				anyString += childS[i].nodeValue;
818		}
819		anyString = anyString.replace(/\n/g, "");
820		return anyString;
821	});
822	HTMLElement.prototype.__defineSetter__("innerText", function(sText) {
823		this.textContent = sText;
824	});
825}
826
827// 半角カナと全角ひらがなを全角カタカナにする
828var zen_table = new Array("。", "「", "」", "、", "・", "ヲ", "ァ", "ィ", "ゥ", "ェ",
829		"ォ", "ャ", "ュ", "ョ", "ッ", "ー", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク",
830		"ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ",
831		"ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ",
832		"ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン", "゛", "゜");
833
834function iskana(c) {
835	return (c >= 65377 && c <= 65439);
836}
837function is_ka_to(c) {
838	return (c >= 65398 && c <= 65412);
839}
840function is_ha_ho(c) {
841	return (c >= 65418 && c <= 65422);
842}
843function is_hira(c) {
844	return ((c >= 12353 && c <= 12435) || c == 12445 || c == 12446);
845}
846
847function toZenKata(src) {
848	var i, code, next;
849	var str = new String;
850	var len = src.length;
851	for (i = 0; i < len; i++) {
852		var c = src.charCodeAt(i);
853		if (iskana(c)) {
854			code = zen_table[c - 65377];
855			if (i < len - 1) {
856				next = src.charCodeAt(i + 1);
857				if (next == 65438 && c == 65395) {
858					code = "ヴ";
859					i++;
860				} else if (next == 65438 && (is_ka_to(c) || is_ha_ho(c))) {
861					code = String.fromCharCode(code.charCodeAt(0) + 1);
862					i++;
863				} else if (next == 65439 && is_ha_ho(c)) {
864					code = String.fromCharCode(code.charCodeAt(0) + 2);
865					i++;
866				}
867			}
868			str += code;
869		} else if (is_hira(c)) {
870			str += String.fromCharCode(c + 96);
871		} else {
872			str += src.charAt(i);
873		}
874	}
875	// special
876	// str = str.replace("テ゛","デ");
877	str = convDakten(str);
878	return str;
879}
880
881function convDakten(str) {
882	str = str.replace("カ゛", "ガ");
883	str = str.replace("キ゛", "ギ");
884	str = str.replace("ク゛", "グ");
885	str = str.replace("ケ゛", "ゲ");
886	str = str.replace("コ゛", "ゴ");
887
888	str = str.replace("サ゛", "ザ");
889	str = str.replace("シ゛", "ジ");
890	str = str.replace("ス゛", "ズ");
891	str = str.replace("セ゛", "ゼ");
892	str = str.replace("ソ゛", "ゾ");
893
894	str = str.replace("タ゛", "ダ");
895	str = str.replace("チ゛", "ヂ");
896	str = str.replace("ツ゛", "ヅ");
897	str = str.replace("テ゛", "デ");
898	str = str.replace("ト゛", "ド");
899
900	str = str.replace("ハ゛", "バ");
901	str = str.replace("ヒ゛", "ビ");
902	str = str.replace("フ゛", "ブ");
903	str = str.replace("ヘ゛", "ベ");
904	str = str.replace("ホ゛", "ボ");
905
906	str = str.replace("ウ゛", "ヴ");
907
908	str = str.replace("ハ°", "パ");
909	str = str.replace("ヒ°", "ピ");
910	str = str.replace("フ°", "プ");
911	str = str.replace("ヘ°", "ペ");
912	str = str.replace("ホ°", "ポ");
913
914	return str;
915}
916
917function convert(control) {
918	var src = new String(control.value);
919	control.value = toZenKata(src);
920	control.value = trimAll(control.value);
921	return true;
922}
923
924/* 半角数字から全角数字に変換するファンクション */
925function h2z_word(src) {
926	var str = src.replace(/(\w)/g, function($0) {
927		return String.fromCharCode($0.charCodeAt(0) + 65248);
928	});
929	str = str.replace(/-/g, "-");
930	str = str.replace(/\s/g, " ");
931	return str;
932}
933
934/* 半角カナを全角カナに変換する */
935var zen_table = new Array("。", "「", "」", "、", "・", "ヲ", "ァ", "ィ", "ゥ", "ェ",
936		"ォ", "ャ", "ュ", "ョ", "ッ", "ー", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク",
937		"ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ",
938		"ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ",
939		"ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン", "゛", "゜");
940
941function iskana(c) {
942	return (c >= 65377 && c <= 65439);
943}
944function is_ka_to(c) {
945	return (c >= 65398 && c <= 65412);
946}
947function is_ha_ho(c) {
948	return (c >= 65418 && c <= 65422);
949}
950
951function h2z_kana(src) {
952	var i, code, next;
953	var str = new String;
954	var len = src.length;
955	for (i = 0; i < len; i++) {
956		var c = src.charCodeAt(i);
957		if (iskana(c)) {
958			code = zen_table[c - 65377];
959			if (i < len - 1) {
960				next = src.charCodeAt(i + 1);
961				if (next == 65438 && c == 65395) {
962					code = "ヴ";
963					i++;
964				} else if (next == 65438 && (is_ka_to(c) || is_ha_ho(c))) {
965					code = String.fromCharCode(code.charCodeAt(0) + 1);
966					i++;
967				} else if (next == 65439 && is_ha_ho(c)) {
968					code = String.fromCharCode(code.charCodeAt(0) + 2);
969					i++;
970				}
971			}
972			str += code;
973		} else {
974			str += src.charAt(i);
975		}
976	}
977	return str;
978}
979
980// 2008/10/09 ADD START
981/* 半角記号を全角に変換するファンクション */
982function h2z_sign(src) {
983	var str = src.replace(/\(/g, "(");
984	str = str.replace(/\)/g, ")");
985	str = str.replace(/\!/g, "!");
986	str = str.replace(/\#/g, "#");
987	str = str.replace(/\$/g, "$");
988	str = str.replace(/\%/g, "%");
989	str = str.replace(/\&/g, "&");
990	str = str.replace(/\=/g, "=");
991	str = str.replace(/\~/g, "~");
992	str = str.replace(/\|/g, "|");
993	// str = str.replace(/\'/g,"’");
994	// str = str.replace(/\"/g,"”");
995	return str;
996}
997// 2008/10/09 ADD END
998
999function convertHanNumKana(control) {
1000	var src = new String(control.value);
1001	control.value = h2z_word(src);
1002	control.value = tokushu_sign(control.value);
1003	control.value = h2z_kana(control.value);
1004	control.value = h2z_sign(control.value);
1005	control.value = trimAll(control.value);
1006	control.value = convDakten(control.value);
1007	return true;
1008}
1009
1010// 2010/06/21 ADD start
1011function tokushu_sign(src) {
1012	var str = new String;
1013	for (i = 0; i < src.length; i++) {
1014		if (src.charCodeAt(i) == 8722 || src.charCodeAt(i) == 8211
1015				|| src.charCodeAt(i) == 8212 || src.charCodeAt(i) == 8213) {
1016			str = str + String.fromCharCode(65293);
1017		} else {
1018			str = str + src.charAt(i);
1019		}
1020	}
1021
1022	return str;
1023}
1024// 2010/06/21 ADD end
1025
1026// 2010/07/01 ADD start
1027// 数値のみを入力可能にする
1028function inputNumberOnly() {
1029	/*
1030	 * //2012/12/12 なぜかeventが定義されていないエラーになるので消す m =
1031	 * String.fromCharCode(event.keyCode); if("0123456789\b\r".indexOf(m, 0) <
1032	 * 0) { return false; }
1033	 */
1034	return true;
1035}
1036
1037// 数値以外を削除する
1038function replaceNotNumber(arg) {
1039	var str = arg.value;
1040	str = num2han(str);
1041	var tmp_str = str.replace(/[^\d]/g, "");
1042	arg.value = tmp_str;
1043}
1044// 2010/07/01 ADD end
1045
1046function num2han(motoText) {
1047	var han = "0123456789.,-+:@";
1048	var zen = "0123456789.,-+:@";
1049	str = "";
1050	for (i = 0; i < motoText.length; i++) {
1051		c = motoText.charAt(i);
1052		n = zen.indexOf(c, 0);
1053		if (n >= 0)
1054			c = han.charAt(n);
1055		str += c;
1056	}
1057	return str;
1058}
1059
1060// emailを半角に
1061// <input ... onblur="email2han(this);" ...>
1062function email2han(control) {
1063	var src = new String(control.value);
1064	src = num2han(src);
1065	src = src.replace(/[ー-]/g, "-");
1066	src = rmSpc(src.toOneByteAlphaNumeric());
1067	control.value = src;
1068	return true;
1069}
1070
1071// idを半角に
1072function id2han(control) {
1073	var src = new String(control.value);
1074	src = num2han(src);
1075	src = src.replace(/[ー-]/g, "-");
1076	src = rmSpc(src.toOneByteAlphaNumeric());
1077	control.value = src;
1078	return true;
1079}
1080
1081// 全角英数字文字列を半角文字列に変換する
1082String.prototype.toOneByteAlphaNumeric = function() {
1083	return this.replace(/[A-Za-z0-9]/g, function(s) {
1084		return String.fromCharCode(s.charCodeAt(0) - 0xFEE0);
1085	});
1086}
1087
1088// スペースをトリムする
1089function trimAnk(control) {
1090	var src = new String(control.value);
1091	control.value = rmSpc(src);
1092	return true;
1093}
1094
1095// 前後のスペースをトリムする
1096function trimAll(s) {
1097	return s.replace(/(^[\s ]+)|([\s ]+$)/g, "");
1098}
1099
1100// スペースを除外する
1101function rmSpc(s) {
1102	return s.replace(/[\s ]+/g, "");
1103}
1104
1105// 2011/04/18 T.KANO ADD START アンケート欄改修
1106// アンケート欄のラジオボタンをクリックした際にフラグを変更する。
1107function openNewAnquete(targetid) {
1108	hidden_flag = false;
1109	flex(targetid, false, true);
1110
1111	// check first if it is one.
1112	if ($('#' + targetid).find('input[name=question_chk]').length == 1) {
1113		$('#' + targetid).find('input[name=question_chk]').click();
1114	}
1115}
1116// アンケート欄のラジオボタンをクリックした際にフラグを変更する。
1117function closeNewAnquete(targetid) {
1118	hidden_flag = true;
1119	flex(targetid, false, true);
1120}
1121
1122// アンケート欄の指定ボタンのクリア
1123function clearButton() {
1124	return;
1125}
1126// 2011/04/18 T.KANO ADD END アンケート欄改修
1127
1128// 指定したIDの要素までスクロールで移動する
1129function scrollTo(elementId) {
1130	var p = $("#" + elementId).offset().top;
1131	$('html,body').animate({
1132		scrollTop : p
1133	}, 'fast');
1134	return false;
1135}
1136
1137
1138
1139
1140function setBirthDay() {
1141
1142	try {
1143
1144		var birthday = document.getElementsByName("birthdaydata")[0].value;
1145		var birthdayYear = "";
1146		var birthdayMonth = "";
1147		var birthdayDay = "";
1148		var birthdayYearParam = document.getElementsByName("birthdayyear")[0].value;
1149		var birthdayMonthParam = document.getElementsByName("birthdaymonth")[0].value;
1150
1151		if(birthday != "" && birthday != null){
1152			birthdayYear = birthday.substring(0,4);
1153			birthdayMonth = birthday.substring(4,6);
1154			birthdayDay = birthday.substring(6);
1155			if(birthdayYearParam == birthdayYear && birthdayMonthParam == birthdayMonth){
1156				document.getElementsByName("birthdayday")[0].value = birthdayDay;
1157			}
1158		}
1159	} catch (e) {}
1160
1161}
1162function togglePointText(){
1163	var radio1 = document.getElementById('point_siyou_kbn1').checked;
1164	var textSiyouPoint = document.getElementById('siyou_point');
1165	if ( radio1 ) {
1166		textSiyouPoint.disabled = false;
1167	} else {
1168		textSiyouPoint.disabled = true;
1169		textSiyouPoint.value = "";
1170	}
1171}
1172$(function(){
1173    $('[name="pay_method"]').change(function(){
1174		if ($('#pay_method0').length > 0 ) {
1175			if ($('#pay_method0')[0].checked) {
1176				$('#reuse-card-check').show();
1177				$('#card_last_time_flg')[0].value= '';
1178			} else {
1179				if ($('#pay_method_card_reuse').length > 0 ) {
1180					if ($('#pay_method_card_reuse')[0].checked) {
1181						$('#card_last_time_flg')[0].value= '1';
1182						$('#reuse-card-check').show();
1183					} else {
1184						$('#card_last_time_flg')[0].value= '';
1185						$('#reuse-card-check').hide();
1186					}
1187				} else {
1188					$('#reuse-card-check').hide();
1189				}	
1190			}
1191		}
1192		if ($('#pay_method-1').length > 0 ) {
1193			if ($('#pay_method-1')[0].checked) {
1194				$('#reuse-card-check').show();
1195			} else {
1196				$('#reuse-card-check').hide();
1197			}
1198		}
1199    });
1200});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.