PageSourceSearch

https://kams.or.kr/script/user.js

js kams.or.kr collected 2026-10-02 06:38:07 UTC 13,917 bytes, 465 lines download raw bytes

1// DOM 이 모두 로드 되었을 때 실행
2;jQuery(function(){
3	gnbEvt();
4	allMenuEvt();
5	topBtnEvt();
6
7	tabEvnt();
8	_toggleEvt();
9	// faq();
10});
11
12
13
14// 페이지내 모든 요소가 로드되었을 때 실행
15$(window).load(function(){
16
17	var min_font = 12;
18	var max_font = 20;
19	var font_val = 12;
20
21	$('li.plus').click(function(){
22		if(font_val < max_font){
23			font_val++;
24		}else{
25			font_val = max_font;
26		}
27
28		$('.contents').css('font-size',font_val+"px");
29		return false;
30	});
31	$('li.minus').click(function(){
32		if(font_val > min_font){
33			font_val--;
34		}else{
35			font_val = min_font;
36		}
37
38		$('.contents').css('font-size',font_val+"px");
39		return false;
40	});
41
42	$('li.print').click(function(){
43		var W = $(".contents").width()+20;
44		var H = $(".contents").height()+100;
45
46		var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" + W + ",height=" + H + ",left=0,top=0";
47
48		var PrintPage = window.open("about:blank", "print", features);
49		PrintPage.document.open();
50		PrintPage.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
51		PrintPage.document.write('<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">\n');
52		PrintPage.document.write("<head>\n");
53		PrintPage.document.write('<meta http-equiv="content-type" content="text/html;charset=utf-8"/>\n');
54		PrintPage.document.write('<meta http-equiv="X-UA-Compatible" content="IE=Edge,Chrome=1"/>\n');
55		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/common_v1.0.css" />\n');
56		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/kams.css" />\n');
57
58		PrintPage.document.write("<title><?=$society_name?></title>\n");
59		PrintPage.document.write("</head>\n");
60		PrintPage.document.write("<body style='background:none;'>\n");
61		PrintPage.document.write("<br/><div class='contents' style='width:100%;margin:0 auto;'><div class='contents'>"+$('.contents .contents').html()+"</div></div>\n");
62		PrintPage.document.write("</body>\n");
63		PrintPage.document.write("</html>\n");
64		PrintPage.document.close();
65		PrintPage.document.title = document.domain;
66		PrintPage.print();
67	});
68	
69	$('a.bbs_prinf').click(function(){
70		var W = $(".tblDef.view").width()+20;
71		var H = $(".tblDef.view").height()+100;
72
73		var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" 
73+ W + ",height=" + H + ",left=0,top=0";
74
75		var PrintPage = window.open("about:blank", "print", features);
76		PrintPage.document.open();
77		PrintPage.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
78		PrintPage.document.write('<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">\n');
79		PrintPage.document.write("<head>\n");
80		PrintPage.document.write('<meta http-equiv="content-type" content="text/html;charset=utf-8"/>\n');
81		PrintPage.document.write('<meta http-equiv="X-UA-Compatible" content="IE=Edge,Chrome=1"/>\n');
82		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/common_v1.0.css" />\n');
83		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/kams.css" />\n');
84
85		PrintPage.document.write("<title><?=$society_name?></title>\n");
86		PrintPage.document.write("</head>\n");
87		PrintPage.document.write("<body  class='pop'>\n");
88		PrintPage.document.write('
88<div class="printPrevWrap"><div class="printHeader"><img src="/image/pop/logo_print.gif" alt="대한의학회"></div><div class="printCont"><div class="tblDef view">');
89		PrintPage.document.write($('.contents .tblDef.view').html());
90		PrintPage.document.write('</div><div class="printFooter">주소 : 04427 서울특별시 용산구 이촌로 46길 33 (이촌동)<br>전화 : 02-798-3807 &nbsp; / 팩스 : 0502-798-3807 &nbsp; / E-mail : [email protected]<br></div></div></div></div>');
91		PrintPage.document.write("</body>\n");
92		PrintPage.document.write("</html>\n");
93		PrintPage.document.close();
94		PrintPage.document.title = document.domain;
95		PrintPage.print();
96	});
97
98	$('.load_print').click(function(){
99		var W = 700;
100		var H = 800;
101		var don_sid = $(this).attr("don_sid");
102		var don_year = $(this).attr("don_year");
103		var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" + W + ",height=" + H + ",left=0,top=0";
104
105		var PrintPage = window.open("/business/donation/load_print.php?sid="+don_sid+"&don_year="+don_year, "print", features);
106		PrintPage.document.close();
107		PrintPage.document.title = document.domain;
108		PrintPage.print();
109	});
110
111	$('.donation_print').click(function(){
112		var W = $(".contents .print").width()+20;
113		var H = $(".contents .print").height()+100;
114
115		var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" 
115+ W + ",height=" + H + ",left=0,top=0";
116
117		var PrintPage = window.open("about:blank", "print", features);
118		PrintPage.document.open();
119		PrintPage.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
120		PrintPage.document.write('<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">\n');
121		PrintPage.document.write("<head>\n");
122		PrintPage.document.write('<meta http-equiv="content-type" content="text/html;charset=utf-8"/>\n');
123		PrintPage.document.write('<meta http-equiv="X-UA-Compatible" content="IE=Edge,Chrome=1"/>\n');
124		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/common_v1.0.css" />\n');
125		PrintPage.document.write('<link type="text/css" rel="stylesheet" href="/css/kams.css" />\n');
126
127		PrintPage.document.write("<title><?=$society_name?></title>\n");
128		PrintPage.document.write("</head>\n");
129		PrintPage.document.write("<body style='background:none;'>\n");
130		PrintPage.document.write("<br/><div class='contents' style='width:98%;margin:0 auto;'>"+$('.contents .print').html()+"</div>\n");
131		PrintPage.document.write("</body>\n");
132		PrintPage.document.write("</html>\n");
133		PrintPage.document.close();
134		PrintPage.document.title = document.domain;
135		PrintPage.print();
136	});
137});
138
139
140/* GNB */
141function gnbEvt() {
142	if (($('#gnbUI').length > 0) && !($('.gnbWrap').is('.on'))) {
143		var _list = $('#gnbUI > li');
144
145		// 초기값
146		$('#gnbUI').children('.on').addClass('current');
147
148		// 서브 메뉴 보이기
149		$('#gnbUI > li').on('mouseenter focusin', function(){
150			_list.removeClass('on');
151			$(this).addClass('on');
152		});
153
154		// GNB에서 마우스가 벗어나면 서브 메뉴 숨김
155		$('#gnbUI').on('mouseleave', function(){
156			_list.removeClass('on');
157			$('#gnbUI').children('.current').addClass('on');
158		});
159		// GNB에서 포커스가 벗어나면 서브 메뉴 숨김
160		$('#utilMenu').on('focusin', function(){
161			_list.removeClass('on');
162			$('#gnbUI').children('.current').addClass('on');
163		});
164		$('#containerWrap').on('focusin', function(){
165			_list.removeClass('on');
166			$('#gnbUI').children('.current').addClass('on');
167		});
168		$('#footerWrap').on('focusin', function(){
169			_list.removeClass('on');
170			$('#gnbUI').children('.current').addClass('on');
171		});
172	}
173}
174
175/* sub Menu */
176function allMenuEvt() {
177	if ($('#hamburger').length > 0) {
178		var _gnb = $('.gnbWrap');
179
180		// 전체 메뉴 클릭시
181		$('#hamburger').on('click', function(){
182			_gnb.toggleClass('showAllmenu');
183		});
184
185		// 전체 메뉴 이외의 부분을 클릭시
186		$('.wrapper').on('click', function(e){
187			if ((!$(e.target).is('#hamburger')) && (!$(e.target).is('.gnbWrap'))) {
188				_gnb.removeClass('showAllmenu');
189				burgerChange();
190			}
191		});
192	}
193}
194
195/* hamburger menu Change */
196function burgerChange() {
197	var _btn = $('#hamburger'),
198		open_txt = _btn.attr('data-open-text'),
199		close_txt = _btn.attr('data-close-text');
200
201	if($('.gnbWrap').is('.showAllmenu')){
202		_btn.addClass('on');
203		_btn.attr({
204			'title' : open_txt,
205			'value' : open_txt
206		});
207	} else {
208		_btn.removeClass('on');
209		_btn.attr({
210			'title' : close_txt,
211			'value' : close_txt
212		});
213	}
214}
215
216
217/* main Visual Slide */
218function mainVisualSlide() {
219	if ($('#mainVisualSlide > li').length > 1){
220		$('#mainVisualSlide').removeClass('init');
221
222		var mySettings = {
223				auto		: true,
224				autoStart	: true,
225				autoHover	: true,
226				autoControls: false,
227				pager		: true,
228				controls	: false,
229				pause		: 7000,
230				speed		: 2300,
231				moveSlides	: 1
232			},
233
234		_bnrSlider = $('#mainVisualSlide').bxSlider(mySettings);
235
236		// pager 클릭시에도 슬라이드 동작
237		$('.visualArea').on('click', '.bx-pager-item > a', function() {
238			_bnrSlider.startAuto();
239		});
240
241		// 윈도우 크기가 변할 경우 슬라이드 재시작
242		$(window).resize(function() {
243			_bnrSlider.reloadSlider(mySettings);
244		});
245	}
246}
247
248
249/* top button event */
250function topBtnEvt() {
251	if ($('#wingBnr').length > 0) {
252		var _wing	= $('#wingBnr'),
253			_topBtn	= _wing.find('.top');
254
255		_wing.hide();
256
257		// 메인페이지가 아니고, 문서가 화면보다 클 경우 Top 버튼 생성
258		// if (!$('body').is('.main') && ($(document).outerHeight(true) > $(window).outerHeight(true))) {
259
260		// 문서가 화면보다 클 경우 Top 버튼 생성
261		if ($(document).outerHeight(true) > $(window).outerHeight(true)) {
262			_wing.show();
263		}
264		$(window).resize(function() {
265			if ($(document).outerHeight(true) > $(window).outerHeight(true)) {
266				_wing.show();
267			}
268		});
269	}
270}
271
272
273
274/* popup skin size control */
275function popSizeControl() {
276	popSizeSetting();
277	popSizeInit();
278
279	$(window).resize(function() {
280		popSizeSetting()
281	});
282}
283
284// popup min-height Setting - fixed value
285function popSizeInit() {
286	$('.contWrap').css('minHeight', popSizeCheck());
287}
288
289// popup height Setting - flaxable value
290function popSizeSetting() {
291	$('.contWrap').css('height', popSizeCheck());
292}
293
294// popup height check
295function popSizeCheck() {
296	var win_h = $(window).outerHeight(true),
297		head_h = $('#popHeader').outerHeight(true),
298		foot_h = $('#popClose').outerHeight(true),
299		cont_h = $('.contWrap .content').outerHeight(true),
300		_h;
301
302	_h = win_h - head_h - foot_h;
303
304	// 컨텐츠가 윈도우 보다 클 경우 높이 값을 컨텐츠 높이로 지정한다.
305	if (cont_h > _h) {
306		_h = cont_h;
307	}
308
309	return _h
310}
311/* //popup skin size control */
312
313
314
315
316
317
318
319
320/* tabmenu */
321function tabEvnt() {
322	if ($('._tabArea').length > 0) {
323		var _tabArea = $('._tabArea'),
324			_tabList = _tabArea.find('.tabMenu > li'),
325			_tabCon = _tabArea.find('.tabCont');
326
327		_tabList.eq(0).addClass('on');
328		_tabCon.eq(0).addClass('on');
329
330		_tabArea.on('click', '.tabMenu > li > a', function(){
331			var nIdx = $(this).parent().index();
332
333			_tabList.removeClass('on').eq(nIdx).addClass('on');
334			_tabCon.removeClass('on').eq(nIdx).addClass('on');
335
336			return false;
337		});
338	}
339}
340
341
342/* toggle Event */
343function _toggleEvt() {
344	if ($('._toggleArea').length > 0) {
345		// 초기값
346		$('._toggleArea').on('click', '._toggleBtn', function(){
347
348			var _btn = $(this),
349				open_txt = _btn.attr('data-open-text'),
350				close_txt = _btn.attr('data-close-text'),
351				_toggleArea = _btn.parents('._toggleArea').first();
352
353			$(this).parents('._toggleArea').first().toggleClass('on');
354
355			if((_toggleArea).is('.on')) {
356				_btn.attr({ 'title' : open_txt });
357			} else {
358				_btn.attr({ 'title' : close_txt });
359			}
360
361			return false;
362		});
363	}
364}
365
366
367
368/* FAQ Toggle Slide */
369function faq(){
370	if ($('.faqWrap').length > 0) {
371		var _faq = $('.faqWrap').children('dl'),
372			_quest = _faq.find('dt'),
373			_answer = _faq.find('dd'),
374			openInx;
375
376		// 페이지 로드 후 초기 오픈할 답변 확인
377		openInx = _faq.attr('id');
378
379		// 숫자만 추출하여 숫자상수로 변경
380		openInx = getNumberOnly(openInx) - 0;
381
382		if (typeof(openInx) === 'number' && openInx > 0){
383			// 오픈할 질문의 index값 추출
384			var _inx = openInx - 1;
385			// 초기 오픈 이벤트 실행
386			_quest.removeClass('on')
387				.eq(_inx).addClass('on')
388				.next('dd').slideDown('fast');
389		}
390
391		// 질문클릭시 동작 실행
392		_faq.on('click', 'dt > a', function(){
393			_answer.slideUp('fast');
394			$(this).parent().next().stop().slideToggle('fast');
395
396			if($(this).parent().hasClass('on')) {
397				_quest.removeClass('on');
398			} else {
399				_quest.removeClass('on');
400				$(this).parent().addClass('on');
401			}
402		});
403	}
404}
405
406
407
408/* checkbox 체크시 td에 클래스 on 추가 */
409function chkTblEvt() {
410	if($('.checkTbl').length > 0) {
411		var _chk = $('.checkTbl').find('.chkArea input:checkbox'),
412			_chk_num = _chk.length;
413
414		// 초기 셋팅
415		for (var i=0; i < _chk_num ; i++) {
416			if (_chk.eq(i).is(':checked')) {
417				_chk.eq(i).parents('td').addClass('on');
418			}
419		}
420
421		// 클릭시 이벤트
422		$('.checkTbl').on('click', '.chkArea', function(){
423			if ($(this).find('input').is(':checked')) {
424				$(this).parents('td').addClass('on');
425			} else {
426				$(this).parents('td').removeClass('on');
427			}
428		});
429	}
430}
431
432
433
434/* 숫자 추출 */
435function getNumberOnly(obj) {
436	var val = obj,
437		regex = /[^0-9]/g;
438
439	val = val.replace(regex, '');
440	return val;
441}
442
443/* SideBar Scroll Event */
444/*
445var timeout;
446$(window).scroll(function(e){
447	clearTimeout(timeout);
448	timeout = setTimeout(function() {
449		if ($('#sideBarWrap').length > 0) {
450			var $side = $('#sideBarWrap'),
451				_top = 242;
452
453			if ($(window).scrollTop() > _top) {
454				$side.animate({
455					top: $(document).scrollTop() + 50
456				}, 200);
457			}else{
458				$side.animate({
459					top: _top
460				}, 200);
461			}
462		}
463	}, 100);
464});
465*/

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.