PageSourceSearch

https://kpx.or.kr/js/global.js

js kpx.or.kr collected 2026-10-02 06:16:25 UTC 38,895 bytes, 1,397 lines download raw bytes

1// 화면 확대 축소
2var zoomRate = 10;
3var curRate = 100;
4var minRate = 100;
5var maxRate = 200;
6
7function zoomInOut(value) {
8	if (((value == "plus")&&(curRate >= maxRate))||((value == "minus") && (curRate <= minRate))) {
9	    return;
10	} 
11	if (value == "plus") {
12		curRate = parseInt(curRate) + parseInt(zoomRate);
13	} else if (value == "minus") {
14		curRate = parseInt(curRate) - parseInt(zoomRate);
15	} else {
16		curRate = 100;
17	}
18	document.body.style.zoom = curRate + '%';	
19	try
20	{
21		var obj = document.getElementById('flash_visual').getElementsByTagName('object')[0];
22
23		if (curRate==100)
24		{
25			obj.style.display	= 'block';
26		}
27		else
28		{
29			obj.style.display	= 'none';
30		}
31	}
32	catch (e)
33	{ console.log(""); 
34	}
35}
36
37// 프린트
38function printAreaAction(){
39	//window.onbeforeprint = beforePrint;
40	//window.onafterprint  = afterPrint;
41	window.print();
42}
43// 프린트할 내용
44var initBody;
45function beforePrint(){
46	initBody = document.body.innerHTML;
47	document.body.innerHTML = contents.innerHTML;
48}
49function afterPrint(){
50	document.body.innerHTML = initBody;
51}
52
53// 즐겨찾기
54function bookmarkSite(title, url){
55	try{
56		window.external.AddFavorite(url, title);
57	}catch (e) {
58		alert("Ctrl+D 키를 눌러서 북마크를 추가할 수 있습니다.");
59	}
60}
61
62//서브메뉴 보기
63var sMenu_launch = "";
64function detailSubMenu(name)
65{
66	try{
67		submenu = document.getElementById(name).style;
68		if(sMenu_launch != submenu)
69		{
70			if(sMenu_launch != "")
71			{
72				sMenu_launch.display = "none";
73			}
74			submenu.display = "block";
75			sMenu_launch = submenu;
76			$(".question > a").addClass('open');
77			$(".question > a").removeClass('close');
78		}
79		else
80		{
81			submenu.display = "none";
82			$(".question > a").addClass('close');
83			$(".question > a").removeClass('open');
84			sMenu_launch = "";
85		}
86	}catch (e) { console.log(""); }
87}
88
89// 팝업창 openWin(파일경로, 타겟, 넓이, 높이, 스크롤바여부, );
90function openWin (url, target, width, height, scrollbars, pos, resize)
91{   
92	var uri		= url.replace(/(&amp;)/gi, "&");
93	var xy_pos	= "";
94	
95	if (pos)
96	{
97		xy_pos  = ",left=" + (Math.round(screen.width/2) - Math.round(width/2));
98		xy_pos += ",top="  + (Math.round(screen.height/3) - Math.round(height/3));
99	}
100
101	var remote	= window.open(uri, target, "width=" + width
102				+ ",height=" + height 
103				+ ",scrollbars=" + scrollbars 
104				+ ",resizable=" + resize
105				+ xy_pos
106				+ ",toolbar=no,location=no"
107				+ ",directories=no,menubar=no,status=yes");
108	
109	remote.focus();
110	return remote;
111}
112
113
114/* Initialize Top Menu */
115function initTopMenu(select1, select2)
116{
117	var focus	= false;
118	var root	= document.getElementById('head_menu');
119	var delay	= 3000;
120	var menu	= new Array();
121	var item	= new Array();
122
123	var src2menu	= new Array();
124	var src2item	= new Array();
125
126	var getSrc	= function (src)
127	{
128		var file	= src.split('/');
129		var name	= file[(file.length-1)].split('.');
130			name	= src.replace(file[(file.length-1)], name[0] + '_on.' + name[1]);
131
132		return {on:name, off:src};
133	};
134
135	for (var i=0; i<root.childNodes.length; i++)
136	{
137		if (root.childNodes[i].nodeName!='LI') { continue; }
138
139		for (var j=0; j<root.childNodes[i].childNodes.length; j++)
140		{
141			if (root.childNodes[i].childNodes[j].nodeType!=1) { continue; }
142			if (root.childNodes[i].childNodes[j].nodeName=='A')
143			{
144				menu.push(root.childNodes[i].childNodes[j]);
145				src2menu.push(getSrc(root.childNodes[i].childNodes[j].getElementsByTagName('img')[0].src));
146
147				var sub_menu	= root.childNodes[i].getElementsByTagName('ul')[0];
148				var src_item	= new Array();
149
150				if (sub_menu)
151				{
152					sub_menu.style.display	= 'block';
153					var offset	= 0;
154
155					for (var k in sub_menu.childNodes)
156					{
157						if (sub_menu.childNodes[k].nodeName=='LI')
158						{
159							offset	+= 	parseInt(sub_menu.childNodes[k].offsetWidth, 10);
160							src_item.push(getSrc(sub_menu.childNodes[k].getElementsByTagName('img')[0].src));
161						}
162					}
163					
164					sub_menu.style.width	= offset + "px";
165					sub_menu.style.display	= "none";
166
167					for (var l in sub_menu.childNodes)
168					{
169						if (typeof(sub_menu.childNodes[l])=='object' && sub_menu.childNodes[l].nodeType==3 && sub_menu.childNodes[l].nodeName=='#text')
170						{
171							sub_menu.removeChild(sub_menu.childNodes[l]);
172						}
173					}
174
175					item.push(sub_menu);
176				}
177				else
178				{
179					item.push('');
180				}
181
182				src2item.push(src_item);
183			}
184		}
185	}				
186
187	var getIndex	= function (obj, self)
188	{
189		for (var i in obj) { if (obj[i]==self) { return i; } }
190	}
191	
192	for (var i in menu)
193	{
194		menu[i].onfocus	= menu[i].onmouseover = function ()
195		{
196			root.className	= 'head-menu';
197			focus	= true;
198
199			var index	= getIndex(menu, this);
200			this.getElementsByTagName('img')[0].setAttribute('src', src2menu[index].on);
201			this.className	= 'on';
202
203			for (var i in item)
204			{
205				if (item[i].nodeName!='UL') { continue; }
206
207				if (i==index)
208				{
209					root.className	= 'head-menu-on';
210					item[i].style.display	= 'block';
211				}
212				else
213				{
214					item[i].style.display	= 'none';
215				}
216			}
217		};
218	}
219
220	for (var i in item)
221	{
222		if (item[i].nodeName!='UL') { continue; }
223
224		var item_a	= item[i].getElementsByTagName('a');
225
226		for (var j in item_a)
227		{
228			item_a[j].i	= i;
229
230			item_a[j].onmouseover	= item_a[j].onfocus	= function ()
231			{
232				root.className	= 'head-menu-on';
233				focus	= true;
234
235
236				var j	= this.i;
237
238				if (item[j].nodeName=='UL')
239				{
240					for (var k in item[j].childNodes)
241					{
242						if (!item[j].childNodes[k]) { continue; }
243						if (item[j].childNodes[k].nodeName!='LI') { continue; }
244						
245						if (item[j].childNodes[k]==this.parentNode)
246						{
247							menu[j].getElementsByTagName('img')[0].setAttribute('src', src2menu[j].on);
248							menu[j].className	= 'on';
249							item[j].childNodes[k].getElementsByTagName('img')[0].setAttribute('src', src2item[j][k].on);
250						}
251						else
252						{
253							item[j].childNodes[k].getElementsByTagName('img')[0].setAttribute('src', src2item[j][k].off);
254						}
255					}
256				}
257			};
258		}
259	}
260
261
262	// selected
263	var selected	= function ()
264	{
265		var s1	= parseInt((select1-1), 10);
266		var s2	= parseInt((select2-1), 10);
267
268		for (var i in menu)
269		{
270			if (i==s1)
271			{
272				root.className	= 'head-menu-on';
273				menu[i].getElementsByTagName('img')[0].setAttribute('src', src2menu[i].on);
274				menu[i].className	= 'on';
275				
276				focus	= true;
277
278				if (item[i])
279				{
280					item[i].style.display	= 'block';
281
282					for (var j in item[i].childNodes)
283					{
284						if (!item[i].childNodes[j]) { continue; }
285						if (item[i].childNodes[j].nodeName!='LI') { continue; }
286
287						if (j==s2)
288						{
289							item[i].childNodes[j].getElementsByTagName('img')[0].setAttribute('src', src2item[i][j].on);
290						}
291						else
292						{
293							item[i].childNodes[j].getElementsByTagName('img')[0].setAttribute('src', src2item[i][j].off);
294						}
295					}
296				}
297			}
298			else
299			{
300				menu[i].getElementsByTagName('img')[0].setAttribute('src', src2menu[i].off);
301				menu[i].className	= '';
302			}
303		}
304	};
305
306	selected();
307
308	var a = root.getElementsByTagName("a");
309	
310	for (var i in a)
311	{
312		a[i].onmouseout	= a[i].onblur	= function ()
313		{
314			for (var i in menu)
315			{
316				menu[i].getElementsByTagName('img')[0].setAttribute('src', src2menu[i].off);
317				menu[i].className	= '';
318
319				if (item[i])
320				{
321					for (var j in item[i].childNodes)
322					{
323						if (!item[i].childNodes[j]) {continue;} 
324						if (item[i].childNodes[j].nodeName=='LI')
325						{
326							item[i].childNodes[j].getElementsByTagName('img')[0].setAttribute('src', src2item[i][j].off);
327						}
328					}
329				}
330				
331			}
332			
333			focus	= false;
334
335			setTimeout(function()
336			{
337				if (focus==false)
338				{
339					for (var i in item)
340					{
341						if (item[i].nodeName!='UL') { continue; }
342						item[i].style.display	= 'none';
343					}
344
345					root.className	= 'head-menu';
346
347					selected();
348				}
349			}
350			, delay);
351		}
352	}
353}
354
355// 1차메뉴 활성화
356function initNavigation(seq) {		
357	var nav = document.getElementById("head_menu");
358	var allB = nav.getElementsByTagName("a");
359	for(var k = 0; k < allB.length; k++) {
360		var str = allB.item(k) + "";
361		if(str.substr(str.length-10,2) == seq){
362			allB.item(k).className = "active";
363			return false;
364		}
365	}
366}
367
368// 1차메뉴 select 활성화
369function init1DepthComboMenu(seq) {
370	var nav = document.getElementById("head_menu_depth1");
371	var allB = nav.getElementsByTagName("a");
372	for(var k = 0; k < allB.length; k++) {
373		var str = allB.item(k) + "";
374		if(str.substr(str.length-10,2) == seq){
375			allB.item(k).parentNode.className = "active";
376			return false;
377		}
378	}
379}
380
381// 2차메뉴 select 활성화
382function init2DepthComboMenu(seq) {
383	var nav = document.getElementById("head_menu_depth2");
384	var allB = nav.getElementsByTagName("a");
385	for(var k = 0; k < allB.length; k++) {
386		var str = allB.item(k) + "";
387		if(str.substr(str.length-10,4) == seq){
388			allB.item(k).parentNode.className = "active";
389			return false;
390		}
391	}
392}
393
394// 3차메뉴 select 활성화
395function init3DepthComboMenu(seq) {
396	var nav = document.getElementById("head_menu_depth3");
397	var allB = nav.getElementsByTagName("a");
398	for(var k = 0; k < allB.length; k++) {
399		var str = allB.item(k) + "";
400		if(str.substr(str.length-10,6) == seq){
401			allB.item(k).parentNode.className = "active";
402			return false;
403		}
404	}
405}
406
407// 4차메뉴 select 활성화
408function init4DepthComboMenu(seq) {
409	var nav = document.getElementById("head_menu_depth4");
410	var allB = nav.getElementsByTagName("a");
411	for(var k = 0; k < allB.length; k++) {
412		var str = allB.item(k) + "";
413		if(str.substr(str.length-10,8) == seq){
414			allB.item(k).parentNode.className = "active";
415			return false;
416		}
417	}
418}
419
420// 5차메뉴 select 활성화
421function init5DepthComboMenu(seq) {
422	var nav = document.getElementById("head_menu_depth5");
423	var allB = nav.getElementsByTagName("a");
424	for(var k = 0; k < allB.length; k++) {
425		var str = allB.item(k) + "";
426		if(str.substr(str.length-10,10) == seq){
427			allB.item(k).parentNode.className = "active";
428			return false;
429		}
430	}
431}
432
433// 모바일 1차메뉴 활성화
434function initNavigationMbl(seq) {		
435	var nav = document.getElementById("head_menu_all");
436	var allB = nav.getElementsByTagName("a");
437	for(var k = 0; k < allB.length; k++) {
438		var str = allB.item(k) + "";
439		if(str.substr(str.length-10,2) == seq){
440			allB.item(k).className = "active";
441			$("div.submenu"+seq).attr("style","display:block");
442			return false;
443		}
444	}
445}
446
447// 메뉴 네비게이션
448function initNavigation2(seq, seq2) {		
449	var nav = document.getElementById("head_menu");
450	nav.menu = new Array();
451	nav.current = null;
452	nav.menuseq = 0;
453	var navLen = nav.childNodes.length;
454	var menuImg;
455	
456	var allA = nav.getElementsByTagName("a");
457	for(var k = 0; k < allA.length; k++) {
458		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
459			nav.isOver = true;
460		}
461		allA.item(k).onmouseout = allA.item(k).onblur = function () {
462			nav.isOver = false;
463			setTimeout(function () {
464				if (nav.isOver == false) {
465					if (nav.menu[seq]) {
466						nav.menu[seq].onmouseover();
467					} else if(nav.current) {
468						menuImg = nav.current.childNodes.item(0);
469						menuImg.src = menuImg.src.replace("_on.png", ".png");
470						if (nav.current.submenu) {
471							nav.current.submenu.style.display = "none";
472						}
473						nav.current = null;
474					}
475				}
476			}, 3000);
477		}
478	}
479	
480	var allB = nav.getElementsByTagName("a");
481	for(var k = 0; k < allB.length; k++) {
482		var str = allB.item(k) + "";
483		if(str.substr(str.length-12,4) == seq2){
484			allB.item(k).className = "active";
485		}
486	}
487
488	for (var i = 0; i < navLen; i++) {
489		var navItem = nav.childNodes.item(i);
490		if (navItem.tagName != "LI") {
491			continue;
492		}
493		var navAnchor = navItem.getElementsByTagName("a").item(0);
494		navAnchor.submenu = navItem.getElementsByTagName("ul").item(0);
495	
496		navAnchor.onmouseover = navAnchor.onfocus = function () {
497			if (nav.current) {
498				menuImg = nav.current.childNodes.item(0);
499				menuImg.src = menuImg.src.replace("_on.gif", ".gif");
500				if (nav.current.submenu) {
501					nav.current.submenu.style.display = "none";
502				}
503				nav.current = null;
504			}
505			if (nav.current != this) {
506				menuImg = this.childNodes.item(0);
507				menuImg.src = menuImg.src.replace(".gif", "_on.gif");
508				if (this.submenu) {
509					this.submenu.style.display = "block";
510				}
511				nav.current = this;
512			}
513			nav.isOver = true;
514		}
515		nav.menuseq++;
516		nav.menu[nav.menuseq] = navAnchor;
517	}
518	if (nav.menu[seq]) {
519		nav.menu[seq].onmouseover();
520	}
521}
522
523/* Initialize Left Menu - li */
524function initLeftMenuLI(select1, select2)
525{	
526	var nav = document.getElementById("left_menu_top");
527	nav.menu = new Array();
528	nav.current = null;
529	nav.menuseq = 0;
530	var navLen = nav.childNodes.length;
531	var menuImg;
532	
533	var allB = nav.getElementsByTagName("li");
534	for(var k = 0; k < allB.length; k++) {
535		var str = allB.item(k).id + "";
536		if(str.substr(str.length-10,6) == select2){
537			allB.item(k).className += " active";
538			try{ allB.item(k).childNodes.item(0).childNodes.item(0).src = allB.item(k).childNodes.item(0).childNodes.item(0).src.replace(".gif", "_on.gif"); }catch (e) { console.log(""); }
539		}
540	}
541	
542	var allAA = nav.getElementsByTagName("ul");
543	for(var k = 0; k < allAA.length; k++) {
544		var str = allAA.item(k).className + "";
545		if(str.substr(2,4) == select1){
546			allAA.item(k).style.display = "block";
547		}
548	}
549
550	var allA = nav.getElementsByTagName("li");
551	for(var k = 0; k < allA.length; k++) {
552		var str = allA.item(k).id + "";
553		if(str.substr(str.length-10,4) == select1){
554			console.log($('#'+str));
555			$('#'+str).children('a').attr('aria-expanded','true');
556			allA.item(k).className += " active";
557			try{ allB.item(k).childNodes.item(0).childNodes.item(0).src = allB.item(k).childNodes.item(0).childNodes.item(0).src.replace(".gif", "_on.gif"); }catch (e) { console.log(""); }
558			return;
559		}
560	}
561}
562
563/* Initialize Left Menu - a */
564function initLeftMenu(select1, select2)
565{	
566	var nav = document.getElementById("left_menu_top");
567	nav.menu = new Array();
568	nav.current = null;
569	nav.menuseq = 0;
570	var navLen = nav.childNodes.length;
571	var menuImg;
572
573	var allAA = nav.getElementsByTagName("ul");
574	for(var k = 0; k < allAA.length; k++) {
575		var str = allAA.item(k).className + "";
576		if(str.substr(0,4) == select1){
577			allAA.item(k).style.display = "block";
578		}
579	}
580
581	var allB = nav.getElementsByTagName("a");
582	for(var k = 0; k < allB.length; k++) {
583		var str = allB.item(k) + "";
584		if(str.substr(str.length-10,6) == select2){
585			allB.item(k).className = "active";
586		}
587	}
588
589	var allA = nav.getElementsByTagName("a");
590	for(var k = 0; k < allA.length; k++) {
591		var str = allA.item(k) + "";
592		if(str.substr(str.length-10,4) == select1){
593			allA.item(k).className = "active";
594			return;
595		}
596	}
597}
598
599/* 3Depth Left Menu */
600function init3DepthMenu(select1)
601{	
602	var nav = document.getElementById("depth3_menu_div");
603	nav.menu = new Array();
604	nav.current = null;
605	nav.menuseq = 0;
606	var navLen = nav.childNodes.length;
607	var menuImg;
608	
609	var allA = nav.getElementsByTagName("li");
610	for(var k = 0; k < allA.length; k++) {
611		var str = allA.item(k).id + "";
612		if(str.substr(str.length-10,6) == select1){
613			allA.item(k).className = "active";
614			return;
615		}
616	}
617}
618
619/* 4Depth Left Menu */
620function init4DepthMenu(select1)
621{	
622	var nav = document.getElementById("depth4_menu_div");
623	nav.menu = new Array();
624	nav.current = null;
625	nav.menuseq = 0;
626	var navLen = nav.childNodes.length;
627	var menuImg;
628	
629	var allA = nav.getElementsByTagName("li");
630	for(var k = 0; k < allA.length; k++) {
631		var str = allA.item(k).id + "";
632		if(str.substr(str.length-10,8) == select1){
633			allA.item(k).className = "active";
634			return;
635		}
636	}
637}
638
639/* 5Depth Left Menu */
640function init5DepthMenu(select1)
641{	
642	var nav = document.getElementById("depth5_menu_div");
643	nav.menu = new Array();
644	nav.current = null;
645	nav.menuseq = 0;
646	var navLen = nav.childNodes.length;
647	var menuImg;
648	
649	var allA = nav.getElementsByTagName("li");
650	for(var k = 0; k < allA.length; k++) {
651		var str = allA.item(k).id + "";
652		if(str.substr(str.length-10,10) == select1){
653			allA.item(k).className = "active";
654			return;
655		}
656	}
657}
658
659// 이미지 오버
660function initImgOver(as_ID) {
661	var rollNav = document.getElementById(as_ID);	
662	var rollLan = rollNav.childNodes.length;	
663	var rollItem;	
664	var rollAnchor;
665	var rollImg;	
666	
667	for (var i=0; i < rollLan; i++) {
668		rollItem = rollNav.childNodes.item(i);
669		if (rollItem.tagName != "LI") {
670			continue;
671		}
672		rollAnchor = rollItem.getElementsByTagName("a").item(0);
673		if (rollAnchor.className != "over") {		
674			rollAnchor.onmouseover = rollAnchor.onfocus = function () {
675				if (rollNav.current) {
676					rollImg = rollNav.current.childNodes.item(0);
677					rollImg.src = rollImg.src.replace("_on.gif", ".gif");
678					rollNav.current = null;				
679				}
680				if ((rollNav.current == null) || (rollNav.current != this)) {
681					rollImg = this.childNodes.item(0);
682					rollImg.src = rollImg.src.replace(".gif", "_on.gif");
683					rollNav.current = this;
684				}
685				rollNav.isOver = true;			
686			}
687			rollAnchor.onmouseout = rollAnchor.onblur = function () {
688				if (rollNav.current) {
689					rollImg = rollNav.current.childNodes.item(0);
690					rollImg.src = rollImg.src.replace("_on.gif", ".gif");
691					rollNav.current = null;				
692				}
693			}
694		}
695	}	
696}
697
698function getCookie(name)
699{
700	var nameOfCookie = name + "=";
701	var x = 0;
702	while ( x <= document.cookie.length )
703	{
704		var y = ( x + nameOfCookie.length );
705		if ( document.cookie.substring(x,y) == nameOfCookie )
706		{
707			if( (endOfCookie = document.cookie.indexOf(";", y)) == -1 )
708				endOfCookie = document.cookie.length;
709			return unescape(document.cookie.substring(y, endOfCookie)); 
710		}
711		x = document.cookie.indexOf( " ", x ) + 1;
712		if ( x == 0 )
713			break;
714	}
715	return "";		
716}
717
718// 레이어 팝업 열기
719function openLayer(arg)
720{
721	var pop = document.getElementById(arg);
722	pop.style.display = "block";
723}
724
725// 레이어 팝업 닫기
726function closeLayer(arg)
727{
728	var pop = document.getElementById(arg);
729	pop.style.display = "none";
730}
731
732// iframe 세로풀
733function frameResize(obj){
734	var obj_document = obj.contentWindow.document;
735	if(obj_document.height){
736		obj.style.height = obj_document.height+"px";
737	}else{
738		obj.style.height = obj_document.body.scrollHeight+"px";
739	}
740}
741
742// 메인 최근게시물 탭
743function initBoardArticle (container_id)
744{
745	var container	= document.getElementById(container_id);
746	var h3			= container.getElementsByTagName("h3");
747
748	for (var i=0; i<h3.length; i++)
749	{
750		if (h3.item(i).id=="article_setting")
751		{
752			h3.item(i).id			= "js_" + h3.item(i).id;
753
754			var set	= h3.item(i).getElementsByTagName("a").item(0);
755				set.container	= h3;
756				set.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
757				set.targetElement.style.position	= "absolute";
758				set.targetElement.style.display		= "none";
759				set.targetElement.style.padding	= "0";
760				set.onclick	= function ()
761				{
762					this.targetElement.style.display	= "block";
763					return false;
764				}
765
766				continue;
767		}
768
769		h3.item(i).className	= "js_" + h3.item(i).className;
770		h3.item(i).id			= "js_" + h3.item(i).id;
771
772		var article	= h3.item(i).getElementsByTagName("a").item(0);
773			article.container		= h3;
774			article.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
775			article.targetElement.style.display	= "none";
776			article.onclick	= article.onfocus	= function ()
777			{
778				var current	= this.container.current;
779
780				if (current!=this)
781				{
782					if (current)
783					{
784						current.targetElement.style.display	= "none";
785						current.className	= "";
786					}
787
788					this.targetElement.style.display	= "block";
789					this.className	= "menu_on";
790					this.container.current	= this;
791				}
792				return false;
793
794			};
795			
796			article.className	= "";
797
798			if (!article.container.first) { article.container.first	= article;}
799	}
800	
801	h3.first.onclick();
802}
803
804// 메인 최근게시물 탭
805function initBoardArticle_onoff (container_id)
806{
807	var container	= document.getElementById(container_id);
808	var h3			= container.getElementsByTagName("h4");
809
810	for (var i=0; i<h3.length; i++)
811	{
812		if (h3.item(i).id=="article_setting")
813		{
814			h3.item(i).id			= "js_" + h3.item(i).id;
815
816			var set	= h3.item(i).getElementsByTagName("a").item(0);
817				set.container	= h3;
818				set.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
819				set.targetElement.style.position	= "absolute";
820				set.targetElement.style.display		= "none";
821				set.targetElement.style.padding	= "0";
822				set.onclick	= function ()
823				{
824					this.targetElement.style.display	= "block";
825					return false;
826				}
827
828				continue;
829		}
830
831		h3.item(i).className	= "js_" + h3.item(i).className;
832		h3.item(i).id			= "js_" + h3.item(i).id;
833
834		var article	= h3.item(i).getElementsByTagName("a").item(0);
835		article.container		= h3;
836		article.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
837		article.targetElement.style.display	= "none";
838		article.onclick	= article.onfocus	= function ()
839		{
840			var current	= this.container.current;
841			if (current!=this)
842			{
843				if (current)
844				{
845					current.targetElement.style.display	= "none";
846					current.className	= "";
847					//current.getElementsByTagName("img").item(0).src = (current.getElementsByTagName("img").item(0).src).replace("_on.gif", ".gif");
848				}
849
850				this.targetElement.style.display	= "block";
851				this.className	= "active";
852				this.container.current	= this;
853				//this.getElementsByTagName("img").item(0).src = (this.getElementsByTagName("img").item(0).src).replace(".gif", "_on.gif");
854			}
855			return false;
856
857		};
858		
859		article.className	= "";
860
861		if (!article.container.first) { article.container.first	= article;}
862	}
863	
864	h3.first.onclick();
865}
866
867// 메인 최근게시물 탭
868function initBoardArticle_over (container_id)
869{
870	var container	= document.getElementById(container_id);
871	var h3			= container.getElementsByTagName("h3");
872
873	for (var i=0; i<h3.length; i++)
874	{
875		if (h3.item(i).id=="article_setting")
876		{
877			h3.item(i).id			= "js_" + h3.item(i).id;
878
879			var set	= h3.item(i).getElementsByTagName("a").item(0);
880				set.container	= h3;
881				set.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
882				set.targetElement.style.position	= "absolute";
883				set.targetElement.style.display		= "none";
884				set.targetElement.style.padding	= "0";
885				set.onmouseover	= function ()
886				{
887					this.targetElement.style.display	= "block";
888					return false;
889				}
890
891				continue;
892		}
893
894		h3.item(i).className	= "js_" + h3.item(i).className;
895		h3.item(i).id			= "js_" + h3.item(i).id;
896
897		var article	= h3.item(i).getElementsByTagName("a").item(0);
898			article.container		= h3;
899			article.targetElement	= document.getElementById(h3.item(i).getElementsByTagName("a").item(0).href.split("#")[1]);
900			article.targetElement.style.display	= "none";
901			article.onmouseover	= article.onfocus	= function ()
902			{
903				var current	= this.container.current;
904
905				if (current!=this)
906				{
907					if (current)
908					{
909						current.targetElement.style.display	= "none";
910						current.className	= "";
911					}
912
913					this.targetElement.style.display	= "block";
914					this.className	= "menu_on";
915					this.container.current	= this;
916				}
917				return false;
918
919			};
920			
921			article.className	= "";
922
923			if (!article.container.first) { article.container.first	= article;}
924	}
925	
926	h3.first.onmouseover();
927}
928
929// 입력창 글자제한
930function insertMax(arg, id, obj, spanID, val) {
931	if(arg.value.length > obj){
932		document.getElementById(id).value = val.substr(0,obj);
933	}
934    document.getElementById(spanID).innerHTML = arg.value.length;
935}
936
937function copyURI(arg) {
938	if(arg == "") {
939		alert("복사될 URL 주소가 없습니다.");
940		return;
941	}
942	var IE = (window.clipboardData) ? true : false;
943	if(IE) {
944		window.clipboardData.setData("Text", arg);
945		alert("URL 주소가 복사되었습니다.");
946	} else {
947		prompt("현재페이지의 URL 주소입니다.\nCtrl+C를 눌러 클립보드에 복사하세요.", arg);
948	}
949}
950
951function fncScrap(arg, arg2){
952	var returnURL = "";
953	if(confirm("마이페이지 > 나의 스크랩에 저장되었습니다.\n지금 확인하시겠습니까?")){
954		returnURL = encodeURIComponent("http://www.gwangju.go.kr/ease/menu.es?S=a1&M=120500000000");
955	}
956	location.href = arg + encodeURIComponent(arg2) + "&returnURL=" + returnURL;
957}
958
959function fncScrapDelete(arg){
960	if(confirm("스크랩 목록을 삭제 하시겠습니까?")){
961		location.href = arg;
962	}
963}
964
965function urlMove(arg){
966	var str = document.getElementById(arg).value;
967	if(str == "" | str == "#"){
968		alert("선택된 항목이 없습니다.");
969		return false;
970	}else{
971		return true;
972	}
973}
974
975/**
976* 게시판 SNS 공통 펑션
977* @param site_nm : 사이트명
978* @param title : 글제목
979* @param url : 링크
980* @return
981*/
982function snsApi(sns)
983{
984	var fm = document.snsForm;
985	fm.url.value = document.location.href;
986	fm.target = "_blank";
987	fm.action = "/api/sns.es?sns="+sns;
988	fm.submit();
989}
990function twitter(site_nm, title, url){
991	var str = site_nm + " | " + title + " " + url;
992	var sitelink = "http://twitter.com/home?status=" + encodeURIComponent(str);
993	window.open(sitelink);
994}
995function me2day(site_nm, title, url){
996	var str = site_nm + " | " + title + " " + url;
997	var sitelink = "http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(str);
998	window.open(sitelink);
999}
1000function facebook(site_nm, title, url){
1001	var str = site_nm + " | " + title;
1002	var sitelink = "http://facebook.com/sharer.php?u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(str);
1003	window.open(sitelink);
1004}
1005
1006
1007var xhr = null;
1008function getXMLHttpRequest() {
1009    if (window.ActiveXObject) {
1010        /*try {
1011            return new ActiveXObject("Msxml2.XMLHTTP");//IE 상위 버젼
1012        } catch (e1) {
1013            try {
1014                return new ActiveXObject("Microsoft.XMLHTTP");//IE 하위 버젼
1015            } catch (e2) {
1016                return null;
1017            }
1018        }*/
1019    	return new XMLHttpRequest();//IE 이외의 브라우저(FireFox 등)
1020    } else if (window.XMLHttpRequest) {
1021        return new XMLHttpRequest();//IE 이외의 브라우저(FireFox 등)
1022    } else {
1023        return null;
1024    }
1025}// XMLHttpRequest 객체 얻기
1026 
1027function requestHello(e,URL) {
1028	var ex_obj = document.getElementById("message");
1029    if(!e) e = window.Event;
1030    //param = f.name.value;
1031    //URL = URL + "?name=" + encodeURIComponent(param);//한글 처리
1032    xhr = getXMLHttpRequest();//XMLHttpRequest 객체 얻기
1033    xhr.onreadystatechange = responseHello;//콜백 함수  등록
1034    xhr.open("GET", URL, true);//연결
1035    xhr.send(null);//전송
1036}// 서버에 요청
1037 
1038function responseHello() {
1039    if (xhr.readyState == 4) {//완료
1040        if (xhr.status == 200) {//오류없이 OK
1041            var str = xhr.responseText;//서버에서 보낸 내용 받기
1042            document.getElementById("message").innerHTML = str;//보여주기 
1043        } else {
1044            alert("Fail : " + xhr.status);
1045        }
1046    }
1047}// 응답
1048
1049function displayTab(coId,num,curr) {
1050	for(var i=0;i<=num;i++){
1051		var obj = document.getElementById(coId+i);
1052		if(obj){ obj.style.display = "none"; }
1053	}
1054	var obj = document.getElementById(coId+curr);
1055	if(obj){ obj.style.display = "block"; }
1056}
1057
1058//IE 인지를 반환(IE 라면 true 아니면 false)
1059function is_IE() {
1060	if (navigator.appName.charAt(0) == "M")
1061		return true ;
1062	else
1063		return false ;
1064}
1065
1066
1067
1068var regExp = /^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i;
1069// 확인 버튼 선택시 상세목록 조회
1070function emailSubmit(){
1071	if(document.emailInsForm.email.value == ""){
1072		alert("이메일 주소가 정확하지 않습니다.");
1073		document.emailInsForm.email.focus();
1074	}else if( !regExp.test(document.emailInsForm.email.value) ){
1075		alert("올바른 이메일 형식이 아닙니다.");
1076		document.emailInsForm.email.focus();
1077	}else{
1078		if(confirm("뉴스레터를 신청하시겠습니까?")){
1079			$.post("/mail.es",
1080			{
1081				act : "insMailer",
1082				email : document.emailInsForm.email.value
1083			},
1084			function(data,status){
1085				$("#emailMessage").html(data);
1086			});
1087		}
1088	}
1089}
1090
1091//코멘트 글자수 최대수 제한
1092function insertContentsMax(spanID, max, formNm) {
1093	if(formNm.value.length > max){
1094		alert("제한 글자수 "+max+"자를 초과하였습니다.");
1095		formNm.value = formNm.value.substr(0,max);
1096	}
1097	document.getElementById(spanID).innerHTML = formNm.value.length;
1098	/*
1099	var word = formNm.value.replace(/(^\s*)|(\s*$)/g,"");
1100	if(word.length > max){
1101		formNm.value = formNm.value.substr(0,max);
1102	}
1103	document.getElementById(spanID).innerHTML = word.length;
1104	*/
1105}
1106
1107//글자 폰트 사이즈만 조절 하는 함수
1108defsize = 0.83;
1109var fSize=14;
1110//window.onload = onInit;
1111
1112function onInit(){
1113    var font = getCookieValue("font");
1114    var fontSize = getCookieValue("fontSize");
1115    if(font != ""){
1116        scaleFontType(font);
1117    }
1118    if(fontSize != ""){
1119        fontSize = Number(fontSize) - fSize;
1120        scaleFont(fontSize);
1121    }
1122}
1123
1124///////////////////////////////////////////////////////////////////////
1125function getCookieValue(cookieName){
1126    var cookieValue = null;
1127    if(document.cookie.length > 0){
1128        var offset = document.cookie.indexOf(cookieName +"=");
1129        if(offset != -1) {
1130            offset += cookieName.length;
1131            end = document.cookie.indexOf(";", offset);
1132            if (end == -1)    end = document.cookie.length;
1133            cookieValue = unescape(document.cookie.substring(offset+1, end));
1134        }
1135    }
1136        
1137    if(cookieValue == null)
1138        return "";
1139        
1140    return cookieValue;
1141}
1142
1143var expireDate = new Date();
1144function setCookieValue(cookieName,cookieValue){
1145    expireDate.setMonth(expireDate.getMonth()+6);    
1146    document.cookie = cookieName + "=" + escape(cookieValue) + "; expires=" + expireDate.toGMTString();    
1147}
1148
1149
1150function scaleFont(n){
1151    fSize = fSize + n;
1152    if(fSize < 10)return;
1153    var valueCheck = document.getElementById("wrap");
1154    if(valueCheck !=null){
1155     var objTXT = document.getElementById("wrap")
1156     var objTd = document.getElementById("wrap").getElementsByTagName( "td" );// <td>, <TD>의 내용을 모두 읽어옴
1157     var objDiv = document.getElementById("wrap").getElementsByTagName( "div" );
1158     var objSpan = document.getElementById("wrap").getElementsByTagName( "span" );
1159     var objA = document.getElementById("wrap").getElementsByTagName( "a" );
1160     var objs = document.getElementById("wrap").getElementsByTagName( "p" );
1161     var objli = document.getElementById("wrap").getElementsByTagName( "li" );
1162     objTXT.style.fontSize = fSize + "px";
1163     for( i=0; i < objDiv.length; i++ )    objDiv[i].style.fontSize = fSize + "px";
1164     for( i=0; i < objTd.length; i++ )    objTd[i].style.fontSize = fSize + "px";
1165     for( i=0; i < objSpan.length; i++ )    objSpan[i].style.fontSize = fSize + "px";
1166     for( i=0; i < objA.length; i++ )    objA[i].style.fontSize = fSize + "px";
1167     for( i=0; i < objs.length; i++ )    objs[i].style.fontSize = fSize + "px";
1168     for( i=0; i < objli.length; i++ )    objli[i].style.fontSize = fSize + "px";
1169     setCookieValue("fontSize",fSize);
1170    }
1171}
1172
1173function scaleFontType(str){
1174    var valueCheck = document.getElementById("wrap");
1175    if(valueCheck !=null){
1176     var objTd = document.getElementById("wrap").getElementsByTagName( "td" );// <td>, <TD>의 내용을 모두 읽어옴
1177     var objDiv = document.getElementById("wrap").getElementsByTagName( "div" );
1178     var objSpan = document.getElementById("wrap").getElementsByTagName( "span" );
1179     var objA = document.getElementById("wrap").getElementsByTagName( "a" );
1180     var objs = document.getElementById("wrap").getElementsByTagName( "p" );
1181     var objli = document.getElementById("wrap").getElementsByTagName( "li" );
1182     for( i=0; i < objDiv.length; i++ )    objDiv[i].style.fontFamily = str;
1183     for( i=0; i < objTd.length; i++ )    objTd[i].style.fontFamily = str;
1184     for( i=0; i < objSpan.length; i++ )    objSpan[i].style.fontFamily = str;
1185     for( i=0; i < objA.length; i++ )    objA[i].style.fontFamily = str;
1186     for( i=0; i < objs.length; i++ )    objs[i].style.fontFamily = str;
1187     for( i=0; i < objli.length; i++ )    objli[i].style.fontFamily = str;
1188     setCookieValue("font",str);
1189     }  
1190}
1191
1192var nowZoom = 100;
1193function zoomIn() {
1194	try{
1195		if(/Firefox/.test(navigator.userAgent)) {
1196			alert("이 브라우저에서는 기능을 지원하지 않습니다. \nCtrl키 + 마우스 휠을 이용하여 확대 축소하실수 있습니다.");
1197		} else {
1198			nowZoom = nowZoom - 10;
1199			if(nowZoom <= 70) nowZoom = 70;
1200			zooms();
1201		}
1202	}catch (e) {
1203		alert("이 브라우저에서는 기능을 지원하지 않습니다.");
1204	}
1205}
1206
1207function zoomOut() {
1208	try{
1209		if(/Firefox/.test(navigator.userAgent)) {
1210			alert("이 브라우저에서는 기능을 지원하지 않습니다. \nCtrl키 + 마우스 휠을 이용하여 확대 축소하실수 있습니다.");
1211		} else {
1212			nowZoom = nowZoom + 20;
1213			if(nowZoom >= 500) nowZoom = 500;
1214			zooms();
1215		}
1216	}catch (e) {
1217		alert("이 브라우저에서는 기능을 지원하지 않습니다.");
1218	}
1219}
1220
1221function zoomReset(){
1222	nowZoom = 100; 
1223	zooms();
1224}
1225
1226function zooms(){
1227	try{
1228		document.body.style.zoom = nowZoom + '%';
1229		if(nowZoom==70){
1230			alert ("30%축소 되었습니다. 더 이상 축소할 수 없습니다.");
1231		}
1232
1233		if(nowZoom==500){
1234			alert ("500%확대 되었습니다. 더 이상 확대할 수 없습니다.");
1235		}
1236	}catch (e) {
1237		alert("이 브라우저에서는 기능을 지원하지 않습니다.");
1238	}
1239	
1240}
1241
1242// 
1243var lastPoint = "";
1244function goPoint02(point) {
1245	if(document.getElementById(point).style.display != "none"){
1246		document.getElementById(point).style.display = "none";
1247	} else {
1248		try	{
1249		document.getElementById(lastPoint).style.display = "none";
1250			} catch(e) { console.log(""); }
1251		document.getElementById(point).style.display = "block";
1252			lastPoint = point;			
1253		}
1254}
1255
1256// 클릭시 arg 슬라이딩
1257function slideToggleView(arg){
1258	$(arg).slideToggle("fast");
1259}
1260
1261
1262
1263//Tab Content
1264function initTabMenu(tabContainerID) {
1265	var tabContainer = document.getElementById(tabContainerID);
1266	var tabAnchor = tabContainer.getElementsByTagName("a");
1267	var i = 0;
1268
1269	for(i=0; i<tabAnchor.length; i++) {
1270		if (tabAnchor.item(i).className == "tab")
1271			thismenu = tabAnchor.item(i);
1272		else
1273			continue;
1274
1275		thismenu.container = tabContainer;
1276		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
1277		thismenu.targetEl.style.display = "none";
1278		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
1279		if (thismenu.imgEl) {
1280			thismenu.onfocus = function () {
1281				//this.onfocus();
1282			}
1283		}
1284		thismenu.onclick = tabMenuOver;
1285		
1286		if (!thismenu.container.first)
1287			thismenu.container.first = thismenu;
1288	}
1289	tabContainer.first.onclick();
1290}
1291function tabMenuOver() {
1292	currentmenu = this.container.current;
1293	if (currentmenu != this) {
1294		if (currentmenu) {
1295			currentmenu.targetEl.style.display = "none";
1296			if (currentmenu.imgEl) {
1297				currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
1298				currentmenu.className = currentmenu.className.replace(" selectd", "");
1299			} else {
1300				currentmenu.className = currentmenu.className.replace(" selectd", "");
1301			}
1302		}
1303
1304		this.targetEl.style.display = "block";
1305		if (this.imgEl) {
1306			this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
1307			this.className += " selectd";
1308		} else {
1309			this.className += " selectd";
1310		}
1311		this.container.current = this;
1312	}
1313	return false;
1314}
1315
1316
1317//BMI 체크 프로그램
1318function bmiCheck(){
1319	document.getElementById("bmi01").innerHTML = "-";
1320	document.getElementById("bmi02").innerHTML = "-";
1321
1322	var result01 = "";
1323	var result02 = "";
1324	var ja = 2;
1325	result02 = document.getElementById("bmiWeight").value / (document.getElementById("bmiHeight").value/100 * document.getElementById("bmiHeight").value/100);
1326	result02 = result02.toFixed(1);
1327	if(result02 < 18.5){ result01 = "저체중";
1328	}else if(result02 >= 18.5 && result02 <= 22.9){ result01 = "정상체중";
1329	}else if(result02 >= 23 && result02 <= 24.9){ result01 = "과체중";
1330	}else if(result02 >= 25 && result02 <= 29.9){ result01 = "비만 I";
1331	}else if(result02 >= 30 && result02 <= 39.9){ result01 = "비만 II";
1332	}else if(result02 >= 40){ result01 = "심각한 비만 III";
1333	}
1334	
1335	document.getElementById("bmi01").innerHTML = result01;
1336	document.getElementById("bmi02").innerHTML = result02;
1337	
1338	//게시판 레이어창
1339	function boardPopLayer(divId, url){
1340		document.getElementById(divId).style.display = "block";
1341		$.post(url,
1342		function(data,status){
1343			$("#"+divId).html(data);
1344		});
1345	}
1346}
1347
1348// 메일선택시
1349function fnc_mailChange(arg, arg2){
1350	var sel_f = document.getElementById(arg2);
1351	if(arg == ""){
1352		sel_f.readOnly = false;
1353		sel_f.focus();
1354		sel_f.display = "block";
1355	}else{
1356		sel_f.readOnly = true;
1357		sel_f.display = "none";
1358	}
1359	sel_f.value = arg;
1360}
1361
1362//title 변경 
1363function toggleTitle(id){
1364	if($(id).hasClass("active") === true) {
1365		$(id).attr("title","닫힘")
1366	}else{
1367		$(id).attr("title","열림")
1368	}
1369}
1370
1371
1372/*앵커태그*/
1373$(document).ready(function() {
1374	$(".anchorLink").anchorAnimate()
1375});
1376
1377jQuery.fn.anchorAnimate = function(settings) {
1378
1379 	settings = jQuery.extend({
1380		speed : 1100
1381	}, settings);	
1382	
1383	return this.each(function(){
1384		var caller = this
1385		$(caller).click(function (event) {	
1386			event.preventDefault()
1387			var locationHref = window.location.href
1388			var elementClick = $(caller).attr("href")
1389			
1390			var destination = $(elementClick).offset().top;
1391			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
1392				window.location.hash = elementClick
1393			});
1394		  	return false;
1395		})
1396	})
1397}

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.