PageSourceSearch

https://busansinbo.or.kr/common/js/common/common.js

js busansinbo.or.kr collected 2026-10-05 06:05:58 UTC 6,234 bytes, 206 lines download raw bytes

1function goSite(obj, frm) {
2	frm.action = obj.value;
3	frm.submit();
4}
5
6// 검색 엔진
7function searchEngine() {
8	var speachText = document.getElementById("qt");
9	if (speachText.value == '') {
10		alert("검색어를 입력해 주세요.");
11		speachTex.focus();
12		return false;
13	}
14
15	return true;
16}
17
18
19// layout 팝업 컨트롤
20function LayoutShow(showpop) {
21	var objDiv = document.getElementById(showpop);
22
23	if (objDiv.style.display == "block") {
24		objDiv.style.display = "none";
25	} else {
26		objDiv.style.display = "block";
27	}
28}
29
30function footerShow(showpop) {
31	jQuery("#footer_link_box").children().each(function() {
32		if (jQuery(this).children().filter("div").first().attr("id") == showpop) {
33			if (jQuery(this).children().filter("div").first().css("display") == "none") {
34				jQuery(this).children().filter("div").first().show();
35			} else {
36				jQuery(this).children().filter("div").first().hide();
37			}
38		} else {
39			jQuery(this).children().filter("div").first().hide();
40		}
41	});
42}
43
44function goPopup(url, w, h, l, t, ScrollbarsYn, name) {
45	if (ScrollbarsYn == 'Y') {
46		ScrollbarsYn = "yes";
47	} else {
48		ScrollbarsYn = "no";
49	}
50	var x = (screen.availWidth - w) / 2;
51	var y = (screen.availHeight - h) / 2;
52	window.open(url, name, 'width=' + w + ', height=' + h + ', left=' + x + ', top=' + y + ', location=no ,scrollbars=' + ScrollbarsYn);
53}
54
55
56function goPopup2(url, w, h, l, t, ScrollbarsYn, resizable, name) {
57	if (ScrollbarsYn == 'Y') {
58		ScrollbarsYn = "yes";
59	} else {
60		ScrollbarsYn = "no";
61	}
62	var x = (screen.availWidth - w) / 2;
63	var y = (screen.availHeight - h) / 2;
64	window.open(url, name, 'width=' + w + ', height=' + h + ', left=' + x + ', top=' + y + ', resizable=' + resizable + ', location=no ,scrollbars=' + ScrollbarsYn);
65}
66
67// 포탈 메인 시계 표시
68var dayNames = new Array("(일)", "(월)", "(화)", "(수)", "(목)", "(금)", "(토)");
69function clock(dobj, tobj) {
70	dt = new Date();
71	// 시간과 관련된 정보를 저장한다.
72	hours = dt.getHours();
73	minutes = dt.getMinutes();
74	seconds = dt.getSeconds();
75	timeStr = hours;
76	timeStr += ((minutes < 10) ? ":0" : ":") + minutes;
77	timeStr += ((seconds < 10) ? ":0" : ":") + seconds;
78	// 폼의 시간을 표시하는 입력란에 문자열을 출력한다.
79	jQuery("#" + tobj).text(timeStr);
80	// 일자와 관련된 정보를 저장한다.
81	months = dt.getMonth() + 1;
82	days = dt.getDate();
83	years = dt.getFullYear();
84	dateStr = years + "년 ";
85	dateStr += ((months < 10) ? "0" : "") + months + "월 ";
86	dateStr += ((days < 10) ? "0" : "") + days + "일" + dayNames[dt.getDay()];
87
88	// 폼의 일자를 표시하는 입력란에 문자열을 출력한다.
89	jQuery("#" + dobj).text(dateStr);
90	// 1초마다 일자와 시간을 갱신한다.
91	Timer = setTimeout("clock('" + dobj + "','" + tobj + "')", 1000);
92}
93
94function goFileOld(file, path) {
95	window.open(yh.contextPath + '/download' + path + "/" + encodeURIComponent(file));
96}
97
98function goFile(filename, path) {
99	// window.open('/file/direct/download.do?path=' + path + "&filename=" + encodeURIComponent(file));
100	var $form = $('#fileDirectDownloadForm');
101	$form.find('[name=filename]').val(filename);
102	$form.find('[name=path]').val(path);
103	document.fileDirectDownloadForm.submit();
104}
105
106// 사이트별팝업창 쿠키값 get 스크립트
107function getCookie(name) {
108	var nameOfCookie = name + "=";
109	var x = 0;
110	while (x <= document.cookie.length) {
111		var y = (x + nameOfCookie.length);
112		if (document.cookie.substring(x, y) == nameOfCookie) {
113			if ((endOfCookie = document.cookie.indexOf(";", y)) == -1)
114				endOfCookie = document.cookie.length;
115			return unescape(document.cookie.substring(y, endOfCookie));
116		}
117		x = document.cookie.indexOf(" ", x) + 1;
118		if (x == 0)
119			break;
120	}
121	return "";
122}
123
124function openWindow(url, lecName) {
125	window.open(url, lecName, "width=800,height=600,resizable=yes,menubar=no,scrollbars=yes");
126}
127
128function openWindow2(url, lecName) {
129	window.open(url, lecName, "width=1014,height=650,resizable=yes,menubar=no,scrollbars=yes");
130}
131
132/**
133 * 오직 숫자만 입력이 가능함.
134 * @param loc
135 * @return
136 */
137function onlyNumber2(loc) {
138	if (/[^0123456789]/g.test(loc.value)) {
139		alert("숫자 이외의 문자는 입력할 수 없습니다.");
140		loc.value = "";
141		loc.focus();
142	}
143}
144
145// scrollTop 버튼
146$(window).scroll(function() {
147	if ($(this).scrollTop() > 200) {
148		$('.btn_scroll_top').fadeIn();
149	} else {
150		$('.btn_scroll_top').fadeOut();
151	}
152});
153
154$('.btn_scroll_top').click(function() {
155	$('html, body').animate({ scrollTop: 0 }, 400);
156	return false;
157});
158
159$(document).ready(function () {
160	$('[data-logout-btn]').click(function () {
161		$.ajax({ url: yh.contextPath + '/logout' });
162		location.reload(true);
163		return false;
164	});
165})
166
167//var SelectBoxPath = function () {
168//    var self;
169//    var $path;
170//    return {
171//        init: function () {
172//            self = this;
173//
174//            $path = $(".sub-lnb > li");
175//            $path.each(function () {
176//                var $thisBox = $(this);
177//                $thisBox.find(".dropdown-depth1").click(self.onClick);
178//
179//                $(document).click(function(e){
180//                    if($thisBox.has(e.target).length === 0){
181////                        $(".path-selected").parent().removeClass("active");
182//                        $(".path-depth").slideUp(200);
183//                        $(".path-selected").attr("title","펼치기");
184//                    }
185//                });
186//            });
187//
188//        },
189//        onClick: function () {
190//        	 //var x = $('.path-depth').css('display');
191//             var x =  $(this).parents("li").find(".path-depth").css('display');
192//             if(x !='block'){
193//             	$(this).attr("title","접기");
194//             	
195//             }else{
196//            	 $(this).attr("title","펼치기");
197//            	 
198//             }
199//            $(this).parents("li").find(".path-depth").slideToggle(200);
200//            $(this).parents("li").toggleClass("active");
201//           
202//            
203//            return false;
204//        }
205//    }
206//}();

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.