PageSourceSearch

https://jpatholtm.org/script/user.js?t=20261002151614

js jpatholtm.org collected 2026-10-02 06:16:29 UTC 21,787 bytes, 825 lines download raw bytes

1var hideMenu = null,
2	hotBnr = null,
3	recentBnr = null,
4	sponBnr = null;
5
6jQuery(function($) {
7
8	var win_w = $(window).width();
9
10	if (win_w > 960) {
11//PC	
12		setting_pc();
13
14	} else {
15//Mobile	
16		setting_mobile();
17	}
18
19	if (hotBnr != null) {
20		hotBnr.destroySlider();
21		hotBnr = null;
22	}
23
24	$("dl.gnbSearch").on("click", "dt a", function(){
25		var sClass = $("dl.gnbSearch dt").attr("class");
26		if (sClass != "view") {
27			$("ul#gnb > li").removeClass("on");
28			$("ul#gnb ul").css('display', 'none');
29
30			$("dl.gnbSearch dt").addClass("view");
31			$("dl.gnbSearch dd").show();
32		} else {
33			$("ul#gnb ul").css('display', '');
34
35			$("dl.gnbSearch dt").removeClass("view");
36			$("dl.gnbSearch dd").hide();
37		}
38		
39		return false
40	});
41
42
43
44	if ($("div.articleBrief").length) {
45		$("div#container").addClass("article");
46	}
47
48// 탭메뉴
49	var tabArea = $(".tabArea");
50	
51	if (tabArea.length) {
52		
53		for (var i=0 ; i<tabArea.length ; i++) {
54			var tabMenu = tabArea.eq(i).find("ul.tabMenu > li"),
55				tabCon = tabArea.eq(i).find(".tabCon");
56			
57			//tabMenu.removeClass("on").eq(0).addClass("on");
58			//tabCon.hide().eq(0).show();
59		}
60
61		if ($("div.necEdu").length) 	{
62			tabMenu.removeClass("on");
63			tabCon.hide();
64		}
65		
66		tabArea.on("click", "ul.tabMenu a", function(){
67			var currTabMenu =  $(this).parent().parent().parent().find("ul.tabMenu li"),
68				currTabCon =  $(this).parent().parent().parent().find(".tabCon"),
69				currIdx = $(this).parent().index();
70
71			if ($(this).parent().attr("class") == "on") {
72				currTabMenu.removeClass("on");
73				currTabCon.slideUp();
74			} else {
75				currTabMenu.removeClass("on").eq(currIdx).addClass("on");
76				currTabCon.hide().eq(currIdx).slideDown();
77			}
78		
79
80			return false
81		});
82		
83	}
84
85	var rwTabArea = $(".rwTabArea");
86	if (rwTabArea.length) {
87		var rwTabMenu = rwTabArea.find("ul.rwTabMenu li"),
88			rwTabCon = rwTabArea.find("div.tabCon");
89
90		//rwTabMenu.eq(0).addClass("on");
91		//rwTabCon.hide().eq(0).show();
92
93		rwTabMenu.on("click", "a",  function(){
94			var win_w = $(window).width(),
95				nIdx = $(this).parent().index(),
96				menuTxt = $(this).text();
97
98			rwTabArea.find("dl.rwMenu > dt").removeClass("view");
99			rwTabArea.find("dl.rwMenu > dt").find("i").attr("class",  function(i){
100				var src = $(this).attr("class");
101				return src.replace("-up", "-down");
102			});
103			rwTabArea.find(".toggleCon").slideUp();			
104
105			rwTabArea.find("a.trigger span").text(menuTxt);
106			rwTabMenu.removeClass("on").eq(nIdx).addClass("on");
107			rwTabCon.hide().eq(nIdx).show();
108			
109			
110			return false
111		});
112	}
113
114	$(document).on("click","span.trigger",function() {
115		
116		if($(this)[0].id=="trigger_c") {
117			var _currToggle = $(this).parent().parent().parent(),
118			_currToggleCon = $(this).parent().parent().parent().find("dd#toggleCon_c"),
119			sClass = $(this).attr("class");
120			
121			$(this).parent().find("span#trigger_c").removeClass("view");
122			$(this).parent().parent().find("dd#toggleCon_c").hide();
123		} else {
124			var _currToggle = $(this).parent().parent(),
125			_currToggleCon = $(this).parent().next(),
126			sClass = $(this).attr("class");
127		}
128
129		if (sClass != "trigger view") {
130			$(this).addClass("view");
131			$(this).find("i").attr("class",  function(i){
132				var src = $(this).attr("class");
133				return src.replace("-down", "-up");
134			});
135			_currToggleCon.slideDown();
136		} else {
137			$(this).removeClass("view");
138			$(this).find("i").attr("class",  function(i){
139				var src = $(this).attr("class");
140				return src.replace("-up", "-down");
141			});
142			_currToggleCon.slideUp();
143		}
144
145		return false
146	});
147
148	$(document).on("click","a.trigger",function() {
149
150		if($(this)[0].id=="trigger_a") {
151			var _currToggle = $(this).parent().parent(),
152			_currToggleCon = $(this).parent().parent().find("dd#toggleCon_a"),
153			sClass = $(this).attr("class");
154
155			$(this).parent().find("a#trigger_ga").removeClass("view");
156			$(this).parent().parent().find("dd#toggleCon_ga").hide();
157		} else if($(this)[0].id=="trigger_ga") {
158			var _currToggle = $(this).parent().parent(),
159			_currToggleCon = $(this).parent().parent().find("dd#toggleCon_ga"),
160			sClass = $(this).attr("class");
161			
162			$(this).parent().find("a#trigger_a").removeClass("view");
163			$(this).parent().parent().find("dd#toggleCon_a").hide();
164		} else {
165			var _currToggle = $(this).parent().parent(),
166			_currToggleCon = $(this).parent().next(),
167			sClass = $(this).attr("class");
168		}
169
170		if (sClass != "trigger view") {
171			$(this).addClass("view");
172			$(this).find("i").attr("class",  function(i){
173				var src = $(this).attr("class");
174				return src.replace("-down", "-up");
175			});
176			_currToggleCon.slideDown();
177		} else {
178			$(this).removeClass("view");
179			$(this).find("i").attr("class",  function(i){
180				var src = $(this).attr("class");
181				return src.replace("-up", "-down");
182			});
183			_currToggleCon.slideUp();
184		}
185
186		return false
187	});
188
189	//filter	
190	$(document).on("click","a#filter_category_more",function() {
191		
192		if($("#filter_category_layer").css("display") == "none"){
193			$('#filter_category_layer').show();
194		} else {
195			$('#filter_category_layer').hide();
196		}
197
198		return false
199	});
200
201	$(document).on("click","a#filter_keyword_more",function() {
202		
203		if($("#filter_keyword_layer").css("display") == "none"){
204			$('#filter_keyword_layer').show();
205		} else {
206			$('#filter_keyword_layer').hide();
207		}
208
209		return false
210	});
211
212	$(document).on("click","a#filter_author_more",function() {
213		
214		if($("#filter_author_layer").css("display") == "none"){
215			$('#filter_author_layer').show();
216		} else {
217			$('#filter_author_layer').hide();
218		}
219
220		return false
221	});
222
223	$(document).on("click","a#filter_year_more",function() {
224		
225		if($("#filter_year_layer").css("display") == "none"){
226			$('#filter_year_layer').show();
227		} else {
228			$('#filter_year_layer').hide();
229		}
230
231		return false
232	});
233
234	$(document).on("click","a#filter_fund_more",function() {
235		
236		if($("#filter_fund_layer").css("display") == "none"){
237			$('#filter_fund_layer').show();
238		} else {
239			$('#filter_fund_layer').hide();
240		}
241
242		return false
243	});
244
245	$('ul > li > input:checkbox').on("click", function(){		
246		var this_name = $(this)[0].name;
247		var this_value = $(this)[0].value;
248		var this_checked = $(this)[0].checked;
249
250		$('ul > li > input:checkbox').each(function() {
251			if($(this)[0].name == this_name && $(this)[0].value == this_value) { 
252				$(this)[0].checked = this_checked;
253			}
254		});
255	});
256
257	$('ul[name="filter"] > li > input:checkbox').on("click", function(){	
258		$('#page')[0].value = "1";
259		$('#filter_form')[0].submit();
260	});
261
262	//filer layer
263	$(document).on("click","input#filter_layer_submit",function() {
264		$('#page')[0].value = "1";
265		$('#filter_form')[0].submit();
266	});
267
268	$(document).on("click","a#filter_layer_close",function() {
269		$('.layerPopup').each(function() {
270			$(this).hide();
271		});
272	});	
273
274	//기타
275	$(document).on("click","span[name='funded_link']",function() {
276		var this_value = $(this)[0].innerText;
277
278		$("ul > li > input:checkbox[name='p_filter_fund[]']").each(function() {
279			if($(this)[0].value == this_value) { 
280				$(this)[0].checked = true;
281			}
282		});
283
284		$('#page')[0].value = "1";
285		$('#filter_form')[0].submit();
286	});
287	
288	$("dl.popupCite").on("click", " .close a", function(){
289		$("dl.popupCite").hide();
290		$(".div_dc_back").hide();
291		return false
292	});
293
294
295	$("dl.popupCite").on("click", " .close_ic a", function(){
296		$(".div_dc_back").hide();
297		return false
298	});
299
300		
301	$(".div_dc").on("click", "a", function(){
302		$(".div_dc_back").hide();
303		return false
304	});
305
306
307	$('form[name="cited_btn"] a.btnPoint_down').on("click", function(){
308		var cited_popup = $(this).closest("li");
309		if(cited_popup.find(".div_dc_back").css("display")=="none") {
310
311			cited_popup.find(".div_dc_back").show();
312			cited_popup.find(".popupCite select").trigger("change");
313			cited_popup.find(".div_dc_back select").trigger("change");
314		} else {
315				cited_popup.find(".popupCite").hide();
316				cited_popup.find(".div_dc_back").hide();
317		}
318		return false
319	});
320
321
322
323
324	$(".cited_view").on("click", "a", function(){
325		var cited_popup = $(this).closest("li");
326		if(cited_popup.find(".popupCite").css("display")=="none") {
327			cited_popup.find(".popupCite").show();
328			cited_popup.find(".popupCite select").trigger("change");
329		} else cited_popup.find(".popupCite").hide();
330		return false
331	});
332
333	if ($('form[name="cited_btn"]').length) {
334
335		$('form[name="cited_btn"] select').change( function(){
336			type = $(this).val();
337			number = $(this).parent().find('input:hidden[name="number"]').val();
338			text = $(this).closest("dd").find('.popupCon')[0];
339
340			$.ajax({
341				type: 'POST',
342				data: {type:type, number:number},
343				url: '../journal/ajax_cited_text.php',
344				success: function(result) {
345					text.innerHTML = result;
346				}
347			});
348		});
349
350		$('form[name="cited_btn"] a.btnPoint').on("click", function(){
351			text = $(this).closest("dd").find('.popupCon')[0].innerText;
352			$('#clip_target').val(text);
353			$('#clip_target').select();
354			
355			document.execCommand('copy');
356			alert('Citation successfully copied.');
357		});
358
359	
360
361		$('form[name="cited_btn"] a.btnDef').on("click", function(){
362			type = $(this).val();
363			number = $(this).parent().find('input:hidden[name="number"]').val();
364			text = $(this).closest("dd").find('.popupCon')[0];
365
366			$.ajax({
367				type: 'POST',
368				data: {type:type, number:number},
369				url: '../journal/ajax_cited_text.php',
370				success: function(result) {
371					text.innerHTML = result;
372				}
373			});
374		});
375	}
376});
377
378window.addEventListener('load', function()
379{
380	main_resize();	
381});
382
383
384function main_resize() {
385	var win_w = $(window).width();
386    var main_hot = $("div.mainArticle > div.hot");
387	var max_heignt = 0;
388	var max_heignt_resize_ck = false;
389
390	if (main_hot.length) {
391
392		max_heignt = main_hot[0].clientHeight;
393
394		$("div.hot li.slick-slide").each(function() {
395			if(max_heignt < $(this)[0].clientHeight) {
396				max_heignt = $(this)[0].clientHeight;
397				max_heignt_resize_ck = true;
398			}
399		});
400		
401		$("div.mainArticle > div.hot").css({"height":max_heignt});
402		if(win_w + 16 > 960) {
403
404			$max_height=  (main_hot[0].clientHeight / 3) - 15;
405			if (win_w + 16 > 1360) $max_height= (main_hot[0].clientHeight / 2) - 7.5;
406
407			$("div.mainArticle > ul.articleList > li > a").each(function() {
408				if($max_height < $(this)[0].clientHeight) {
409					$max_height = $(this)[0].clientHeight;	
410				}
411			});
412
413			$("div.mainArticle > ul.articleList > li > a").css({"height":$max_height});
414
415			if (win_w + 16 > 1360) {
416				if(main_hot[0].clientHeight < ($max_height * 2) + 15) {
417					$("div.mainArticle > div.hot").css({"height":($max_height * 2) + 15});
418				}
419			} else {
420				if(main_hot[0].clientHeight < ($max_height * 3) + 30) {
421					$("div.mainArticle > div.hot").css({"height":($max_height * 3) + 30});
422				}
423			}
424		}	
425	}
426}
427
428// 윈도우 창 size 변경시
429$(window).resize(function(){
430
431	var win_w = $(window).width();
432	if (win_w > 960) {
433		//PC	
434		setting_pc();
435		main_resize();
436	} else {
437		//Mobile	
438		setting_mobile();
439	}
440
441	if (hotBnr != null) {
442		hotBnr.destroySlider();
443		hotBnr = null;
444	}
445
446});
447
448//페이지새로고침
449function f_page_reload(){
450	location.href = location.href;
451}	
452
453//필터 초기화
454function f_filter_reset(){
455
456	$("ul > li > input:checkbox[name='p_filter_category[]']").each(function() {
457		$(this)[0].checked = false;
458	});
459	
460	$("ul > li > input:checkbox[name='p_filter_keyword[]']").each(function() {
461		$(this)[0].checked = false;
462	});
463
464	$("ul > li > input:checkbox[name='p_filter_author[]']").each(function() {
465		$(this)[0].checked = false;
466	});
467
468	$("ul > li > input:checkbox[name='p_filter_year[]']").each(function() {
469		$(this)[0].checked = false;
470	});
471
472	$("ul > li > input:checkbox[name='p_filter_fund[]']").each(function() {
473		$(this)[0].checked = false;
474	});
475
476	$('#filter_form')[0].submit();
477	
478}	
479
480
481//페이지 선택
482function page_search(page){
483	$('#page')[0].value = page;
484	$('#filter_form')[0].submit();
485}	
486
487//Mobile
488function setting_mobile() {
489	$("div.wrapper, div#headerWrap, ul#gnb ul, ul.articleList li").removeAttr("style");
490	$("div.mainArticle div.hot, ul.articleList a").removeAttr("style");
491	$("ul#gnb > li").removeClass("on");
492	$("ul#gnb > li, ul#gnb > li > a").off();
493	//$("dl.gnbSearch dt").removeClass("view");
494	//$("dl.gnbSearch dd").hide();
495
496
497	setTimeout(function(){
498		var win_h = $(window).height(),
499			header_h = $("div#headerWrap").outerHeight(),
500			footer_h = $("div#footerWrap").outerHeight(),
501			con_minH = win_h - header_h - footer_h;
502
503		$("div#container").css({"min-height":con_minH})
504
505	}, 300);
506
507
508	$("ul#gnb > li > a").on("click", function(){
509		var sClass = $(this).parent().attr("class");
510		if (sClass == "on") {
511			$(this).parent().removeClass("on");
512			$(this).parent().find("ul").slideUp();
513		} else {
514			//$("dl.gnbSearch dt").removeClass("view");
515			//$("dl.gnbSearch dd").hide();
516
517			$("ul#gnb > li").removeClass("on");
518			$("ul#gnb ul").hide();
519
520			$(this).parent().addClass("on");
521			$(this).parent().find("ul").slideDown();
522		}
523		return false
524	});
525
526
527	if ($("div.lnbWrap").length) {
528
529		$("div.lnbWrap dt").removeClass();
530		$("div.lnbWrap dl, div.lnbWrap dd").removeAttr("style");
531
532		$("div.lnbWrap dt a").on("click", function(){
533			var sClass = $(this).parent().attr("class"),
534				currCon = $(this).parent().next();
535
536			if (sClass == "view") {
537				$(this).parent().removeClass("view");
538				currCon.slideUp();
539			} else {
540				$(this).parent().addClass("view");
541				currCon.slideDown();
542			}
543			return false
544		});
545
546
547		$("body:not(div.lnbWrap)").on("click", function(){
548			$("div.lnbWrap dt").removeClass("view");
549			$("div.lnbWrap dd").hide();
550		});
551
552	}
553
554
555	if (recentBnr != null) {
556		recentBnr.destroySlider();
557		$("div.recent ul, div.recent li").removeAttr("style");
558		recentBnr = null;
559	}
560
561	if (sponBnr != null) {
562		sponBnr.destroySlider();
563		$("div.bnrzone ul, div.bnrzone li").removeAttr("style");
564		sponBnr = null;
565	}
566}
567
568
569
570//PC 
571function setting_pc() {
572	$("body").removeClass("overHidden");
573	$("div.wrapper, ul.headerMenu, div.contents, .toggleCon, ul.subMenu, dl.rwMenu dd, dl.rwMenu li, dl.toggleArea_rw > dd").removeAttr("style");
574	$("div.mainArticle div.hot, ul.articleList a").removeAttr("style");
575	$("ul#gnb > li").removeClass("on");
576	$("ul#gnb > li, ul#gnb > li > a").off();
577	//$("dl.gnbSearch dt").removeClass("view");
578	//$("dl.gnbSearch dd").hide();
579
580	/*
581	setTimeout(function(){
582		for (var i=0; i<$("ul#gnb > li").length ; i++) {
583			var re_poLeft = $("ul#gnb > li > a").eq(i).position().left;
584			$("ul#gnb > li").eq(i).find("ul").css({
585				"left":re_poLeft
586			});
587		}
588	}, 300);
589	*/
590
591	if ($("ul.articleList a").length) {
592		for (var i=0; i<$("ul.articleList a").length; i++) {
593			var re_paddingB = $("ul.articleList a").eq(i).find("span.type").outerHeight() + 40;
594			$("ul.articleList a").eq(i).css({
595				"padding-bottom":re_paddingB
596			});
597		}
598	}
599
600	/*
601	$("ul#gnb > li").on("mouseenter", function(){
602		if (hideMenu != null) {
603			clearTimeout(hideMenu);
604		}
605		//$("dl.gnbSearch dt").removeClass("view");
606		//$("dl.gnbSearch > dd").hide();
607
608		$("ul#gnb > li").removeClass("on");
609		$("ul#gnb ul").hide();
610
611		
612		$(this).addClass("on");
613		if ($(this).find("ul").length) {
614			$(this).find("ul").show();
615		}
616
617	});
618
619	$("ul#gnb ul").on("mouseenter", function(){
620		if (hideMenu != null) {
621			clearTimeout(hideMenu);
622		}
623	});
624
625	$("ul#gnb").on("mouseleave", function(){
626		hideMenu = setTimeout(function(){
627			$("ul#gnb > li").removeClass("on");
628			$("ul#gnb ul").hide();
629		}, 500);
630	});
631	*/
632
633	if (recentBnr != null) {
634		recentBnr.destroySlider();
635		$("div.recent ul, div.recent li").removeAttr("style");
636		recentBnr = null;
637	}
638
639	if (sponBnr != null) {
640		sponBnr.destroySlider();
641		$("div.bnrzone ul, div.bnrzone li").removeAttr("style");
642		sponBnr = null;
643	}
644
645//반응형 메뉴
646	$(document).ready(function () {
647		main_menu_fixed();
648	});
649
650	if ($("dl.rwMenu").length) {
651
652		var sClass = $("dl.rwMenu ul").attr("class");
653		if (sClass == null) 	{
654			var reW = 100 / $("dl.rwMenu li").length;
655			$("dl.rwMenu li").css({
656				"width" : reW + "%"
657			});
658		}
659	}
660
661	if ($("div.articleBrief").length) {
662		menu_fixed();
663
664		 $("ul.conMenu a").click(function(event){
665			event.preventDefault();
666
667			var move_h = $(this.hash).offset().top - 123,
668				nIdx = $(this).parent().index();
669
670			if ($(".fixedArea").length) {
671				//move_h = move_h;
672			}
673			$('html,body').animate({scrollTop:move_h}, 500);
674
675			$("ul.conMenu li").removeClass("on").eq(nIdx).addClass("on");
676		});
677
678
679
680		$(window).on('scroll', function() {
681			$('.link-target').each(function(index, element) {
682				var preBasicH = 0;
683				var basicH = $(element).offset().top - 100;
684				if (index > 0) {
685					preElement = $('.link-target').eq(index - 1);
686					preBasicH = preElement.offset().top - 100;
687				} else {
688					preElement = $(element);
689				}
690
691				var preBasicH = preElement.offset().top - 220;
692				var basicH = $(element).offset().top - 220;
693				var scrollTop = $(window).scrollTop();
694
695				if(basicH > scrollTop && scrollTop >= preBasicH) {
696					var sID = preElement.attr('id');
697					$('ul.conMenu a').removeClass('on');
698					var selectedElement = $('ul.conMenu a[href=#'+ sID +']');
699					selectedElement.addClass('on');
700
701					var ulTop = $('ul.conMenu').offset().top;
702					var elementTop = selectedElement.offset().top;
703					if(elementTop < ulTop) {
704						$('ul.conMenu').scrollTop($('ul.conMenu').scrollTop() - (ulTop - elementTop));
705					}
706
707					var ulBottom = $('ul.conMenu').offset().top + $('ul.conMenu').outerHeight();
708					var elementBottom = selectedElement.offset().top + selectedElement.outerHeight();
709					if(elementBottom > ulBottom) {
710						$('ul.conMenu').scrollTop($('ul.conMenu').scrollTop() + (elementBottom - ulBottom));
711					}
712					return false;
713				}
714				var scrollValue = $(window).scrollTop(),
715				basic_h = $("div#headerWrap").outerHeight() + $("div.titArea").outerHeight() + $("div.articleBrief").outerHeight();
716				if (index == ($('.link-target').length - 1) && scrollValue > basic_h) {
717					var sID = $(element).attr('id');
718					$('ul.conMenu a').removeClass('on');
719					var selectedElement = $('ul.conMenu a[href=#'+ sID +']');
720					selectedElement.addClass('on');
721
722					var ulTop = $('ul.conMenu').offset().top;
723					var elementTop = selectedElement.offset().top;
724					if(elementTop < ulTop) {
725						$('ul.conMenu').scrollTop($('ul.conMenu').scrollTop() - (ulTop - elementTop));
726					}
727
728					var ulBottom = $('ul.conMenu').offset().top + $('ul.conMenu').outerHeight();
729					var elementBottom = selectedElement.offset().top + selectedElement.outerHeight();
730					if(elementBottom > ulBottom) {
731						$('ul.conMenu').scrollTop($('ul.conMenu').scrollTop() + (elementBottom - ulBottom));
732					}
733				}
734			});
735		});
736	}
737}
738
739function main_menu_fixed() {
740   $(window).scroll(function() {
741      var scrollValue = $(window).scrollTop(),
742      basic_h = $("div#headerWrap").outerHeight()-57;
743      if (scrollValue > basic_h) {
744         $("div.header__container").addClass("fixed");
745         $("dl.gnbSearch").addClass("fixed");
746         $(".article_paging").addClass("fixed");
747         $(".top_btn").addClass("fixed");
748      } else {
749         $("div.header__container").removeClass("fixed");
750         $("dl.gnbSearch").removeClass("fixed");
751         $(".article_paging").removeClass("fixed");
752         $(".top_btn").removeClass("fixed");
753      }
754   });
755}
756
757
758function menu_fixed() {
759	$(window).scroll(function() {
760		var scrollValue = $(window).scrollTop(),
761		basic_h = $("div#headerWrap").outerHeight() + $("div.titArea").outerHeight() + $("div.articleBrief").outerHeight();
762		if (scrollValue > basic_h) {
763			$("div.articleMenu").addClass("fixed")
764		} else {
765			$("div.articleMenu").removeClass("fixed")
766		}
767	});
768
769	$(window).scroll(function() {
770		var menuPosition = ($(window).scrollTop() + $("ul.conMenu").height());
771		var containerHeight = ($('#container').height() + 113);
772		var bottomLimit = 109 - (menuPosition - containerHeight);
773
774		if(menuPosition > containerHeight) {
775			$("ul.conMenu").css("top", bottomLimit + 'px');
776		} else if (bottomLimit != 109) {
777			$("ul.conMenu").css("top", "");
778		}
779	});
780}
781
782function journal_download(type, sid, filename) {
783	var increase_column;
784
785	if(type == "pdf") {
786		var openWindow = window.open("about:blank");
787		openWindow.location.href = '/upload/pdf/' + filename;
788
789		increase_column = "pdf_down";
790
791	} else if(type == "pdf_a") {
792		var openWindow = window.open("about:blank");
793		openWindow.location.href = '/upload/article/' + filename;
794
795		increase_column = "pdf_down";
796
797	} else if(type == "epub") {		
798		location.href = '/func/download.php?' + filename;		
799		increase_column = "epub_down";
800	}
801
802	$.ajax({
803		type: 'POST',
804		data: {table: 'journal_tbl', column: increase_column, count: 1, condition_column: 'sid', condition_value: sid},
805		url: '/func/count_increase.php'
806	});
807}
808
809$(document).ready(function(){
810   $('.top_btn').on('click', function(){
811      $('html, body').animate({scrollTop: '0'}, 500);
812   })
813})
814$(window).scroll(function() {
815   var scroll = $(window).scrollTop();
816   //console.log(scroll);
817   if (scroll >= 500) {
818      //console.log('a');
819      $(".top_btn").addClass("on");
820   } else {
821      //console.log('a');
822      $(".top_btn").removeClass("on");
823   }
824});
825

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.