PageSourceSearch

https://www.idaten.ne.jp/portal/common/js/idaten2.js

js idaten.ne.jp collected 2026-10-02 06:57:57 UTC 73,350 bytes, 2,098 lines download raw bytes

1/*
2jQueryのバージョンアップに伴う修正
3jQuery1.8よりcurCSSが削除された、またjQuery UIのversion upは不可なので以下の処理を追加
4see https://blog.jquery.com/2012/08/09/jquery-1-8-released/
5*/
6if ( !$.curCSS ) {
7    $.curCSS = $.css;
8}
9
10//共通変数
11//日付取得
12//今日の日時を表示
13var tDate = new Date();
14var tYear = tDate.getFullYear();
15var tMon = tDate.getMonth() + 1;
16var tDay = tDate.getDate();
17
18var setTimeoutTargetPath = [
19                            '/portal/pub/prod/EOCCXX001_list.html/',
20                            '/portal/pub/prod/EOCCXX001_2list.html/'
21                            ];
22function setAjaxTimeout() {
23    // 現在の画面のパスを取得する。
24    var urlPath = location.pathname;
25    for (var i = 0; i < setTimeoutTargetPath.length; i++) {
26        if (setTimeoutTargetPath[i] == urlPath) {
27            // 対象画面の場合、ajaxのタイムアウト時間を設定する
28            jQuery.ajaxSetup({timeout : 10000, cache : false});
29        }
30    }
31}
32function setMobileAjax() {
33    // Ajax呼出しがcacheされる場合があるため、no-cacheを指定する。
34
35    if (navigator.userAgent.indexOf('iPhone') > 0
36            || navigator.userAgent.indexOf('iPad') > 0
37            || navigator.userAgent.indexOf('iPod') > 0
38            || navigator.userAgent.indexOf('Android') > 0) {
39    	jQuery.ajaxSetup({
40    	    headers: { "cache-control": "no-cache" }
41    	});
42    }
43}
44
45setAjaxTimeout();
46setMobileAjax();
47
48//カレンダーピックアップ:プルダウンの日付を読み取り
49function readSelected(input, inst) {
50	var Tget = $("."+input.name);
51	var Y=M=D="";
52	if(Tget.length){
53		Tget.each(function(){
54			if($(this).hasClass("year")){
55				Y = $(this).val() ? $(this).val():tYear;
56			}
57			if($(this).hasClass("month")){
58				M = $(this).val() ? ($(this).val()<10) ? "0"+$(this).val():$(this).val():(tMon<10) ? "0"+tMon:tMon;
59			}
60			if($(this).hasClass("date")){
61				D = $(this).val() ? ($(this).val()<10) ? "0"+$(this).val():$(this).val():(tDay<10) ? "0"+tDay:tDay;
62			}
63		});
64	}
65	$("input[name="+input.name+"]").val(Y+"/"+M+"/"+D);
66	return {};
67}
68
69//カレンダーピックアップ:日付をプルダウンに割当
70function updateSelected(date, inst) {
71	var Tget = $("."+$("#"+inst.id).attr("name"));
72	if(Tget.length){
73		var tmp = date.split("/");
74		var Y = parseInt(tmp[0],10);
75		var M = parseInt(tmp[1],10);
76		var D = parseInt(tmp[2],10);
77		Tget.each(function(){
78			if($(this).hasClass("year")){
79				$(this).val(Y);
80			}
81			if($(this).hasClass("month")){
82				$(this).val(M);
83				setDays($(this),Y,M);
84			}
85			if($(this).hasClass("date")){
86				$(this).val(D);
87				$(this).change();
88			}
89		});
90	}
91}
92
93//日付変更
94function setDays(self,Y,M){
95	//日
96	var tLast = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)[M - 1];
97	// 閏年判定
98	if (2 == M && (0 == Y % 400 || (0 == Y % 4 && 0 != Y % 100))) tLast = 29;
99
100	var thisDay = self.next();
101
102	if(self.hasClass("yearNextCheck")) {
103		// 一部画面に、年月日の間にタグが入るため、スキップする。
104		thisDay = self.next().next();
105		if (!thisDay.hasClass("date")) {
106			thisDay = self.next().next().next().next();
107		}
108	} else if (self.hasClass("monthNextCheck")) {
109		// 一部画面に、年月日の間にタグが入るため、スキップする。
110		if (!thisDay.hasClass("date")) {
111			thisDay = self.next().next();
112		}
113	} else if(self.hasClass("year")){
114		thisDay = self.next().next();
115	}
116    var day = thisDay.val();
117	thisDay.empty().append('<option value="" />');
118    for(var i=1;i<=tLast;i++){
119        if (day == i) {
120          thisDay.append('<option value="'+ i + '" selected="selected">'+ (i<10 ? "0"+i:i) + '</option>');
121        } else {
122          thisDay.append('<option value="'+ i + '" >'+ (i<10 ? "0"+i:i) + '</option>');
123        }
124    }
125}
126
127//3桁カンマ区切り
128function addComma(dat) {
129	var num = new String(dat).replace(/,/g, "");
130	while(num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1,$2")));
131	return num;
132}
133
134// カレンダー用日付計算(先頭)
135function getDateFirstInterval(year) {
136	var today = new Date();
137	var dt1 = new Date(today.getFullYear(), today.getMonth(), today.getDate()); // 今日
138    var dt2 = new Date(year, 0, 1); // 先頭の年の1月1日
139    var diff = dt1 - dt2;
140    var diffDay = diff / 86400000;//1日は86400000ミリ秒
141    return "-" + diffDay + "d";
142}
143
144//カレンダー用日付計算(末尾)
145function getDateLastInterval(year) {
146	var today = new Date();
147	var dt1 = new Date(year, 11, 31);// 末尾の年の12月31日
148    var dt2 = new Date(today.getFullYear(), today.getMonth(), today.getDate()); // 今日
149    var diff = dt1 - dt2;
150    var diffDay = diff / 86400000;//1日は86400000ミリ秒
151    return diffDay + "d";
152}
153
154//メイン動作
155$(function(){
156	//カレンダー日付セット
157	if($(".datepick1").length || $(".datepick2").length){
158		//å¹´
159		var stY = tYear-10;
160		var edU = tYear+1;
161
162		if ($("[class*=datepickEndYear]").length) {
163			var clazz = $("[class*=datepickEndYear]").attr("class");
164			clazz = clazz.substring(clazz.indexOf("datepickEndYear")
165					+ "datepickEndYear".length);
166			if (clazz.indexOf(" ") > 0) {
167				clazz = clazz.substring(0, clazz.indexOf(" "));
168			}
169			if (clazz.length > 0) {
170				var num = parseInt(clazz, 10);
171				edU = tYear + num;
172			}
173		}
174
175		if ($("[class*=datepickStartYear]").length) {
176			var clazz = $("[class*=datepickStartYear]").attr("class");
177			clazz = clazz.substring(clazz.indexOf("datepickStartYear")
178					+ "datepickStartYear".length);
179			if (clazz.indexOf(" ") > 0) {
180				clazz = clazz.substring(0, clazz.indexOf(" "));
181			}
182			if (clazz.length > 0) {
183				var num = parseInt(clazz, 10);
184				stY = tYear - num;
185			}
186		}
187
188		$(".year").each(function(){
189
190			$(this).empty().append('<option value="" />');
191			for(var i=stY;i<=edU;i++){
192				$(this).append('<option value="'+ i + '">'+ i + '</option>');
193			}
194            if (navigator.userAgent.indexOf("Chrome") != -1) {
195                $(this).css('width', '5em');
196            } else if (navigator.userAgent.indexOf("Safari") != -1) {
197                $(this).css('width', '6em');
198            } else {
199                $(this).css('width', '4.5em');
200            }
201		});
202		//月
203		$(".month").each(function(){
204			$(this).empty().append('<option value="" />');
205			for(var i=1;i<=12;i++){
206				$(this).append('<option value="'+ i + '">'+ (i<10 ? "0"+i:i) + '</option>');
207			}
208		});
209
210		$(".date").each(function(){
211			$(this).empty().append('<option value="" />');
212			for(var i=1;i<=31;i++){
213				$(this).append('<option value="'+ i + '">'+ (i<10 ? "0"+i:i) + '</option>');
214			}
215		});
216
217		$(".year,.month").change(function(){
218			if(!$(this).val()) return;
219			var Y="";
220			var M="";
221			if($(this).hasClass("year")){
222				Y=$(this).val();
223				if ($(this).hasClass("yearNextCheck")) {
224					// 一部画面に、年と月の間にタグが入るため、スキップする。
225					var monthObj = $(this).next();
226					if (monthObj.hasClass("month")) {
227						M=$(this).next().val() ? $(this).next().val():tMon;
228					} else {
229						M=$(this).next().next().val() ? $(this).next().next().val():tMon;
230					}
231				} else {
232					M=$(this).next().val() ? $(this).next().val():tMon;
233				}
234			}else{
235				if ($(this).hasClass("monthPrevCheck")) {
236					// 一部画面に、年と月の間にタグが入るため、スキップする。
237					var yearObj = $(this).prev();
238					if (yearObj.hasClass("year")) {
239						Y=$(this).prev().val() ? $(this).prev().val():tYear;
240					} else {
241						Y=$(this).prev().prev().val() ? $(this).prev().prev().val():tYear;
242					}
243				} else {
244					Y=$(this).prev().val() ? $(this).prev().val():tYear;
245				}
246				M=$(this).val();
247			}
248			setDays($(this),Y,M);
249		});
250
251		var dateFirstInterval = getDateFirstInterval(stY);
252		var dateLastInterval = getDateLastInterval(edU);
253
254		//カレンダー選択1
255		if($(".datepick1").length){
256			$( ".datepick1" ).datepicker({
257				showOn: "button",
258				buttonImage: "/portal/common/img/ico_calendar01.gif",
259				buttonImageOnly: true,
260				beforeShow: readSelected,
261				onSelect: updateSelected,
262				minDate: dateFirstInterval,
263				maxDate: dateLastInterval
264			});
265		}
266		//カレンダー選択2
267		if($(".datepick2").length){
268			$( ".datepick2" ).datepicker({
269				showOn: "button",
270				//buttonImage: "/portal/common/img/ico_calendar02.gif",
271				buttonImageOnly: false,
272				buttonTextOnly: true,
273				beforeShow: readSelected,
274				onSelect: updateSelected,
275				minDate: dateFirstInterval,
276				maxDate: dateLastInterval
277			});
278		}
279	}
280
281	if($(".mdatepick1").length || $(".mdatepick2").length){
282		//å¹´
283		var stY = tYear-10;
284		var edU = tYear+1;
285		$(".year").each(function(){
286
287			$(this).empty().append('<option value="" />');
288			for(var i=stY;i<=edU;i++){
289				$(this).append('<option value="'+ i + '">'+ i + '</option>');
290			}
291		});
292		//月
293		$(".month").each(function(){
294			$(this).empty().append('<option value="" />');
295			for(var i=1;i<=12;i++){
296				$(this).append('<option value="'+ i + '">'+ (i<10 ? "0"+i:i) + '</option>');
297			}
298		});
299
300		$(".date").each(function(){
301			$(this).empty().append('<option value="" />');
302			for(var i=1;i<=31;i++){
303				$(this).append('<option value="'+ i + '">'+ (i<10 ? "0"+i:i) + '</option>');
304			}
305		});
306
307		$(".year,.month").change(function(){
308			if(!$(this).val()) return;
309			var Y=M="";
310			if($(this).hasClass("year")){
311				Y=$(this).val();
312				M=$(this).next().val() ? $(this).next().val():tMon;
313			}else{
314				Y=$(this).prev().val() ? $(this).prev().val():tYear;
315				M=$(this).val();
316			}
317			setDays($(this),Y,M);
318		});
319
320	}
321	//コンボボックス
322	if($(".comboBox").length){
323		$( ".comboBox" ).combobox();
324	}
325
326	//ヘッダ部商品名・メーカー名・型番入力 オートコンプリート
327	if($(".catSearch").length){
328		$( ".catSearch" ).autocomplete({
329			source: "/portal/common/inc/test.php",//データソース検索プログラム
330			minLength: 2 //検索開始入力文字数
331		});
332	}
333	//行追加
334	// start DIS-NET4 非互換改修パターン:jQuery(6)
335	$(".trAdRow").on('click',function(){
336	// end DIS-NET4 非互換改修パターン:jQuery(6)
337		var tBody = $(this).closest(".baseTbody");
338		var rowLen = tBody.find("tr").length;
339		$(this).hide();
340		tBody.append('<tr id="_addrow_'+rowLen+ '"><td><div><input type="text" name="" id="" class="w246" /></div></td><td><div><a href="#" class="trAdRow"><img class="over" alt="入力項目を追加" src="/portal/common/img/btn/btn_inputadd01_no.gif"></a></div></td><td class="inputcheck01"><div><label for="_delrow_'+rowLen+ '"><input type="checkbox" name="" id="_delrow_'+rowLen+ '" class="trDelRow" />削除</label></div></td></tr>');
341		return false;
342	});
343	//行削除
344	// start DIS-NET4 非互換改修パターン:jQuery(6)
345	$(".trDelRow").on('click',function(){
346	// end DIS-NET4 非互換改修パターン:jQuery(6)
347		var tBody = $(this).closest(".baseTbody");
348		$(".trAdRow").hide();
349		tBody.find("#"+this.id.replace("_delrow","_addrow")).remove();
350		var rowLen = tBody.find("tr").length-1;
351		tBody.find("tr").eq(rowLen).find(".trAdRow").show();
352		return false;
353	});
354
355	//ツールチップ
356	setToolTip();
357
358/** 2016.09.12 DEL DIS START **/
359/*
360	//ツールチップ
361	if($(".popTip").length){
362		//IE7だけ横位置の取得がおかしい
363		var ie6 = (navigator.userAgent.indexOf("MSIE 6") != -1)? true : false;
364		var ie7 = (navigator.userAgent.indexOf("MSIE 7") != -1)? true : false;
365		var pos = ie7 ? -160:0;
366		var position={my:"bottom center"};
367		var cls="ui-tooltip-add";
368		$(".popTip").each(function(x){
369			var opt={
370					content:{text:''},
371					position:{my:position.my,viewport:$(this).parent(),adjust:{x:20,y:0},effect: false},
372					//hide:'click',
373					hide:{event:"noevent",inactive:1500,effect:function(offset){$(this).fadeOut();}},
374					style:{classes:cls},
375					show:{event:"noevent"}
376				};
377			opt.id = "pop"+x;
378			switch(true){
379			//プルダウン
380			case ($(this).hasClass("tipList")):
381				opt.content.text = $('.tipContent');
382				//ブラウザ調整
383				var pos1 = ie7 ?-500:-90;
384				opt.position={my:"right bottom",viewport:$(".balloonTip_entry01Wrap"),adjust:{x:pos1,y:0},effect: false};
385				opt.hide = {event:"click",target: $('.tipClose')};
386				opt.show = {event:"focus"};
387				opt.events = {};
388				break;
389			//確認ボタン
390			case ($(this).hasClass("tipConf")):
391				opt.content.text = $('.tipContent');
392				//ブラウザ調整
393				var pos1 = ie6 ? -200: ie7 ?-210:32;
394				var pos2 = isUA.ie() ? ie6 ? 20: ie7 ? 10:-15:isUA.fx() ? 10: 20;
395				opt.position={my:"bottom center",viewport:$(this).parent(),adjust:{x:pos1,y:pos2},effect: false};
396				opt.show = {event:"click"};
397				opt.events = {};
398				break;
399			case ($(this).hasClass("addDif")):
400				opt.content.text = '<img src="/portal/pub/prod/img/img_pop01.png" alt="比較表に追加しました。" width="216" height="152" class="png popup01" />';
401				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
402				//opt.position.adjust={x:20+pos,y:(isUA.ie()?-20:0)};
403				opt.events = {};
404				break;
405			case ($(this).hasClass("addLike")):
406				opt.content.text = '<img src="/portal/pub/prod/img/img_pop02.png" alt="お気に入りへ追加しました。" width="237" height="152" class="png popup01" />';
407				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
408				//opt.position.adjust={x:20+pos,y:(isUA.ie()?-20:0)};
409				opt.events = {};
410				break;
411			case ($(this).hasClass("addCart")):
412				opt.content.text = '<img src="/portal/pub/prod/img/img_pop03.png" alt="カートへ追加しました。" width="237" height="152" class="png" />';
413				//opt.position.adjust={x:35,y:(isUA.ie()?-20:-5)};
414				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
415				//opt.position.adjust={x:35+pos,y:(isUA.ie()?-20:-5)};
416				opt.events = {};
417				break;
418			case ($(this).hasClass("doDownloadTip")):
419				opt.content.text = '<img src="/portal/pub/prod/img/img_pop05.png" alt="ダウンロードを受け付けました。" width="237" height="152" class="png" />';
420				//opt.position.adjust={x:35,y:(isUA.ie()?-20:-5)};
421				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
422				//opt.position.adjust={x:35+pos,y:(isUA.ie()?-20:-5)};
423				opt.events = {};
424				opt.show = {event:"click"};
425				break;
426			}
427			$(this).qtip(opt);
428		});
429	}
430*/
431/** 2016.09.12 DEL DIS END **/
432
433	//テーブルソート ページによってソート場所が違うため、セルにソート有無設定
434	if($(".tableSort").length){
435		$(".tableSort").tablesorter({widgets: ["zebra"]});
436		$(".tableSort").bind("sortEnd",function() {
437			$(".tableSort tbody tr").removeClass("first").removeClass("last");
438			$('.tableSort tbody tr:first-child:not(:last-child)').addClass('first');
439			$('.tableSort tbody tr:last-child').addClass('last');
440		});
441	}
442	//複雑なテーブルソート
443	if($(".tableSortCmp").length){
444		$(".tableSortCmp").tablesorter({widgets: ["zebra"]});
445		$(".tableSortCmp").bind("sortEnd",function() {
446			$(".tableSort tbody tr").removeClass("first").removeClass("last");
447			$('.tableSort tbody tr:first-child:not(:last-child)').addClass('first');
448			$('.tableSort tbody tr:last-child').addClass('last');
449		});
450		//ヘッダークリック時
451		// start DIS-NET4 非互換改修パターン:jQuery(6)
452		$(".optSort").on('click',function(){
453		// end DIS-NET4 非互換改修パターン:jQuery(6)
454			var _self = $(this);
455			var sortKey = $(this).attr("sort-col");
456			var sortType = $(this).hasClass("optSortUp") ? "asc":"desc";
457			$.ajax({
458				url:"/portal/common/inc/sort.php",
459				cache: false,
460				data:"col="+sortKey+"&type="+sortType,
461				dataType: "json",
462				success:function(data) {
463					_self.removeClass("optSortUp optSortDown").addClass(sortType=="asc" ? "optSortDown":"optSortUp");
464					if(data.length){
465						$(".tableSortCmp tbody").empty();
466						for(var i in data){
467							//取得データを追加
468							$(".tableSortCmp tbody").append("<tr><td>111</td><td>"+data[i].value+"</td></tr>");
469						}
470						$(".tableSortCmp").trigger("update");
471					}
472				}
473			});
474			return false;
475		});
476	}
477	//カルーセル画像クリック
478	if($(".setLightbox").length){
479		var img1txt,img2txt,img1;
480		$(".setLightbox li").each(function(){
481			$(this).find("a").click(function(){
482				img1 = $(this).find("img").attr("src");
483				img1txt = $(this).find("img").attr("alt");
484				img2txt = $(this).attr("title");
485				$("#itemImg a img").not("[name='zoom']").attr("src",img1);
486                var imgNew = new Image();
487                imgNew.src = img1;
488                var width  = imgNew.width;  // 幅
489                var height = imgNew.height; // 高さ
490                if (width > height) {
491                  if (width > 250) {
492                    height = height * (250 / width);
493                    width = 250;
494                  }
495                } else {
496                  if (height > 250) {
497                    width = width * (250 / height);
498                    height = 250;
499                  }
500                }
501                if (width > 0 && height > 0) {
502                  $("#itemImg a img").not("[name='zoom']")[0].width = width;
503                  $("#itemImg a img").not("[name='zoom']")[0].height = height;
504                }
505       	        $("#itemImg a").attr("href",img1).attr("title",img1txt);
506				$("#chushaku").text(img2txt);
507				return false;
508			});
509		});
510	}
511
512    if ($("#itemImg a img").not("[name='zoom']").length) {
513        var imgFunc = function() {
514          var imgNew = new Image();
515          imgNew.src = $("#itemImg a img").not("[name='zoom']")[0].src;
516          var width  = imgNew.width;  // 幅
517          var height = imgNew.height; // 高さ
518          if (width > height) {
519            if (width > 250) {
520              height = height * (250 / width);
521              width = 250;
522            }
523          } else {
524            if (height > 250) {
525              width = width * (250 / height);
526              height = 250;
527            }
528          }
529          if (width > 0 && height > 0) {
530            $("#itemImg a img").not("[name='zoom']")[0].width = width;
531            $("#itemImg a img").not("[name='zoom']")[0].height = height;
532          }
533        };
534        imgFunc.call(this);
535        setTimeout(imgFunc, 100);
536    }
537
538    if (navigator.userAgent.indexOf("MSIE 6") != -1 &&
539            $("img[class^=itemImgMaxWH]").length) {
540        var itemImgResize = function() {
541            $("img[class^=itemImgMaxWH]").each(function() {
542                var clazz = $(this).attr("class");
543                var size = clazz.substring(clazz.indexOf("itemImgMaxWH") +
544                    "itemImgMaxWH".length);
545                if (size.indexOf(" ") > 0) {
546                    size = size.substring(0, size.indexOf(" "));
547                }
548                var imgNew = new Image();
549                imgNew.src = $(this)[0].src;
550                var width  = imgNew.width;  // 幅
551                var height = imgNew.height; // 高さ
552                if (width > height) {
553                    if (width > size) {
554                        height = ~~(height * (size / width));
555                        width = size;
556                    }
557                } else {
558                    if (height > size) {
559                        width = ~~(width * (size / height));
560                        height = size;
561                    }
562                }
563                if (width > 0 && height > 0) {
564                    $(this)[0].width = width;
565                    $(this)[0].height = height;
566                }
567            });
568        };
569        itemImgResize.call(this);
570    }
571
572	// pre load image
573	var preLoadImg = $('<img/>');
574	preLoadImg.attr('src', "/portal/common/img/lightbox/loading.gif");
575});
576
577function changeMenu(menu1, menu2) {
578
579    var status;
580    if (menu2 == "gNavi") {
581        status = "1";
582    } else {
583        status = "2";
584    }
585
586    // ajaxによる呼び出し
587    $.ajax({
588        type: "POST",
589        url: "/EO-CMS/keepMenuPosition.jsp",
590        data: "gnaviPos=" + status
591    });
592
593    $("#" + menu1).hide();
594    $("#" + menu2).show();
595
596}
597
598function hideMenu(pos) {
599    if ("1" == pos) {
600        $('#gNavi02').hide();
601    } else {
602        $('#gNavi').hide();
603    }
604}
605
606function headerSearch(url){
607
608    // 2度押し防止として、画面をロックする。
609    if (checkBeforeSubmit()) {return false;}
610
611    // 検索条件の取得
612/* 2021.12.29 DIS FIX START */
613    var mqsp = window.matchMedia('(max-width: 568px)');
614    if (!mqsp.matches && $('.search-area-select').css('display') == 'none') {
615        var category1 = $('#headerSearchForm > [name="selectBox01"]').val();
616    } else {
617        var category1 = $('#headerSearchForm [name="selectBox01"]').val();
618    }
619/* 2021.12.29 DIS FIX END */
620    
621    var category2 = $('#headerSearchForm [name="selectBox02"]').val();
622    var freeword = $('#headerSearchForm [name="text01"]').val();
623/* 2021.12.29 DIS FIX START */
624    if (mqsp.matches && $('.add-item_keyword div').length > 0) {
625        var jogaiword = $('#headerSearchForm .add-item_keyword [name="text02"]').val();
626    } else {
627        var jogaiword = $('#headerSearchForm [name="text02"]').val();
628    }
629/* 2021.12.29 DIS FIX END */
630
631    // JavaScript入力チェック(必須チェック)
632    var check = false;
633    if (category1 != null) { check = true; }
634    else { category1 = ""; }
635    if (category2 != null) { check = true; }
636    else { category2 = ""; }
637    if (!check && !freeword == "") { check = true; }
638    if (!check && !jogaiword == "") { check = true; }
639    if (!check) {
640        alert("検索条件は必ず入力してください。");
641        return false;
642    }
643
644    // 文字列数チェック
645    var freeLength=freeword.length;
646    var jogaiLength=jogaiword.length;
647
648    if (freeLength > 200) {
649    	alert("フリーワードは200文字以内で入力してください。");
650    	return false;
651    }
652
653    if (jogaiLength > 200) {
654    	alert("除外ワードは200文字以内で入力してください。");
655    	return false;
656    }
657
658    // 遷移先の設定
659/* 2016.09.30 DEL DIS START
660    if (url == "mobile") {
661      $('#headerSearchForm').attr('action', '/mobile/pub/prod/EOCCXX001_mlist.html/');
662    } else {
663      $('#headerSearchForm').attr('action', '/' + url + '/pub/prod/EOCCXX001_list.html/');
664    }
6652016.09.30 DEL DIS END */
666
667/* 2016.09.30 ADD DIS START */
668    var $window = $(window);
669
670    if(url == 'mobile' && $window.width() < 568) {
671    // スマホの挙動
672      $('#headerSearchForm').attr('action', '/mobile/pub/prod/EOCCXX001_mlist.html/');
673    } else if(url == 'mobile') {
674    // タブレットの挙動
675      $('#headerSearchForm').attr('action', '/portal/pub/prod/EOCCXX001_list.html/');
676    } else {
677    // PCの挙動
678      $('#headerSearchForm').attr('action', '/' + url + '/pub/prod/EOCCXX001_list.html/');
679    }
680/* 2016.09.30 ADD DIS END */
681
682    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'findProductInfoListExecute-method', value: 'method'}));
683    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.kensakuBtn', value:'1'}));
684    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuIcchiKbn', value:'1'}));
685    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuKbn', value:'1'}));
686
687    // カテゴリ大の設定
688    var categoryDaiNm = $('#headerSearchForm .dainm').val();
689    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryDaiNm', value: categoryDaiNm }));
690
691    var categoryDai = category1.substring(0, 2);
692    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryDaiCd', value: categoryDai }));
693
694/* 2021.12.29 FIX DIS START */
695    // カテゴリ中の設定
696    var categoryChu = category2.substring(0, 2);
697    if (categoryChu.length > 0) {
698      $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuCd', value: categoryChu }));
699    } else {
700      $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuCd', value: "" }));
701    }
702
703	// カテゴリ小の設定
704    var categorySho = "";
705    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryShoCd', value: categorySho }));
706/* 2021.12.29 FIX DIS END */
707
708    // フリーワードの設定
709    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.freeWord', value: freeword }));
710
711    // 除外ワードの設定
712    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.jogaiWord', value: jogaiword }));
713
714    // 20210730 MCC中本追加 start
715    // コードの設定
716    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cd', value: "" }));
717    
718    // カテゴリ中の設定
719	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuNm', value: "" }));
720	
721	// カテゴリ小の設定
722	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryShoNm', value: "" }));
723	
724	// メーカー名の設定
725	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.mkNm', value: "" }));
726	// 20210730 MCC中本追加 end
727	
728	// 20211112 DIS相澤追加 start
729	// ページの設定
730	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.page', value: '0' }));
731	// 20211112 DIS相澤追加 end
732	
733    lockDisp();
734    // 送信する
735    $('#headerSearchForm')[0].submit();
736
737    // 元のsubmitイベントはキャンセル
738    return false;
739}
740
741function categorySearch(url){
742
743    // 2度押し防止として、画面をロックする。
744    if (checkBeforeSubmit()) {return false;}
745
746    // 検索条件の取得
747    var freeword = $('#headerSearchForm [name="text01"]').val();
748    var jogaiword = $('#headerSearchForm [name="text02"]').val();
749
750    // JavaScript入力チェック(必須チェック)
751    var check = false;
752    if (!check && !freeword == "") { check = true; }
753    if (!check) {
754        alert("キーワードは必ず入力してください。");
755        return false;
756    }
757
758    // 遷移先の設定
759    $('#headerSearchForm').attr('action', '/portal/EOCCAK001_2list.html/');
760    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'findContentsListExecute-method', value: 'method'}));
761
762    // フリーワードの設定
763    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCAK001E06I01.keyword', value: freeword }));
764
765    // 除外ワードの設定
766    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCAK001E06I01.jogaiKeyword', value: jogaiword }));
767
768    // ページの設定
769    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCAK001E06I01.page', value:'0' }));
770
771    lockDisp();
772    // 送信する
773    $('#headerSearchForm')[0].submit();
774
775    // 元のsubmitイベントはキャンセル
776    return false;
777}
778
779function sideCategorySearch(categoryCode,url){
780
781    // 2度押し防止として、画面をロックする。
782    if (checkBeforeSubmit()) {return false;}
783
784    // JavaScript入力チェック(必須チェック)
785    var check = false;
786
787    if (categoryCode == "") {
788        alert("検索条件は必ず入力してください。");
789        return false;
790    }
791
792    // 遷移先の設定
793    $('#headerSearchForm').attr('action', '/' + url + '/pub/prod/EOCCXX001_list.html/');
794    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'findProductInfoListExecute-method', value: 'method'}));
795    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.kensakuBtn', value:'1'}));
796    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuIcchiKbn', value:'1'}));
797    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuKbn', value:'1'}));
798
799    // カテゴリの設定
800    var categoryDai = categoryCode.substring(0, 2);
801    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryDaiCd', value: categoryDai }));
802    
803    var categoryDaiNm = $('#headerSearchForm .dainm').val();
804    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryDaiNm', value: categoryDaiNm }));
805    
806    var categoryChu = categoryCode.substring(2, 4);
807    if (categoryChu == '00') {
808        categoryChu = '';
809    }
810    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuCd', value: categoryChu }));
811
812    var categoryChuNm = $('#headerSearchForm .chunm').val();
813    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuNm', value: categoryChuNm }));
814
815    var categorySho = categoryCode.substring(4, 6);
816    if (categorySho == '00') {
817        categorySho = '';
818    }
819    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryShoCd', value: categorySho }));
820
821    var categoryShoNm = $('#headerSearchForm .shonm').val();
822    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryShoNm', value: categoryShoNm }));
823
824    // フリーワードの設定
825    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.freeWord', value: '' }));
826
827    // 除外ワードの設定
828    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.jogaiWord', value: '' }));
829
830    // 送信する
831    $('#headerSearchForm')[0].submit();
832
833    // 元のsubmitイベントはキャンセル
834    return false;
835}
836
837function printerOptSearch(url){
838
839    // 2度押し防止として、画面をロックする。
840    if (checkBeforeSubmit()) {return false;}
841
842/* 2016.09.30 ADD DIS START */
843    var $window = $(window);
844
845    // 遷移先の設定
846    if(url == 'mobile' && $window.width() < 568) {
847      // スマホの挙動
848      $('#headerSearchForm').attr('action', '/mobile/pub/prod/EOCCXX001_mlist.html/');
849    } else if(url == 'mobile') {
850      // タブレットの挙動
851      $('#headerSearchForm').attr('action', '/portal/pub/prod/EOCCXX001_list.html/');
852    } else {
853      // PCの挙動
854      $('#headerSearchForm').attr('action', '/' + url + '/pub/prod/EOCCXX001_list.html/');
855    }
856/* 2016.09.30 ADD DIS END */
857
858    // 検索条件の設定
859    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'findProductInfoListExecute-method', value: 'method'}));
860    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.kensakuBtn', value:'1'}));
861    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuIcchiKbn', value:'1'}));
862    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.cdKensakuKbn', value:'1'}));
863    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryDaiCd', value: '05' }));
864    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryChuCd', value: '' }));
865    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.categoryShoCd', value: '' }));
866    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.optionAriNomi', value: '1' }));
867    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.kanbaihinFukumu', value: '1' }));
868
869    var freeword = $('#printernm').val();
870    // フリーワードの設定
871    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.freeWord', value: freeword }));
872    // 除外ワードの設定
873    $('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I01.jogaiWord', value: '' }));
874
875    // 送信する
876    $('#headerSearchForm')[0].submit();
877
878    // 元のsubmitイベントはキャンセル
879    return false;
880}
881
882function menuResize() {
883    //リスト幅を揃える
884    var max_width=0;
885    $('#gNavi ul li#gNav02 ul li').each( function() {
886        if ($(this).width() > max_width) {
887            max_width=$(this).width();
888        }
889    }).width(max_width);
890    if (max_width < 105) { max_width = 105 };
891    $('#gNavi ul li#gNav02 ul li').css({width:(max_width * 1.2)});
892
893    max_width=0;
894    $('#gNavi ul li#gNav03 ul li').each( function() {
895        if ($(this).width() > max_width) {
896            max_width=$(this).width();
897        }
898    }).width(max_width);
899    if (max_width < 105) { max_width = 105 };
900    $('#gNavi ul li#gNav03 ul li').css({width:(max_width * 1.2)});
901
902    max_width=0;
903    $('#gNavi ul li#gNav04 ul li').each( function() {
904        if ($(this).width() > max_width) {
905            max_width=$(this).width();
906        }
907    }).width(max_width);
908    if (max_width < 105) { max_width = 105 };
909    $('#gNavi ul li#gNav04 ul li').css({width:(max_width * 1.2)});
910
911    max_width=0;
912    $('#gNavi ul li#gNav05 ul li').each( function() {
913        if ($(this).width() > max_width) {
914            max_width=$(this).width();
915        }
916    }).width(max_width);
917    if (max_width < 105) { max_width = 105 };
918    $('#gNavi ul li#gNav05 ul li').css({width:(max_width * 1.2)});
919
920    max_width=0;
921    $('#gNavi ul li#gNav06 ul li').each( function() {
922        if ($(this).width() > max_width) {
923            max_width=$(this).width();
924        }
925    }).width(max_width);
926    if (max_width < 105) { max_width = 105 };
927    $('#gNavi ul li#gNav06 ul li').css({width:(max_width * 1.2)});
928
929    max_width=0;
930    $('#gNavi ul li#gNav07 ul li').each( function() {
931        if ($(this).width() > max_width) {
932            max_width=$(this).width();
933        }
934    }).width(max_width);
935    if (max_width < 105) { max_width = 105 };
936    $('#gNavi ul li#gNav07 ul li').css({width:(max_width * 1.2)});
937
938    max_width=0;
939    $('#gNavi ul li#gNav08 ul li').each( function() {
940        if ($(this).width() > max_width) {
941            max_width=$(this).width();
942        }
943    }).width(max_width);
944    if (max_width < 105) { max_width = 105 };
945    $('#gNavi ul li#gNav08 ul li').css({width:(max_width * 1.2)});
946
947    max_width=0;
948    $('#gNavi02 ul li#gNav02 ul li').each( function() {
949        if ($(this).width() > max_width) {
950            max_width=$(this).width();
951        }
952    }).width(max_width);
953    if (max_width < 105) { max_width = 105 };
954    $('#gNavi02 ul li#gNav02 ul li').css({width:(max_width * 1.2)});
955
956    max_width=0;
957    $('#gNavi02 ul li#gNav03 ul li').each( function() {
958        if ($(this).width() > max_width) {
959            max_width=$(this).width();
960        }
961    }).width(max_width);
962    if (max_width < 105) { max_width = 105 };
963    $('#gNavi02 ul li#gNav03 ul li').css({width:(max_width * 1.2)});
964
965    max_width=0;
966    $('#gNavi02 ul li#gNav04 ul li').each( function() {
967        if ($(this).width() > max_width) {
968            max_width=$(this).width();
969        }
970    }).width(max_width);
971    if (max_width < 105) { max_width = 105 };
972    $('#gNavi02 ul li#gNav04 ul li').css({width:(max_width * 1.2)});
973
974    max_width=0;
975    $('#gNavi02 ul li#gNav05 ul li').each( function() {
976        if ($(this).width() > max_width) {
977            max_width=$(this).width();
978        }
979    }).width(max_width);
980    if (max_width < 105) { max_width = 105 };
981    $('#gNavi02 ul li#gNav05 ul li').css({width:(max_width * 1.2)});
982
983    max_width=0;
984    $('#gNavi02 ul li#gNav06 ul li').each( function() {
985        if ($(this).width() > max_width) {
986            max_width=$(this).width();
987        }
988    }).width(max_width);
989    if (max_width < 105) { max_width = 105 };
990    $('#gNavi02 ul li#gNav06 ul li').css({width:(max_width * 1.2)});
991
992    max_width=0;
993    $('#gNavi02 ul li#gNav07 ul li').each( function() {
994        if ($(this).width() > max_width) {
995            max_width=$(this).width();
996        }
997    }).width(max_width);
998    if (max_width < 105) { max_width = 105 };
999    $('#gNavi02 ul li#gNav07 ul li').css({width:(max_width * 1.2)});
1000
1001    max_width=0;
1002    $('#gNavi02 ul li#gNav08 ul li').each( function() {
1003        if ($(this).width() > max_width) {
1004            max_width=$(this).width();
1005        }
1006    }).width(max_width);
1007    if (max_width < 105) { max_width = 105 };
1008
1009    $('#gNavi02 ul li#gNav08 ul li').css({width:(max_width * 1.2)});
1010
1011}
1012
1013function confirmLogout(url) {
1014	if (isCartInfoExist()) {
1015		jQconfirm("カートに商品があります。<br>カートの情報が消えてしまいますが、ログアウトしてよろしいですか?", function () {
1016			window.location.href = '/' + url + '/EOCCOL726E01.html';
1017		});
1018	} else {
1019		window.location.href = '/' + url + '/EOCCOL726E01.html';
1020	}
1021	return false;
1022}
1023
1024function jQconfirm(message, callback) {
1025	$('#confirm').modal({
1026		closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
1027		position: ["20%",],
1028		overlayId: 'confirm-overlay',
1029		containerId: 'confirm-container',
1030		zIndex: 9999,
1031		onShow: function (dialog) {
1032			var modal = this;
1033
1034			$('.message', dialog.data[0]).append(message);
1035
1036			// if the user clicks "yes"
1037			$('.yes', dialog.data[0]).click(function () {
1038				// call the callback
1039				if ($.isFunction(callback)) {
1040					callback.apply();
1041				}
1042				// close the dialog
1043				modal.close(); // or $.modal.close();
1044			});
1045		}
1046	});
1047}
1048
1049/*
1050 * カート情報を確認する
1051 */
1052function isCartInfoExist() {
1053
1054    // 確認ダイアログ表示
1055    var dislay = false;
1056
1057    // 送信パラメータを作成する
1058    var param = {};
1059    param['getCartSumJson-method'] = 'method';
1060
1061    // Ajax通信を開始する
1062    $.ajax({
1063        type : "POST",
1064        url : '/portalap/ajax/EOCCZZ701E62/EOCCZZ701E62A01.do',
1065        scriptCharSet : "UTF-8",
1066        data : param,
1067        dataType : 'json',
1068        success : function(data) {
1069            if (data != null
1070                    && data.gokeiShohinSu > 0) {
1071                dislay = true;
1072            }
1073        },
1074        error : function(req, textStatus, errorThrown) {
1075            // TODO 処理がエラーになった場合
1076            dislay = false;
1077        },
1078        async : false
1079    });
1080
1081    return dislay;
1082
1083}
1084
1085/*
1086 * カート種類数を表示する
1087 */
1088function dispCartQty() {
1089    var afterDispCartQty = function() {
1090	    if (ot.doubleSubmission.isBlocked()) {
1091	        setTimeout(dispCartQty, 100);
1092	    	return false;
1093	    }
1094
1095	    var $totalCatNum = $('._totalCatNum');
1096//	    $totalCatNum.text("0"); 2016.08.22 DIS DEL
1097
1098	    // 送信パラメータを作成する
1099	    var param = {};
1100	    param['getCartSumJson-method'] = 'method';
1101
1102	    // Ajax通信を開始する
1103	    $.ajax({
1104	        type : "POST",
1105	        url : '/portalap/ajax/EOCCZZ701E62/EOCCZZ701E62A01.do',
1106	        scriptCharSet : "UTF-8",
1107	        data : param,
1108	        dataType : 'json',
1109	        success : function(data) {
1110//	            $totalCatNum.hide(); 2016.08.22 DIS DEL
1111	            if (data != null && data.gokeiShohinSu > 0) {
1112	                $totalCatNum.text(data.gokeiShohinSu);
1113//	                $totalCatNum.show(); 2016.08.22 DIS DEL
1114	            }
1115//2016.08.22 DIS ADD
1116	            else {
1117	                $totalCatNum.text("0");
1118	            }
1119//2016.08.22 DIS ADD
1120	        },
1121	        error : function(req, textStatus, errorThrown) {
1122                $totalCatNum.text("0");
1123	        },
1124	        complete : function(req, textStatus) {
1125	            return;
1126	        },
1127	        async : false
1128	    });
1129
1130	    return;
1131    };
1132    setTimeout(afterDispCartQty, 0);
1133}
1134
1135/*
1136 * カート種類数を表示する
1137 */
1138function dispCartQty2() {
1139    var afterDispCartQty = function() {
1140	    if (ot.doubleSubmission.isBlocked()) {
1141	        setTimeout(dispCartQty, 100);
1142	    	return false;
1143	    }
1144
1145	    var $totalCatNum = $('._totalCatNum');
1146	    $totalCatNum.text("0");
1147
1148	    // 送信パラメータを作成する
1149	    var param = {};
1150	    param['getCartSumJson-method'] = 'method';
1151
1152	    // Ajax通信を開始する
1153	    $.ajax({
1154	        type : "POST",
1155	        url : '/portalap/ajax/EOCCZZ701E62/EOCCZZ701E62A01.do',
1156	        scriptCharSet : "UTF-8",
1157	        data : param,
1158	        dataType : 'json',
1159	        success : function(data) {
1160	            if (data != null ) {
1161	                $totalCatNum.text(data.gokeiShohinSu);
1162	            }
1163	        },
1164	        error : function(req, textStatus, errorThrown) {
1165                $totalCatNum.text("0");
1166	        },
1167	        complete : function(req, textStatus) {
1168	            return;
1169	        },
1170	        async : false
1171	    });
1172
1173	    return;
1174    };
1175    setTimeout(afterDispCartQty, 0);
1176}
1177
1178function setKikankbn() {
1179	// ajaxによる呼び出し
1180	$.ajax({
1181		async: false,
1182		type: "GET",
1183		url: "/EO-CMS/setKikankbn.jsp"
1184	});
1185}
1186
1187function resetKikankbn() {
1188	// ajaxによる呼び出し
1189	$.ajax({
1190		async: false,
1191		type: "GET",
1192		url: "/EO-CMS/resetKikankbn.jsp"
1193	});
1194}
1195
1196function loginCheck() {
1197    var user = $('#loginForm [name="IdatenUserId"]').val();
1198    var pswd = $('#loginForm [name="IdatenPassWord"]').val();
1199
1200    // JavaScript入力チェック(必須チェック)
1201    if (user == "" || pswd == "") {
1202        alert("ユーザーIDまたはパスワードが入力されていません。");
1203        return false;
1204    }
1205    return true;
1206}
1207
1208function lockDisp() {
1209	var imgWidth = ($(window).width() / 2) + $(window).scrollLeft();
1210	var imgHeight = ($(window).height() / 2) + $(window).scrollTop();
1211
1212	var div = $("<div>", {id: 'lockScreen', style: 'position:absolute; left:0; top:0; width:' + $(document).width() + 'px; height:' + $(document).height() +'px;color:#AAA;background:#AAA;opacity:0.3;filter:alpha(opacity=80);z-index:9998;'});
1213	var img = $("<img>", {src: '/portal/common/img/lightbox/loading.gif', style: 'position:absolute; left:' + imgWidth + 'px; top:' + imgHeight + 'px;z-index:9999;'} );
1214
1215	div.append(img);
1216	$('body').append(div);
1217}
1218
1219function unlockDisp() {
1220	$("#lockScreen").remove();
1221}
1222
1223function linkEOCCXX005(url) {
1224	var sohin = $('[name="eOCCXX005E01R01.data.shohinCd"]').val();
1225
1226	if(checkBeforeSubmit()) {return false;};
1227
1228	// Form作成
1229
1230	if (url == "portal") {
1231		var form = $('<form/>', {action: '/portal/pub/prod/EOCCXX005_2detail.html/', method: 'get'})
1232			.append($('<input/>', {type: 'hidden', name: 'findDataExecute-method', value: 'method'}))
1233			.append($('<input/>', {type: 'hidden', name: 'eOCCXX005E01I01.yobidasimotoKbn', value: '1'}))
1234			.append($('<input/>', {type: 'hidden', name: 'eOCCXX005E01I01.shohinCd', value: sohin}));
1235	} else {
1236		var form = $('<form/>', {action: '/mobile/pub/prod/EOCCXX005_mdetail.html/', method: 'get'})
1237			.append($('<input/>', {type: 'hidden', name: 'findDataExecute-method', value: 'method'}))
1238			.append($('<input/>', {type: 'hidden', name: 'eOCCXX005E01I01.yobidasimotoKbn', value: '1'}))
1239			.append($('<input/>', {type: 'hidden', name: 'eOCCXX005E01I01.shohinCd', value: sohin}));
1240	}
1241
1242	ot.doubleSubmission.setBlocked(true);
1243	// 送信
1244	form.appendTo(document.body)[0].submit();
1245
1246	return false;
1247}
1248
1249/*
1250 * 未読数を表示する
1251 */
1252
1253function getInformation() {
1254    var afterGetInformation = function() {
1255	    if (ot.doubleSubmission.isBlocked()) {
1256	        setTimeout(getInformation, 100);
1257	    	return false;
1258	    }
1259
1260	    var $infoMidokuNum = $('.info-number');
1261	    $infoMidokuNum.text("0");
1262
1263	    // 送信パラメータを作成する
1264	    var param = {};
1265	    param['getInformation-method'] = 'method';
1266
1267	    // Ajax通信を開始する
1268	    $.ajax({
1269	        type : "POST",
1270	        url : '/portalap/ajax/EOCCZZ701E46/EOCCZZ701E46A01.do',
1271	        scriptCharSet : "UTF-8",
1272	        data : param,
1273	        dataType : 'json',
1274	        success : function(data) {
1275	            if (data != null ) {
1276	            	if(data.goannailist.midokuSu == 0){
1277	            		$infoMidokuNum.hide();
1278	            	}
1279	            	else{
1280	            		$infoMidokuNum.text(data.goannailist.midokuSu);
1281	            	}
1282	                var $balloon = $('#put-info').find('ul');
1283	                $balloon.empty();
1284	                var len = data.goannailist.list5.length;
1285	        		for (var i = 0; i < len; i++) {
1286	        			var list5 = data.goannailist.list5[i];
1287	        			var keisaibi = list5.keisaiKaisibi;
1288	        			var date = keisaibi.split(".");
1289	        			var year = date[0];
1290	        			var month = date[1];
1291	        			var day = date[2];
1292	        			var midokuKbn = list5.midokuKbn;
1293		                content = '<li>';
1294
1295		    			content += '<div class="date-container">';
1296		    			content += '<div class="date-box">';
1297		    			content += '<time datetime="' + year + '-' + month + '-' + day + '">' + year + '/' + month + '/' + day + '</time>';
1298		    			content += '<!-- /date-box --></div>';
1299		    			content += '<!-- /container --></div>';
1300		    			content += '<div class="txt-container">';
1301		    			if(midokuKbn == "0"){
1302		    				content += '<i class="badge-number">!</i>';
1303		    			}
1304
1305		    			if(list5.yusenKbn == 2){
1306		    				if(list5.linkUrl == null){
1307		    					content += '<p>'+ list5.infoTitle +'</p>';
1308		    				}
1309		    				else{
1310		    					if(list5.linkSakiWindowKbn == "0"){
1311		    						content += '<p><a id="' + list5.infoCd + '" class="info-link" href="' + list5.linkUrl + '">' + list5.infoTitle + '</a></p>';//2016.08.29 MOD DIS
1312		    					}
1313		    					else if(list5.linkSakiWindowKbn == "1"){
1314			    					content += '<p><a id="' + list5.infoCd + '" class="info-link" href="' + list5.linkUrl + '" target="_BLANK" >' + list5.infoTitle + '</a></p>';//2016.08.29 MOD DIS
1315		    					}
1316		    				}
1317		    			}
1318		    			else if(list5.yusenKbn == 3){
1319							if(list5.linkUrl == null){
1320								content += '<p><img src="' + list5.banner + '" alt="' + list5.infoTitle + '" style="max-width:435px; max-height:50px;"/></p>';
1321		    				}
1322		    				else{
1323		    					if(list5.linkSakiWindowKbn == "0"){
1324		    						content += '<p><a id="' + list5.infoCd + '" class="info-link" href="' + list5.linkUrl + '"><img src="'
1325		    						+ list5.banner + '" alt="' + list5.infoTitle + '" style="max-width:435px; max-height:50px;"/></a></p>';//2016.08.29 MOD DIS
1326		    					}
1327		    					else if(list5.linkSakiWindowKbn == "1"){
1328		    						content += '<p><a id="' + list5.infoCd + '" class="info-link" href="' + list5.linkUrl + '" target="_BLANK"><img src="'
1329		    						+ list5.banner + '" alt="' + list5.infoTitle + '" style="max-width:435px; max-height:50px;"/></a></p>';//2016.08.29 MOD DIS
1330		    					}
1331		    				}
1332		    			}
1333		    			else if(list5.yusenKbn == 7){
1334		    				content += '<p class="pcls" id="' + list5.infoCd + '">' + list5.infoNaiyou + '</p>'; //2016.09.16 MOD DIS
1335		    			}
1336		    			content += '<!-- /container --></div>';
1337
1338		                $balloon.append(content);
1339	        		}
1340	        		if(len == 0){
1341	        			content = '<li>';
1342	        			content += '<div class="date-container">';
1343		    			content += '<div class="date-box">';
1344		    			content += '<!-- /date-box --></div>';
1345		    			content += '<!-- /container --></div>';
1346		    			content += '<div class="txt-container">';
1347		    			content += '<p>営業からのご案内はありません。</p>';
1348		    			content += '<!-- /container --></div>';
1349		    			$balloon.append(content);
1350	        		}
1351//2016.09.16 ADD DIS START
1352					$(".pcls").find("a").each(function(){
1353						$(this).addClass("info-link");
1354						$(this).attr("id", $(this).parent().attr("id"));
1355					});
1356//2016.09.16 ADD DIS END
1357	                 $(".info-link").bind("click", function(){
1358//2016.09.16 ADD DIS START
1359						if($(this).closest('li').find('.badge-number').length == 0){
1360							return;
1361						}
1362//2016.09.16 ADD DIS END
1363//2016.08.18 DEL DIS
1364//		       	    	 function readInformation() {
1365//		       	 		    var afterGetInformation = function() {
1366//2016.08.18 DEL DIS
1367		       	 			    if (ot.doubleSubmission.isBlocked()) {
1368		       	 			        setTimeout(getInformation, 100);
1369		       	 			    	return false;
1370		       	 			    }
1371
1372		       	 			    // 送信パラメータを作成する
1373		       	 			    var param = {};
1374		       	 			    param['readInformation-method'] = 'method';
1375		       	 			    param['eOCCZZ701E46A01I01.infoCd'] = $(this).attr('id'); //2016.08.18 ADD DIS
1376		       	 			    // Ajax通信を開始する
1377		       	 			    $.ajax({
1378		       	 			        type : "POST",
1379		       	 			        url : '/portalap/ajax/EOCCZZ701E46/EOCCZZ701E46A01.do',
1380		       	 			        scriptCharSet : "UTF-8",
1381		       	 			        data : param,
1382		       	 			        dataType : 'json',
1383		       	 			        success : function(data) {
1384		       	 			            getInformation(); //2016.08.18 ADD DIS
1385		       	 			        },
1386		       	 			        error : function(req, textStatus, errorThrown) {
1387		       	 			        },
1388		       	 			        complete : function(req, textStatus) {
1389		       	 			            return;
1390		       	 			        },
1391		       	 			        async : false
1392		       	 			    });
1393
1394		       	 			    return;
1395//2016.08.18 DEL DIS
1396//		       	 		    };
1397//		       	 		   setTimeout(afterGetInformation, 0);
1398//		       	    	 }
1399//
1400//		       	    	 readInformation();
1401//		       	    	 return true;
1402//2016.08.18 DEL DIS
1403		       	     });
1404	            }
1405	        },
1406	        error : function(req, textStatus, errorThrown) {
1407                $infoMidokuNum.text("0");
1408	        },
1409	        complete : function(req, textStatus) {
1410	            return;
1411	        },
1412	        async : false
1413	    });
1414
1415	    return;
1416    };
1417    setTimeout(afterGetInformation, 0);
1418}
1419
1420//2016.09.12 ADD DIS START
1421function setToolTip(){
1422    //ツールチップ
1423	if($(".popTip").length){
1424		//IE7だけ横位置の取得がおかしい
1425		var ie6 = (navigator.userAgent.indexOf("MSIE 6") != -1)? true : false;
1426		var ie7 = (navigator.userAgent.indexOf("MSIE 7") != -1)? true : false;
1427		var pos = ie7 ? -160:0;
1428		var position={my:"bottom center"};
1429		var cls="ui-tooltip-add";
1430
1431		$(".popTip").each(function(x){
1432			var opt={
1433					content:{text:''},
1434					position:{
1435						my:position.my,
1436						at:'top center',
1437						viewport:$(this).parent(),adjust:{x:20,y:0},effect: false},
1438					//hide:'click',
1439					hide:{event:"noevent",inactive:1500,effect:function(offset){$(this).fadeOut();}},
1440					style:{classes:cls},
1441					show:{event:"noevent"}
1442				};
1443			opt.id = "pop"+x;
1444			switch(true){
1445			//プルダウン
1446			case ($(this).hasClass("tipList")):
1447				opt.content.text = $('.tipContent');
1448				//ブラウザ調整
1449				var pos1 = ie7 ?-500:-90;
1450				opt.position={my:"right bottom",viewport:$(".balloonTip_entry01Wrap"),adjust:{x:pos1,y:0},effect: false};
1451				opt.hide = {event:"click",target: $('.tipClose')};
1452				opt.show = {event:"focus"};
1453				opt.events = {};
1454				break;
1455			//確認ボタン
1456			case ($(this).hasClass("tipConf")):
1457				opt.content.text = $('.tipContent');
1458				//ブラウザ調整
1459				var pos1 = ie6 ? -200: ie7 ?-210:32;
1460				var pos2 = isUA.ie() ? ie6 ? 20: ie7 ? 10:-15:isUA.fx() ? 10: 20;
1461				opt.position={my:"bottom center",viewport:$(this).parent(),adjust:{x:pos1,y:pos2},effect: false};
1462				opt.show = {event:"click"};
1463				opt.events = {};
1464				break;
1465			case ($(this).hasClass("addDif")):
1466				opt.content.text = '<div style="width:216px;height:152px;"><img src="/portal/pub/prod/img/img_pop01.png" alt="比較表に追加しました。" width="216" height="152" class="png popup01" /></div>';
1467				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
1468				//opt.position.adjust={x:20+pos,y:(isUA.ie()?-20:0)};
1469				opt.events = {};
1470				break;
1471			case ($(this).hasClass("addLike")):
1472				opt.content.text = '<div style="width:237px;height:152px;"><img src="/portal/pub/prod/img/img_pop02.png" alt="お気に入りへ追加しました。" width="237" height="152" class="png popup01" /></div>';
1473				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
1474				//opt.position.adjust={x:20+pos,y:(isUA.ie()?-20:0)};
1475				opt.events = {};
1476				break;
1477			case ($(this).hasClass("addCart")):
1478				opt.content.text = '<div style="width:237px;height:152px;"><img src="/portal/pub/prod/img/img_pop03.png" alt="カートへ追加しました。" width="237" height="152" class="png" /></div>';
1479				//opt.position.adjust={x:35,y:(isUA.ie()?-20:-5)};
1480				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
1481				//opt.position.adjust={x:35+pos,y:(isUA.ie()?-20:-5)};
1482				opt.events = {};
1483				break;
1484			case ($(this).hasClass("doDownloadTip")):
1485				opt.content.text = '<div style="width:237px;height:152px;"><img src="/portal/pub/prod/img/img_pop05.png" alt="ダウンロードを受け付けました。" width="237" height="152" class="png" /></div>';
1486				//opt.position.adjust={x:35,y:(isUA.ie()?-20:-5)};
1487				opt.position={my: 'bottom center', at: 'top center', adjust: {x:-10, y:10}};
1488				//opt.position.adjust={x:35+pos,y:(isUA.ie()?-20:-5)};
1489				opt.events = {};
1490				opt.show = {event:"click"};
1491				break;
1492			}
1493			$(this).qtip(opt);
1494		});
1495	}
1496}
1497//2016.09.12 ADD DIS END
1498
1499window.onunload = function(){};
1500
1501/**
1502 * カートサマリ情報をAjaxで取得して画面に表示します.
1503 * カートサマリ情報の表示領域がない場合は何もせず終了します。
1504 *
1505 * @param onComplete Ajaxのcomplete時に実行する関数
1506 */
1507function getCartSummary2(onComplete) {
1508
1509    if (checkBeforeSubmit()) {return false;}
1510
1511    var $totalPrice = $('.nav-dropdown-cart-total-price span');
1512    var $totalCatNum = $('.nav-dropdown-cart-total-count span');
1513    var $totalNum = $('.content-number');
1514
1515    // カートサマリ情報の表示領域がない場合は何もしない
1516    if ($totalPrice.length == 0 &&
1517            $totalCatNum.length == 0 ) { //&& $totalNum.length == 0) {
1518
1519        return;
1520    }
1521
1522    var param = {};
1523
1524    // メソッド名
1525    param['getCartSumJson-method'] = 'method';
1526
1527    // 2度押し防止として、画面をロックする。
1528     ot.doubleSubmission.setBlocked(true);
1529
1530    // Ajax通信を開始する
1531    $.ajax({
1532      type : "POST",
1533      url : "/portalap/ajax/EOCCZZ701E62/EOCCZZ701E62A01.do",
1534      scriptCharSet : "UTF-8",
1535      data : param,
1536      dataType : "json",
1537      success : function(outputData) {
1538
1539          if(checkJsonError(outputData)){
1540              // エラーがある場合は、何もしない
1541              return;
1542           }
1543
1544            // ヘッダやカート情報表示エリアのカートサマリを表示更新
1545
1546            // 合計金額 (表示形式:¥999,999,999,999)
1547            $totalPrice.text('ï¿¥' + addComma(outputData.gokeiKin));
1548            // 合計商品数 (999件)
1549            $totalCatNum.text(addComma(outputData.gokeiShohinSu) + 'ä»¶');
1550            $totalNum.text(addComma(outputData.gokeiShohinSu));
1551            // 合計商品点数 (999,999,999点)
1552            //$totalNum.text(addComma(outputData.gokeiShohinTenSu));
1553
1554        return;
1555      },
1556      error : function(req, textStatus, errorThrown) {
1557      return;
1558      },
1559      complete : function(req, textStatus) {
1560        // 画面のロックを解除する。
1561        ot.doubleSubmission.setBlocked(false);
1562
1563        // complete時に実行する関数があれば実行
1564        if (onComplete) {
1565            onComplete();
1566        }
1567        return;
1568      },
1569      async : false
1570    });
1571}
1572
1573/**
1574 * カート明細情報をAjaxで取得して画面に表示します.
1575 * カート明細情報の表示領域がない場合は何もせず終了します。
1576 *
1577 * @param onComplete Ajaxのcomplete時に実行する関数
1578 */
1579function getCartDetails2(onComplete) {
1580
1581    if (checkBeforeSubmit()) {return false;}
1582
1583    var $tbody = $('.nav-dropdown-cart-inner ul');
1584
1585    // カート明細情報の表示領域がない場合は何もしない
1586    if ($tbody.length == 0) {
1587        return;
1588    }
1589
1590    var param = {};
1591
1592    // メソッド名
1593    param['getCartListJson-method'] = 'method';
1594
1595    // 取得件数
1596    param['eOCCZZ701E63A01I01.shutokuKensu'] = '3';
1597
1598    // 2度押し防止として、画面をロックする。
1599     ot.doubleSubmission.setBlocked(true);
1600
1601    // Ajax通信を開始する
1602    $.ajax({
1603      type : "POST",
1604      url : "/portalap/ajax/EOCCZZ701E63/EOCCZZ701E63A01.do",
1605      scriptCharSet : "UTF-8",
1606      data : param,
1607      dataType : "json",
1608      success : function(outputData) {
1609
1610          if(checkJsonError(outputData)){
1611              // エラーがある場合は、何もしない
1612              return;
1613           }
1614
1615            // カート情報表示エリアのカート明細を表示更新
1616
1617            $tbody.empty();
1618
1619            // 取得できた明細行数分繰り返す
1620            var count = outputData.cartMeisai.length;
1621            for (var i = 0; i < count; i++) {
1622                var item = outputData.cartMeisai[i];
1623
1624$tbody.append($('<li/>', {class: 'nav-dropdown-cart-product'})
1625	.append($('<div/>', {class: 'nav-dropdown-cart-product-img'})
1626		.append('<img src="' + item.shohinGazoUrl + '" alt="' + item.daitaiText + '">'))
1627	.append($('<div/>', {class: 'nav-dropdown-cart-product-info'})
1628		.append($('<div/>', {class: 'nav-dropdown-cart-product-name'})
1629			.append('<a href="/portal/pub/prod/EOCCXX005_2detail.html/?findDataExecute-method=method&eOCCXX005E01I01.yobidasimotoKbn=1&eOCCXX005E01I01.shohinCd=' + item.shohinCd +'"><p>' + item.shohinNm + '</p></a>')
1630		)
1631		.append($('<div/>', {class: 'nav-dropdown-cart-product-state'})
1632			.append('<p class="nav-dropdown-cart-product-quantity">数量:<span>' + addComma(item.su) + '</span></p>')
1633			.append('<p class="nav-dropdown-cart-product-price"><span>¥' + addComma(item.hanbaiKakaku) + '</span>(税抜)</p>')
1634		)
1635	)
1636);
1637            }
1638        return;
1639      },
1640      error : function(req, textStatus, errorThrown) {
1641      alert("正常に処理を完了することができませんでした。\nお手数ですが、再度ログインをしなおしてから操作してください。");
1642      return;
1643      },
1644      complete : function(req, textStatus) {
1645        // 画面のロックを解除する。
1646        ot.doubleSubmission.setBlocked(false);
1647
1648        // complete時に実行する関数があれば実行
1649        if (onComplete) {
1650            onComplete();
1651        }
1652        return;
1653      },
1654      // async : true
1655      // 20210825追加
1656      async : false
1657    });
1658}
1659
1660$(document).ready(function() {
1661	/*
1662	 * カートサマリ情報の取得・表示更新
1663	 * カート明細情報の取得・表示更新
1664	 * の2つのAjax処理を順番に実行
1665	 */
1666	var isCartArea = $(".cart-button").length;
1667	if (isCartArea > 0) {
1668		$('.nav-dropdown-cart-inner ul').empty();
1669		$('.nav-dropdown-cart-total-price span').empty();
1670		$('.nav-dropdown-cart-total-count span').empty();
1671		$(".content-number").addClass("_totalCatNum");
1672		$(".cart-button").on("mouseenter", function() {
1673			getCartSummary2(function () {getCartDetails2();});
1674		});
1675		$(".cart-button").trigger("mouseenter");
1676	}
1677
1678	/*
1679	 * フリーワード検索
1680	 */
1681	if ($('.search-area-form').length > 0) {
1682		/* 2021.09.30 ADD DIS START */
1683		$('.search-area-form-pulldown-inner-item > a').on("click", function() {
1684			$('.search-area-form-pulldown-button').text($(this).text().substring(0,7));
1685			$('#headerSearchForm [name="selectBox01"]').val('');
1686			$('#headerSearchForm .dainm').val('');
1687			$('#headerSearchForm .chunm').val('');
1688			$('#headerSearchForm .shonm').val('');
1689		});
1690		/* 2021.09.30 ADD DIS END */
1691
1692		$('.search-area-form').attr('id', 'headerSearchForm');
1693		$('#headerSearchForm').append($('<input/>', {type:"hidden", name:"selectBox01", value:""}));
1694		$('#headerSearchForm').append($('<input/>', {type:"hidden", class:"dainm", value:""}));
1695		$('#headerSearchForm').append($('<input/>', {type:"hidden", class:"chunm", value:""}));
1696		$('#headerSearchForm').append($('<input/>', {type:"hidden", class:"shonm", value:""}));
1697
1698		$('.search-area-form-pulldown-inner-item-column').empty();
1699		var optlist = "<ul>";
1700		var i = 0;
1701		var optionlen = $('#category-primary option').length;
1702		$('#category-primary option').each(function() {
1703			var opttxt =  $(this).text();
1704			var optval =  $(this).val();
1705			if (optval != "") {
1706				optlist = optlist + "<li id=" + optval.substring(0,2) + "><a href='#'>" + opttxt + "</a></li>";
1707			}
1708			if (i == Math.ceil(optionlen / 2) - 1) {
1709				optlist = optlist + "</ul><ul>";
1710			}
1711			i++;
1712		});
1713		optlist = optlist + "</ul>";
1714		$('.search-area-form-pulldown-inner-item-column').append($(optlist));
1715
1716		$('.search-area-form-pulldown-inner-item-column ul li a').on("click", function() {
1717			$('.search-area-form-pulldown-button').text($(this).text().substring(0,7));
1718			$('#headerSearchForm [name="selectBox01"]').val($(this).parent().attr("id"));
1719			$('#headerSearchForm .dainm').val($(this).text());
1720			$('#headerSearchForm .chunm').val('');
1721			$('#headerSearchForm .shonm').val('');
1722		});
1723
1724		$('.nav-dropdown-category > ul > li > a').on("click", function() {
1725			$('#headerSearchForm .dainm').val($(this).text());
1726			$('#headerSearchForm .chunm').val('');
1727			$('#headerSearchForm .shonm').val('');
1728		});
1729
1730		$('.nav-dropdown-category .sub-category > ul > li > a').on("click", function() {
1731			$('#headerSearchForm .dainm').val($(this).closest('.sub-category').children('span').text());
1732			$('#headerSearchForm .chunm').val($(this).text());
1733			$('#headerSearchForm .shonm').val('');
1734		});
1735
1736		if ($('[name="eOCCXX001E01I01.categoryDaiCd"]').length > 0) {
1737			$('#'+ $('[name="eOCCXX001E01I01.categoryDaiCd"]').val() + ' a').trigger("click");
1738		}
1739	}
1740
1741	/*
1742	 * カテゴリから探すパッチ
1743	 */
1744	if ($('.nav-dropdown-category ul li').length > 0) {
1745		$('.nav-dropdown-category ul li').each(function() {
1746$(this).find('.sub-category').hide();
1747			$(this).hover(
1748				function () {
1749					$(this).find('.sub-category').show();
1750					$(this).find('.sub-category').addClass('this_active');
1751				},
1752				function () {
1753					$(this).find('.sub-category').removeClass('this_active');
1754$(this).find('.sub-category').hide();
1755				}
1756			);
1757		});
1758	}
1759
1760//2024.12.10 ADD START
1761	$(document).on('click', 'a', function(e) {
1762		//2024.12.11 ADD START
1763		if(!$(this).attr('href')){
1764			return;
1765        }
1766		//2024.12.11 ADD END
1767
1768		var url = new URL($(this).prop('href'));
1769		var path = url.pathname;
1770		var arr = path.split("/");
1771		var fileName = arr[arr.length-1];
1772
1773	    var param = {};
1774	    param["eOCCZZ701E70A01I01.path"] = path;
1775	    param["eOCCZZ701E70A01I01.fileName"] = fileName;
1776	    param['fileDownloadLog-method'] = 'method';
1777
1778	    // 2度押し防止として、画面をロックする。
1779	     ot.doubleSubmission.setBlocked(true);
1780
1781	    // Ajax通信を開始する
1782	    $.ajax({
1783	      type : "POST",
1784	      url : "/portalap/ajax/EOCCZZ701E70/EOCCZZ701E70A01.do",
1785	      scriptCharSet : "UTF-8",
1786	      data : param,
1787	      dataType : "json",
1788	      success : function(outputData) {
1789	    	  return;
1790	      },
1791	      error : function(req, textStatus, errorThrown) {
1792	    	  return;
1793	      },
1794	      complete : function(req, textStatus) {
1795	        // 画面のロックを解除する。
1796	        ot.doubleSubmission.setBlocked(false);
1797	        return;
1798	      },
1799	      async : false
1800	    });
1801	});
1802//2024.12.10 ADD END
1803
1804});
1805
1806function searchContents(arg){
1807	// フリーワード
1808	var keyword = $('#headerSearchForm [name="text01"]').val();
1809	// 除外ワード
1810	var jogaiword = $('#headerSearchForm [name="text02"]').val();
1811	
1812	if(arg == 'solution'){
1813		$('#headerSearchForm').attr('action', '/portal/pub/prod/EOCCXX001_redirect.html/');
1814		$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'redirectExecute-method', value: 'method'}));
1815    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.keyword', value: keyword}));
1816    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.kensakukbn', value:'1'}));
1817	}
1818	else if(arg == 'movie'){
1819		$('#headerSearchForm').attr('action', '/portal/pub/prod/EOCCXX001_redirect.html/');
1820		$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'redirectExecute-method', value: 'method'}));
1821    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.keyword', value: keyword}));
1822    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.kensakukbn', value:'2'}));
1823	}
1824	else if(arg == 'site-content'){
1825		var check = false;
1826    	if (!check && !keyword == "") { check = true; }
1827    	if (!check) {
1828        	alert("キーワードは必ず入力してください。");
1829        	return false;
1830    	}
1831	
1832		$('#headerSearchForm').attr('action', '/portal/pub/prod/EOCCXX001_3list.html/');
1833		$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'findContentsListExecute-method', value: 'method'}));
1834		$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.page', value: 0}));
1835    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCXX001E01I03.keyword', value: keyword}));
1836    	$('#headerSearchForm').append($('<input/>', {type: 'hidden', name: 'eOCCOL729E02I01.jogaiKeyword', value: jogaiword}));
1837	}
1838	
1839	lockDisp();
1840    // 送信する
1841    $('#headerSearchForm')[0].submit();
1842
1843    // 元のsubmitイベントはキャンセル
1844    return false;
1845}
1846
1847//2021-08-18追加
1848// mobile向けマイアカウント/ショップ管理メニューの追加
1849$(document).ready(function() {
1850	var mqsp = window.matchMedia('(max-width: 568px)');
1851	if (mqsp.matches && $('.nav-genre-main li').length > 0) {
1852		// my account
1853		if ($('#m2menu5').length == 0 && $('.nav-dropdown-myaccount-column-item').length > 0) {
1854			var mainitem = $('<li class="nav-genre-main-item"><a id="m2menu5" href="#">マイアカウント</a></li>');
1855			var columnitem = $('<div/>');
1856			$('.nav-dropdown-myaccount-column-item').each(function() {
1857				columnitem
1858					.append($('<div/>').addClass('nav-genre-sub-column')
1859						.append($('<div/>').addClass('nav-genre-sub-column-item')
1860							.append($(this).html())));
1861			});
1862			mainitem.append($('<div/>').addClass('nav-genre-sub').append(columnitem));
1863			$('.nav-genre-main').append(mainitem);
1864		}
1865		// shop
1866		if ($('#m2menu6').length == 0 && $('.nav-dropdown-shop-column-item').length > 0) {
1867			var mainitem = $('<li class="nav-genre-main-item"><a id="m2menu6" href="#">ショップ管理</a></li>');
1868			var columnitem = $('<div/>');
1869			$('.nav-dropdown-shop-column-item').each(function() {
1870				columnitem
1871					.append($('<div/>').addClass('nav-genre-sub-column')
1872						.append($('<div/>').addClass('nav-genre-sub-column-item')
1873							.append($(this).html())));
1874			});
1875			mainitem.append($('<div/>').addClass('nav-genre-sub').append(columnitem));
1876			$('.nav-genre-main').append(mainitem);
1877		}
1878		
1879		// core-isolated.jsから引用
1880		var genreSp = $('.nav-genre').find('.nav-genre-main-item').children('a');
1881
1882		genreSp.each(function () {
1883			$(this).off('click');
1884
1885			var nestItem = $(this).closest('.nav-genre-main-item');
1886			nestItem.each(function () {
1887				if (!$(this).find('.nav-genre-sub').length) {
1888					$(this).find('a').addClass('rightarrow');
1889				}
1890			});
1891			$(this).on('click', function () {
1892				var nestItem2 = $(this).closest('.nav-genre-main-item').find('.nav-genre-sub').find('.nav-genre-sub-column-item');
1893				nestItem2.each(function () {
1894					if (!$(this).find('ul').length) {
1895						$(this).find('a').addClass('rightarrow');
1896					}
1897				});
1898
1899				if ($(this).closest('.nav-genre-main-item').find('.nav-genre-sub').is(':hidden')) {
1900					$(this).closest('.nav-genre-main-item').find('.nav-genre-sub').slideDown(300);
1901					$(this).addClass('this_active');
1902
1903					if (genreSp.not($(this)).is(':visible')) {
1904						genreSp.not($(this)).closest('.nav-genre-main-item').find('.nav-genre-sub').slideUp(300);
1905						genreSp.not($(this)).removeClass('this_active');
1906					}
1907				} else {
1908					$(this).closest('.nav-genre-main-item').find('.nav-genre-sub').slideUp(300);
1909					$(this).removeClass('this_active');
1910				}
1911			});
1912		});
1913
1914		var nestMenu = $('.nav-genre-sub-column-item').children('a');
1915
1916		nestMenu.each(function () {
1917			$(this).off('click');
1918			$(this).on('click', function () {
1919				if ($(this).closest('.nav-genre-sub-column-item').find('ul').is(':hidden')) {
1920					$(this).closest('.nav-genre-sub-column-item').find('ul').slideDown(300);
1921					$(this).addClass('this_active');
1922
1923					if (nestMenu.not($(this)).is(':visible')) {
1924						nestMenu.not($(this)).closest('.nav-genre-sub-column-item').find('ul').slideUp(300);
1925						nestMenu.not($(this)).removeClass('this_active');
1926					}
1927				} else {
1928					$(this).closest('.nav-genre-sub-column-item').find('ul').slideUp(300);
1929					$(this).removeClass('this_active');
1930				}
1931			});
1932		});
1933	}
1934});
1935
1936
1937
1938/*
1939 * オート次ページ表示スクロール
1940 * 2023.09.02 ADD
1941 *
1942 * appendTarget:次ページエレメントを追加したいスクロール内の特定のエレメント
1943 * maxPage:最大ページ数
1944 * getNext:次ページとなるHTMLエレメントを取得するためのメソッド
1945 * options:オプション
1946 *  isOnce:表示判定が一度のみ falseの場合は描画されるたびに実行する デフォルトTrue
1947 *  isAsync:次ページエレメントの取得がAPIなど非同期になる場合はTrueを設定 デフォルトTrue
1948 *  loadingContent:ロード中に表示するHTMLエレメント デフォルト<div>Loading</div>
1949 *  targetSelector:描画判定に使用するビューポートを持つエレメント デフォルトwindow
1950 *  threshold:監視対象がどれくらい表示されたら実行するか 0~1 デフォルト0.8
1951 *  wrapperCount:次ページ要素が階層的で表示判定監視対象が子要素となる場合に階層を指定する デフォルト0
1952 *  actionList:追加要素内に記載されているイベント(clickなã
1952©ã€€onは不要)配列で指定する 省略時はonclickのみケアする
1953 */
1954var createAutoPagenationScroll = (appendTarget, maxPage, getNext, options) => {
1955	var _maxPage = maxPage;
1956	var _getNext = getNext;
1957	var _$appendTarget = $(appendTarget);
1958
1959	var _page = 1; // 0ページ目は表示済みなので1スタート
1960	var _isLoading = false;
1961
1962	var _isOnce = true;
1963	var _isAsync = true;
1964	var _$loading = $("<div style='text-align: center'><img src='/portal/common/img/lightbox/loading.gif'></div>");
1965	var _targetElement = null;
1966	var _threshold = 0.8;
1967	var _wrapperCount = 0;
1968	var _actionList=["click"];
1969	if (options) {
1970		if (options.isOnce && typeof options.isOnce === typeof _isOnce) {
1971			_isOnce = options.isOnce;
1972		}
1973		if (options.isAsync && typeof options.isAsync === typeof _isAsync) {
1974			_isAsync = options.isAsync;
1975		}
1976		if (options.loadingContent && typeof options.loadingContent === typeof _$loading) {
1977			_$loading = options.loadingContent;
1978		}
1979		if (options.targetElement) {
1980			_targetElement = options.targetElement;
1981		}
1982		if (options.threshold && 0 <= options.threshold && 1 >= options.threshold) {
1983			_threshold = options.threshold;
1984		}
1985		if (options.wrapperCount && typeof options.wrapperCount === typeof _wrapperCount) {
1986			_wrapperCount = options.wrapperCount;
1987		}
1988		if (options.actionList && typeof options.actionList === typeof _actionList) {
1989			_actionList = options.actionList;
1990		}
1991	}
1992
1993	var options = {
1994		root: _targetElement,
1995		threshold: _threshold,
1996	}
1997
1998	const observer = new IntersectionObserver(
1999		entries => {
2000			entries.forEach(entry => {
2001				if (entry.intersectionRatio > 0) {
2002					if (_isOnce) {
2003						observer.unobserve(entry.target);
2004					}
2005					onVisible();
2006				}
2007			});
2008		}
2009		, options);
2010
2011	// 指定階層(wrapperCount)潜って子要素最後尾を取得する
2012	var getLastElement = (target) => {
2013		// 複数要素をJQueryオブジェクトで送られてきた場合は最後尾を取得する
2014		if (target.length && target.length > 1) {
2015			target = target.last();
2016		}
2017		var last = $(target);
2018		var count = 0;
2019		while (count < _wrapperCount) {
2020			last = last.children().last();
2021			count++;
2022		}
2023		return last.get(0);
2024	}
2025	var loadingOn = () => {
2026		_isLoading = true;
2027		_$appendTarget.append(_$loading);
2028	}
2029	var loadingOff = () => {
2030		_$loading.remove();
2031		_isLoading = false;
2032	}
2033
2034	var setNext = next => {
2035		// 直書きのイベントはDOM追加で機能しなくなるので、付けなおす
2036		// デフォルトではonclickのみ 追加はオプションで指定すること
2037		$.each(_actionList,(i,action)=>{
2038	    	var aList=$("[on"+action+"]",next);
2039	    	aList.each((n,val)=>{
2040	    		var _$this=$(val);
2041	    		var fx=_$this.attr("on"+action);
2042	    		if(fx){
2043	    			_$this.on(action,()=>{
2044	    				return Function(fx)();
2045	    			})
2046	    		}
2047	    	});
2048		});
2049		_$appendTarget.append(next);
2050
2051		// 次のページをセットしておく
2052		_page++;
2053		if (_maxPage <= _page) {
2054			// 最大ページなら終了しておく
2055			observer.disconnect();
2056			return;
2057		}
2058		setNewObserver(next);
2059	}
2060	var setNewObserver = (element, isFirst) => {
2061		// 子要素最後尾を監視対象に設定する
2062		var last = getLastElement(element);
2063		if (isFirst) {
2064			observer.disconnect();
2065			observer.observe(last);
2066		} else {
2067			// 描画後(スクロール外にいってから)監視を行う
2068			$(last).ready(() => {
2069				observer.disconnect();
2070				observer.observe(last);
2071			});
2072		}
2073	};
2074	var onVisible = () => {
2075		if (_isAsync) {
2076			if (_isLoading) {
2077				// ロード中であればスキップ
2078				return;
2079			}
2080			loadingOn();
2081			// 非同期ならコールバック付き呼び出し
2082			_getNext(_page, next => {
2083				setNext(next);
2084				loadingOff();
2085			});
2086		} else {
2087			var next = getNextSample(_page);
2088			setNext(next);
2089		}
2090	}
2091
2092	// 初期設定して開始
2093	setNewObserver(_$appendTarget.children().last().get(0), true);
2094}
2095/* end
2096 * オート次ページ表示スクロール
2097 */
2098

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.