PageSourceSearch

https://www.kopo.ac.kr/js/kopo/common.js?ver=4.1.1.18

js kopo.ac.kr collected 2026-10-02 11:14:09 UTC 26,627 bytes, 926 lines download raw bytes

1$(document).ready(function(){
2	var googleLang = false;
3	(function(){
4		//lang change toggle
5		var $langChange = $('.gnb-item--type-changeleng'),
6			$btnLangOpen = $langChange.find('.gnb-anchor'), 
7			$btnLangClose = $langChange.find('.lang-closebtn');
8			langOpenBool = false;
9		$btnLangOpen.on('click', function(e){
10			if($('.lang-item').length == 0 && googleLang == false) {
11				var oScript = document.createElement('script');
12				oScript.type ='text/javascript';
13				oScript.charset ='utf-8';		  
14				oScript.src = 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit';
15				document.getElementsByTagName('head')[0].appendChild(oScript);
16				googleLang = true;
17				setTimeout(function (e) {
18					$(".goog-te-combo").attr('title', '구글번역 언어선택');
19				}, 200);
20			}
21			var _this = $(this);
22			e.stopPropagation();
23			if( !_this.closest('.gnb-item').hasClass('js--langchange')){			
24				_this.closest('.gnb-item').addClass('js--langchange');
25				_this.closest('.gnb-item').find('.gnb-anchor').attr('title','언어선택 메뉴 접기');
26				langOpenBool = true;
27				$(document).on('click', function(e){
28					if(langOpenBool){
29						$langChange.removeClass('js--langchange');
30						$langChange.find('.gnb-anchor').attr('title','언어선택 메뉴 펼치기');
31						$langChange.find(".lang-list").removeClass("active");
32						langOpenBool = false;	
33					}
34				});
35				$langChange.on('click',function(e){
36					if( langOpenBool ){
37						e.stopPropagation();	
38					}
39				});
40			}else{
41				_this.closest('.gnb-item').removeClass('js--langchange');
42				_this.closest('.gnb-item').find('.gnb-anchor').attr('title','언어선택 메뉴 펼치기');
43				langOpenBool = false;
44			}		
45		});
46		$btnLangClose.on('click', function(e){
47			var _this = $(this); 
48			_this.closest('.gnb-item').removeClass('js--langchange');
49			_this.closest('.gnb-item').find('.gnb-anchor').attr('title','언어선택 메뉴 펼치기');
50			langOpenBool = false;
51		});
52	})();
53	(function(){
54		//menu focus;
55		var $snb = $('.snb-item');
56			$snbSub = $snb.find('.snb-list__sub-wrap a'); 
57		
58		$snbSub.on({
59			'focusin' : function(e){
60				var _this = $(this); 
61				_this.closest('.snb-item').addClass('snb-item--js-focus')
62			},
63			'focusout' : function(e){
64				var _this = $(this);
65				_this.closest('.snb-item').removeClass('snb-item--js-focus');
66			}
67		});
68	})();
69	
70	
71	
72	
73	ResizeEvents.addListener(adjustWidth, true);
74	ResizeEvents.addListener(resizeLocationMenu, true);
75	$("section.swiper-slide.active").siblings().addClass("vhidden");
76	$("#topsearch").val("");
77	$("#main_bsch_txt").val("");
78	$(window).on("resize", function(){
79		ResizeEvents.onResize();
80	});
81	
82	// GNB hide event
83	$("section.global, section#container, section#kopo_container").on("click", function() {
84		gnbMenuOut();
85		locMenuOut();
86		if (!$(this).hasClass("global")) {
87			toggleLanguageWindow(false);
88		}
89	});
90	
91	// 메뉴 높이 설정
92	$("nav ul.sl_box").each(function(){
93		if ($(this).children("li").length < 5) {
94			$(this).addClass("wide" + $(this).children("li").length);
95		}
96		var h = $(this).height()+ 30 + 80; // 30 = sl_box padding bottom, 80 = gnb menu height
97		$(this).parent().attr("data-height", h);
98	}).promise().done(function(){
99		$("nav div.sub_level").hide();
100	});
101	
102	$(window).scroll(function(event){
103		locationScrolled();
104	});
105	
106	// Top버튼 동작
107    if ($("button#footer_top").hasClass("top_bt")) {
108    	$("button#footer_top.top_bt").css("display","none"); 
109		var headerOffset = 57;
110        $(document).scroll(function() {
111        	if(!$("#kopo_wrap").hasClass('active')){
112	            var scrY = window.scrollY != undefined ? window.scrollY : document.documentElement.scrollTop;
113	            if (headerOffset <= scrY) {
114	                $('button#footer_top').fadeIn(400);
115	            } else {
116	                $('button#footer_top').fadeOut(400);
117	            }
118        	}
119        });
120    }
121    
122	setTimeout(function(){
123		$('.goog-logo-link').find('img').attr("alt", "구글이미지" );
124	}, 2000);
125    
126	// IE8 checkbox & radio issue
127	var ieVer = getInternetExplorerVersion();
128	if (ieVer != "N/A" && ieVer < 9) {
129		$("input[type='checkbox'], input[type='radio'], input[type='file']").on("change", function(){
130			$(this).blur().focus();
131		});
132	}
133	//하위메뉴유형이 탭인경우 메뉴아래 margin값 줄임
134	//$('.tab_box').parent().find('.tit_box').css('margin-bottom', '20px');
135
136	$('.privacy_txt a').on('click', function() {  
137		$('html, body').animate({scrollTop: $(this.hash).offset().top - 70}, 100);
138		return false;
139	});
140});
141
142function googleTranslateElementInit() {
143	try {
144		new google.translate.TranslateElement({pageLanguage: 'ko', autoDisplay: false}, 'google_translate_element');
145	} catch(ex) {
146		//this supresses JS errors in Google code being shown to users, the translate utility will simply not be shown
147  }
148}
149/**
150 * TOP버튼 이벤트
151 */
152function letsGoTowardsTheTop() {
153	if($("#pg-div").hasClass("pg-container") === true && pageable != null) {
154		pageable.scrollToPage(1);
155		//pageable.scrollToAnchor("#sec1");
156	} else if($('html').hasClass('fp-enabled') === true) {
157		$('.fullpage').fullpage.moveTo(1,0);
158	}else {
159		$('html, body').animate({scrollTop: 0}, 400);
160	}
161}	
162
163/**
164 * 화면 리사이즈 이벤트 리스너
165 */
166var ResizeEvents = (function(events) {
167	this.listener = new Array();
168	
169	/**
170	 * 리스너에 Function 등록
171	 * @param func Function
172	 * @param withRun (Boolean) 등록과 동시에 실행여부
173	 */
174	events.addListener = function (func, withRun) {
175		if (typeof(func) == "function") {
176			listener.push(func);
177			if (withRun == true) {
178				func();
179			}
180		} else {
181//			console.log("Function Only!!");
182		}
183	}
184	
185	/**
186	 * 리스너에 등록된 Function 실행
187	 */
188	events.onResize = function() {
189		for (var i in listener) {
190			//console.log("onresize :" + typeof(listener[i]));
191			if (typeof(listener[i]) == "function") {
192				listener[i]();
193			}
194		}
195	}
196	
197	return events;
198})(window.ResizeEvents || {});
199
200/*로케이션메뉴 모바일사이즈 적용*/
201function resizeLocationMenu(){
202	var screenWidth = document.documentElement.clientWidth || document.body.clientWidth;
203	var children = $(".location_box >ul").children();
204	var fchildren = children.first().outerWidth(true);
205	if(screenWidth<=900){
206		$(".menu02, .menu03, .menu04, .menu05").css('min-width', 0);
207		var showMenu = children.length;
208		if(screenWidth<=720){
209//			if(children.length>4){
210//				children.last().hide();
211				children.first().hide();
212				showMenu--;
213//			}
214		} else {
215//			if(children.length>4){
216				children.first().show();
217//			}
218		}
219		children.each(function(i, element) {
220			//첫번째 홈메뉴 빼고 
221			if(i!=0){
222				// $(this).width((screenWidth) / (showMenu));
223				$(".loc_down").width(((screenWidth) / (showMenu))-1);
224			}
225		});
226		$(".location_box >ul").data("adjust", "N");
227	}else {
228		if ($(".location_box >ul").data("adjust") == "Y") {
229			//console.log("adjusted");
230			return;
231		}
232		
233		$(".menu02, .menu03, .menu04, .menu05").css('width','auto');
234		$(".menu02, .menu03, .menu04, .menu05").css('min-width',160);
235		
236		var wrapWidth = $(".location_box >ul").outerWidth(false);
237		var childWidth = new Array();
238		var totalWidth = 0;
239		children.each(function(i, element) {
240			var w = $(this).outerWidth(true);
241			childWidth.push(w-10);
242			totalWidth += w;
243		}).promise().done(function(){
244//			console.log(totalWidth + " " + wrapWidth);
245//			console.log(totalWidth > wrapWidth);
246			if (totalWidth > wrapWidth) {
247				for(var i=1; i < childWidth.length; i++) {
248					var widthPer = childWidth[i] / (totalWidth) * 100;
249					$(".menu0" + (i+1)).css("width", widthPer+"%");
250				}
251				$(".location_box >ul").data("adjust", "Y");
252			}
253		});
254	}
255}
256
257/**
258 * 메뉴바 스티커 헤더 처리
259 */
260function locationScrolled() {
261	var screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
262	var scrollTop = document.documentElement.scrollTop|| document.body.scrollTop;
263	var sticker= $('.gnb-wrap').innerHeight()+ $('.snb-wrap').innerHeight();	
264	//2017.07.11 스마트폰 브라우저 설정으로 줌인.아웃 강제설정후 확대시 레이아웃 오류수정
265	var currentZoom = screenHeight / window.innerHeight;
266	if (currentZoom > 1){
267		$("section.location >div").css("position","relative");
268	} else {
269		if (scrollTop>=sticker) {
270			$("section.location >div").css("position","fixed");
271		}else{
272			$("section.location >div").css("position","relative");
273		}
274	}
275}
276
277/**
278 * 페이지 넓이 조절
279 */
280function adjustWidth() {
281	var screenWidth = document.documentElement.clientWidth || document.body.clientWidth;
282	var wrapW = $(".swiper-slide").length * screenWidth;
283	$(".swiper-slide").width(screenWidth);
284	$(".swiper-wrapper").width(wrapW);
285}
286
287/**
288 * 페이지 슬라이드 이동
289 * @param page 페이지번호(1부터 시작), 페이지ID
290 */
291function slideMove(page,goEvent) {
292//	if(window.console) console.log(page+""+goEvent);
293	
294	if ($(".main_all_campus").hasClass("show")) {
295		$(".main_all_campus").removeClass("show");
296	}
297	
298	if($('.mobile_menu').css('display') == 'block') {
299		$(".mobile_menu").css('display', 'none');
300	}
301	
302	if ($("#search_wrap.active").length > 0 && page == 'search_wrap') {
303		doIndexSearch('major');
304		return;
305	}
306	
307	var slide;
308	
309	if (page == "prev") {
310		page = $(".swiper-slide.active").index();
311	} else if (page == "next") {
312		page = $(".swiper-slide.active").index() + 2;
313	}
314	
315	if (typeof(page) == "number") {
316		page = page < 1 ? 1 : page;
317		page = $(".swiper-slide").length < page ? $(".swiper-slide").length : page;
318		slide = $(".swiper-slide").eq(page-1);
319//		if(window.console) console.log(page);
320		if(page==1){
321			$(".kopo_wrap.active .top_bt").hide();
322		}
323	} else {
324		slide = $(".swiper-slide").filter("#"+page);
325	}
326
327	if (slide.hasClass("active")) {
328		if (goEvent != undefined) {
329			location.href = goEvent;
330		}
331		return;
332	}
333	
334	var slideIdx = slide.index();
335	slide.removeClass("vhidden").addClass("active").siblings().removeClass("active");
336	setTimeout(function(){
337		slide.siblings().addClass("vhidden");
338	}, 500);
339
340	setTimeout(function(){
341		if (goEvent != undefined) {
342			location.href = goEvent;
343		}
344	}, 600);
345	
346	$(".swiper-wrapper").css({
347		"margin-left" : (-100 * slideIdx) + "%"
348	});
349
350	if(page == 'search_wrap') {
351//		if(window.console) console.log("focus");
352		setTimeout(function(){
353			$('#keyword_box #query').focus();
354		}, 500);
355	}
356}
357
358/**
359 * GNB Show
360 * @param obj 메뉴
361 */
362function gnbMenuOver(obj) {
363	if ($(obj).hasClass("on")) {
364		gnbMenuOut();
365		return;
366	}
367	var h = $(obj).next(".sub_level").attr("data-height");
368	$("a.menu_fst.on").removeClass("on");
369	if ($(".gnb_menu").is("#kopo_gnb")) {
370		$(".sub_level.on").removeClass("on").slideUp(200);
371	} else {
372		$(".sub_level.on").removeClass("on").fadeOut(200);
373	}
374	$(".gnb_menu").not("#kopo_gnb").css("height", h + "px");
375	$(obj).addClass("on").next(".sub_level").addClass("on").slideDown(500);
376}
377
378/**
379 * GNB Show All in one menu (for Campus)
380 * @param obj 메뉴
381 * @param idx 1뎁스 메뉴 인덱스
382 */
383function gnbAllMenuOver(obj, idx) {
384	if ($(obj).hasClass("on")) {
385		gnbMenuOut();
386		return;
387	}
388	var alltype = $(".sub_level.alltype");
389	alltype.find(".menu_scd.on").removeClass("on");
390	alltype.find(".menu_scd").eq(idx).addClass("on");
391	$("a.menu_fst.on").removeClass("on");
392	$(obj).addClass("on");
393	if (!alltype.hasClass("on")) {
394		var h = alltype.attr("data-height");
395		$(".gnb_menu").not("#kopo_gnb").css("height", h + "px");
396		alltype.addClass("on").slideDown(500);
397	}
398}
399
400function mobileMenuOver(obj){
401	$(obj).parent().addClass("active").siblings().removeClass("active");
402}
403
404function mobileMenuSlide(obj){
405	
406	if($(obj).next().is(":visible")){
407		$(obj).parent().removeClass("active");
408		$(obj).next().slideUp();
409	}else{
410		$(obj).parent().addClass("active");
411		$(obj).next().slideDown();
412	}
413}
414
415/**
416 * 사이즈로 모바일 웹 체크
417 * @param obj
418 */
419function mobileMenutoggle(isCampus,kmenu,link){
420	/*$(obj).parent().parent().toggle();*/
421	var screenWidth = document.documentElement.clientWidth || document.body.clientWidth;
422	if($('.mobile_menu').is(":visible")){
423		$('.mobile_menu').hide();
424		$('.menuSearch').val("");
425	}else{
426		if (screenWidth <= 720) {
427			//모바일 에서는 메뉴노출
428			$('.mobile_menu').toggle();
429		}else{
430			//웹에서는 페이지 이동
431			if(isCampus&&$('#kopo_wrap').hasClass('active')){
432				//캠퍼스인데 법인페이지 이동해서 전체메뉴
433				var newWindow = window.open("about:blank");
434				var res=link.split("/")
435				newWindow.location.href = "/content.do?menu="+kmenu;
436			}else{
437				//캠퍼스 페이지, 법인 페이지
438				location.href = link;
439			}
440			
441		}
442	}
443}
444
445/**
446 * GNB Hide
447 */
448function gnbMenuOut() {
449	$("a.menu_fst.on").removeClass("on");
450	$(".sub_level.on").removeClass("on").slideUp(500);
451	$(".gnb_menu").not("#kopo_gnb").removeAttr("style");
452}
453
454/**
455 * Toggle Language window
456 */
457function toggleLanguageWindow(off) {
458	if (off != undefined) {
459		$("a.btn_en").removeClass("on");
460		$("ul.util_select_lang").removeClass("on");	
461		return;
462	}
463	$("a.btn_en").toggleClass("on");
464	$("ul.util_select_lang").toggleClass("on");
465}
466
467/**
468 * 구글번역 토글
469 */
470function toggleLanguageGoogle(){
471	$("#google_translate_element").toggle();
472}
473/**
474 * Location menu Show
475 */
476function locMenuOver(obj, event) {
477	if (event.stopPropagation) {
478		event.stopPropagation();
479	} else {
480		// ie8
481		event.cancelBubble = true;
482	}
483	
484	if ($(obj).next(".loc_down").hasClass("on")) {
485		locMenuOut();
486		return;
487	}
488	locMenuOut();
489	$(obj).next(".loc_down").addClass("on");//.show();
490	$(obj).attr("title","동일 레벨의 메뉴 선택 팝업 확장됨");
491}
492
493/**
494 * Location menu Hide
495 */
496function locMenuOut() {
497	$(".locPop").attr("title","동일 레벨의 다른 메뉴 선택 팝업 축소됨");
498	$(".loc_down.on").removeClass("on");//.hide();
499}
500
501/**
502 * 학과메뉴 바로가기
503 * @param courseNo 학과번호
504 */
505function goCourse(courseNo) {
506	if (courseNo != undefined) {
507		$("a[data-course='"+courseNo+"']").trigger("click");
508	}
509}
510
511/**
512 * 링크정보 없는 메뉴일 때 첫번째 하위메뉴 선택
513 */
514function goMenu(menuNo, isKopo) {
515	var child = $("#chd"+menuNo);
516	
517	if (child.is("a")) {
518		if (child.is("[onclick]")) {
519			child.trigger("click");
520		} else { 
521			var url = child.attr("href");
522			var target = child.attr("target");
523			if (target != undefined && (target == "_blank" || _blank != "_new")) {
524				if (url != undefined && url != "#" && url != "") {
525					window.open(url,'_blank');
526				}
527			} else if (url != undefined && url != "#" && url != "") {
528				location.href = url;
529			}
530		}
531	} else if (child.is("li")) {
532		var realMenu = child.nextAll(":not(li[class]):eq(0)");
533		if (realMenu.is("li")) {
534			realMenu.find("a").trigger("click");
535		} else {
536			goMenu(realMenu.attr("id").replace("chd", ""), isKopo);
537		}
538	} else if (child.is("input")) {
539		var type = child.val();
540		var prefix = isKopo ? kopoBaseUrl : baseUrl;
541		
542		switch(type) {
543		case 'MENUTY0000':
544			goMenu(child.data("child"), isKopo);
545			break;
546		case 'MENUTY0001':
547		case 'MENUTY0002':
548		case 'MENUTY0006':
549		case 'MENUTY0007':
550		case 'MENUTY0008':
551			location.href = prefix + "/content.do?menu=" + menuNo;
552			break;
553		case 'MENUTY0003':
554		case 'MENUTY0004':
555		case 'MENUTY0009':
556		case 'MENUTY0010':
557			location.href = prefix + "/board.do?menu=" + menuNo;
558			break;
559		}
560	}
561}
562
563function searchText(obj){
564	
565	if ($("#topsearch").val().trim()=="") {
566		$(obj).parent().prev().toggle();
567		$("#topsearch").focus();
568	}else{
569		if($("#topsearch").val().trim() == ""){
570			alert("검색어를 입력하세요.");
571			return false;
572		}else{
573			doSearch();
574		}
575	}
576	
577}
578
579/**
580 * 검색 상세조건 토글
581 */
582function showDetailCond() {
583	$("div#search_detail").toggleClass("show");
584	
585	if($('#search_detail').hasClass('show')){
586		$('#search_detail input').first().focus();
587	} else {
588		$('.sch_detail').focus();
589		document.getElementById("rb1_c1").focus();
590	}
591}
592
593function showAllCampus() {
594	$(".main_all_campus").toggleClass("show");
595	//법인인 경우 WA focus 예외처리
596	if($('a.gnb_all_campus').length == 0 && $('a#chd10282').attr('href') == "javascript:showAllCampus()") {
597		$('a#chd10282').addClass('gnb_all_campus');
598	}
599	if($('.main_all_campus').hasClass('show')){
600		// 레이어 팝업 focus
601		var lpObj = $('.main_all_campus');
602		var lpObjTabbable = lpObj.find("button, select, iframe, textarea, a");
603		var lpObjTabbableFirst = lpObjTabbable && lpObjTabbable.first();
604		var lpObjTabbableLast = lpObjTabbable && lpObjTabbable.last();
605		var tabDisable;
606
607		lpObjTabbable.length > 0 ? lpObjTabbableFirst.focus().on("keydown", function(event) { 
608		// 레이어 열리자마자 초점 받을 수 있는 첫번째 요소로 초점 이동
609			if (event.shiftKey && (event.keyCode || event.which) === 9) {
610				// Shift + Tab키 : 초점 받을 수 있는 첫번째 요소에서 마지막 요소로 초점 이동
611				event.preventDefault();
612				lpObjTabbableLast.focus();
613				
614			}
615		}) : lpObj.attr("tabindex", "0").focus().on("keydown", function(event){
616			tabDisable = true;
617			if ((event.keyCode || event.which) === 9) event.preventDefault();
618			// Tab키 / Shift + Tab키 : 초점 받을 수 있는 요소가 없을 경우 레이어 밖으로 초점 이동 안되게
619		});
620	
621		lpObjTabbableLast.on("keydown", function(event) {
622			if (!event.shiftKey && (event.keyCode || event.which) === 9) {
623				// Tab키 : 초점 받을 수 있는 마지막 요소에서 첫번째 요소으로 초점 이동
624				event.preventDefault();
625				lpObjTabbableFirst.focus();
626			}
627		});
628		// Esc키 : 레이어 닫기
629		$(document).on("keydown", function(event) {
630			var keyType = event.keyCode || event.which;
631			if (keyType === 27) {
632				$('.main_all_campus').removeClass('show');
633				$('a.gnb_all_campus').focus();
634			}
635		});
636	} else {
637		$('a.gnb_all_campus').focus();
638	}
639	
640	$(window).scrollTop(0);
641	
642}
643function goCampus(obj) {
644	$(".main_all_campus").toggleClass("show");
645	$(window).scrollTop(0);
646	var newWindow = window.open(obj.href,obj.target);
647}
648
649
650/**
651 * Formatted String
652 */
653String.format = function() {
654    var theString = arguments[0];
655    for (var i = 1; i < arguments.length; i++) {
656        theString = theString.replace("%s", arguments[i]);
657    }
658    return theString;
659};
660
661/**
662 * To camel string
663 * @returns
664 */
665String.prototype.toCamelCase = function() {
666    return this.toLowerCase().replace(/(\_[a-z])/g, function(arg){
667        return arg.toUpperCase().replace('_','');
668    });
669}
670
671function openLinkWithTarget(url,target){
672	if(target == "N"){
673		window.open(url,"about:blank");
674		return;
675	}
676	window.location.href  = url;
677}
678
679
680function disclosurePop(){
681	window.open(contextPath+"/api/disclosurePop.do",'disclosurePop','scrollbars=yes,width=510,height=680');
682}
683
684var Urlexpression = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;
685var UrlRegex = new RegExp(Urlexpression);
686
687/**
688 * Get InternetExplorer Version
689 * @returns {Number}
690 */
691function getInternetExplorerVersion() {
692	var word;
693	var version = "N/A";
694
695	var agent = navigator.userAgent.toLowerCase();
696	var name = navigator.appName;
697
698	// IE old version ( IE 10 or Lower )
699	if (name == "Microsoft Internet Explorer") {
700		word = "msie ";
701	} else {
702		// IE 11
703		if (agent.search("compatible") > -1) {
704			word = "msie ";
705		} else if (agent.search("trident") > -1) {
706			word = "trident/.*rv:";
707		} else if (agent.search("edge/") > -1) {
708			// IE 12  ( Microsoft Edge )
709			word = "edge/";
710		}
711	}
712
713	var reg = new RegExp(word + "([0-9]{1,})(\\.{0,}[0-9]{0,1})");
714	if (reg.exec(agent) != null) {
715		version = parseFloat(RegExp.$1 + RegExp.$2);
716	}
717
718	return version;
719}
720
721/**
722 * Trim string function support for IE8 or more
723 */
724if (typeof String.prototype.trim !== 'function') {
725    String.prototype.trim = function() {
726        return this.replace(/^\s+|\s+$/g, ''); 
727    };
728}
729
730function openAtch(idx) {
731	var i = document.getElementById("hhi"+idx).value;
732	var s = document.getElementById("hhs"+idx).value;
733	var rUrl = "/cmm/fms/Download.do?atchFileId="+i+"&fileSn="+s+"&dn=Y";
734	rUrl = rUrl.replace(";","");
735	location.href=rUrl;
736	/*
737	var ifrm = document.createElement("iframe"); ifrm.name="tempi";
738	var frm = document.createElement("form");
739	frm.name = "tempf"; frm.method = "post"; frm.target = "tempi";
740	frm.action = contextPath + "/html/atch.jsp";
741	frm.appendChild(makeP("atchFileId", i));
742	frm.appendChild(makeP("fileSn", s));
743	function makeP(k,v) {
744		var p = document.createElement("input");
745		p.type="hidden"; p.name=k; p.value=v;
746		return p;
747	}
748	document.body.appendChild(ifrm);
749	document.body.appendChild(frm);
750	frm.submit();
751	setTimeout(function(){ ifrm.remove(); frm.remove(); },200);
752	*/
753}
754
755function kopoGetCookie(cname) {
756	// var name = cname + "=";
757    // var ca = document.cookie.split(';');
758
759    // for(var i=0; i<ca.length; i++) {
760    //     var c = ca[i];
761    //     while (c.charAt(0)==' ') c = c.substring(1);
762    //     if (c.indexOf(name) != -1) return c.substring(name.length,c.length);
763    // }
764	var x, y;
765	var val = document.cookie.split(';');
766  
767	for (var i = 0; i < val.length; i++) {
768	  x = val[i].substr(0, val[i].indexOf('='));
769	  y = val[i].substr(val[i].indexOf('=') + 1);
770	  x = x.replace(/^\s+|\s+$/g, ''); // 앞과 뒤의 공백 제거하기
771	  if (x == cname) {
772		return unescape(y); // unescape로 디코딩 후 값 리턴
773	  }
774	}
775	return "";
776}
777function kopoSetCookie(name, value, expirehours){
778	var todayDate = new Date();
779	todayDate.setHours(todayDate.getHours() + expirehours);   //시간
780	document.cookie = name + "=" + escape(value)+";path=/;expires="+todayDate.toGMTString()+";";
781}
782
783var breakpoint = 1024;
784var windowWidth = $(window).width();
785
786function gnb() {
787	if (windowWidth > breakpoint) {
788	  $('.gnb .depth-1 > li').on('mouseover focusin', function () {
789		$(this).addClass('active').siblings().removeClass('active');
790	  });
791	  $('header').on('mouseover focusin', function () {
792		$('.gnb .depth-1 > li').removeClass('active');
793	  });
794	  $('.float-btn-group').on('focusin', function () {
795		$('.gnb .depth-1 > li').removeClass('active');
796	  });
797	  $('.gnb .depth-2 .container').on('mouseleave', function (e) {
798		var target = this;
799		setTimeout(function (e) {
800		  $(target).parents('li').removeClass('active');
801		}, 200);
802	  });
803	  $(document).on('scroll', function () {
804		if ($(document).scrollTop() > 0) {
805		  $('.gnb .depth-1 > li').removeClass('active');
806		}
807	  });
808	} else {
809	  $('.gnb-toggle.for-mobile').on('click', function (e) {
810		e.preventDefault();
811		$('.gnb-list').addClass('active');
812		$('header').css('z-index', '');
813		$('header').find('.active').removeClass('active');
814		$('html').addClass('hold');
815	  });
816	  $('.btn-close-menu').on('click', function (e) {
817		e.preventDefault();
818		$('.gnb-list').removeClass('active');
819		$('html').removeClass('hold');
820	  });
821	}
822  } // 모바일 gnb
823  
824  
825  function gnbMobile() {
826	if (windowWidth <= breakpoint) {
827	  $('.gnb-list .depth-1 > li > a').on('click', function (e) {
828			var nav_list_cnt = $(this).parent().find('.depth-2 .nav-list').length;
829			//console.log("nav_list_cnt:"+nav_list_cnt);
830			if(nav_list_cnt > 0) {
831			  var href = $(this).attr("href");
832			  if(href.indexOf("javascript") < 0) {
833				e.preventDefault();
834				$(this).siblings('.depth-2').slideToggle();
835			  }
836			}
837	  });
838	}
839  } 
840  
841  //언어선택 selectbox
842  function selectLang() {
843	$('.select-language > a , .link-select-language > a').on('click', function (e) {
844	  e.preventDefault();
845	  $(this).siblings(".lang-list").toggleClass("active");
846	  if($(this).siblings(".lang-list").hasClass('active') === true){
847		$(this).attr('title','언어선택 메뉴 접기')
848	  }else{
849		$(this).attr('title','언어선택 메뉴 펼치기')		  
850	  }
851	});
852	$('.select-language .gnb-anchor').on('click', function (e) {
853		e.preventDefault();
854		if($(".gnb-item--type-changeleng").hasClass('js--langchange') === true){
855			$(this).siblings(".lang-list").addClass("active");
856			$(this).attr('title','언어선택 메뉴 접기')
857		}else {
858			$(this).siblings(".lang-list").removeClass("active");
859			$(this).attr('title','언어선택 메뉴 펼치기')
860		}
861	});
862	$(document).mouseup(function(e){
863		var langbox = $(".select-language");
864		if(langbox.has(e.target).length === 0){
865			langbox.find('.lang-list').removeClass("active");
866			$('.select-language > a , .link-select-language > a').attr('title','언어선택 메뉴 펼치기')	
867		}
868	});
869
870  }
871
872  
873// 다솜 gnb
874function gnbDrawer() {
875	var breakpoint = 1024;
876	var windowWidth = $(window).width();
877	if (windowWidth > breakpoint) {
878	$('.gnb .depth-1 > li > a').on('mouseover focus', function () {
879		$(this).parent("li").addClass('active').siblings().removeClass('active');
880		$('.gnb').addClass('active');
881	});
882	$('.header,.logo,.btn-menu-hamburger').on('mouseover focus', function () {
883		$('.gnb .depth-1 > li').removeClass('active');
884			$('.gnb').removeClass('active');
885	});
886	$('.gnb .depth-2').on('mouseleave', function (e) {
887		var target = this;
888		setTimeout(function (e) {
889		$(target).parents('li').removeClass('active');
890		$('.gnb').removeClass('active');
891		}, 200);
892	});
893	$(document).on('scroll', function () {
894		if ($(document).scrollTop() > 0) {
895		$('.gnb .depth-1 > li').removeClass('active');
896		$('.gnb').removeClass('active');
897		}
898	});
899	} else {
900	$('.gnb .btn-menu-hamburger.for-mobile').on('click', function (e) {
901		e.preventDefault();
902		$('.gnb .gnb-wrap').addClass('open');
903		$('html').addClass('hold');
904	});
905	$('.gnb-wrap .btn-close-menu').on('click', function (e) {
906		e.preventDefault();
907		$('.gnb .gnb-wrap').removeClass('open');
908		$('html').removeClass('hold');
909	});
910	$('.gnb .depth-1 > li > a').on('click', function (e) {
911		e.preventDefault();
912		$(this).parent('li').addClass('active').siblings().removeClass('active');
913	});
914	}
915}
916
917
918// 팝업
919function popupOpen(pop) {
920	$(pop).removeClass('is-visible');
921}
922
923function popupClose(pop) {
924$(pop).addClass('is-visible');
925}
926

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.