PageSourceSearch

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

js kyra.or.kr collected 2026-10-06 21:50:11 UTC 7,608 bytes, 319 lines download raw bytes

1function excel(haoma)
2{
3
4	theform=document.form_search;
5	theform.action="excel"+haoma+".asp";
6	theform.submit();
7	theform.action="index.asp";
8}
9
10function Cal_Write_it() {
11    theForm = document.form_main;
12    if (theForm.His_year.value =="")
13    {
14        alert("년도를 입력해주세요");
15        theForm.His_year.focus();
16        return;
17    }
18//    if(isNaN(theForm.His_year.value))
19//    {
20//        alert("년도는 숫자를 입력해주세요.");
21//        theForm.His_year.value="";
22//        theForm.His_year.focus();
23//        return;
24//    }
25    if (theForm.His_Month.value =="")
26    {
27        alert("월을 입력해주세요");
28        theForm.His_Month.focus();
29        return;
30    }
31//    if(isNaN(theForm.His_Month.value))
32//    {
33//        alert("월은 숫자를 입력해주세요.");
34//        theForm.His_Month.value="";
35//        theForm.His_Month.focus();
36//        return;
37//    }
38//    if (parseInt(theForm.His_Month.value) > 12 )
39//    {
40//        alert("월을 정확하게 입력해주세요");
41//        theForm.His_Month.focus();
42//        return;
43//    }
44    if (theForm.His_Body.value =="")
45    {
46        alert("내용을 입력해주세요");
47        theForm.His_Body.focus();
48        return;
49    }
50    theForm.submit();
51}
52
53// 숫자만 입력
54function onlyNum() {
55	if ((event.keyCode < 48) || (event.keyCode > 57)) {
56		event.returnValue = false;
57		return false;
58	}
59}
60
61// 포커스 이동[폼이름,현재포커스,이동할포커스]
62function nextFocus(sFormName, sNow, sNext) {
63	var sForm = 'document.' + sFormName + '.'
64	var oNow = eval(sForm + sNow);
65
66	if (typeof oNow == 'object') {
67		if (oNow.value.length == oNow.maxLength) {
68			var oNext = eval(sForm + sNext);
69
70			if ((typeof oNext) == 'object')
71				oNext.focus();
72		}
73	}
74}
75
76//주민등록 번호 6자리입력후 뒤로 이동
77function keyup6(obj){
78	theForm = document.member;
79
80	if (obj.value.length == 6 ){
81		theForm.Mem_Jumin1.focus()
82		theForm.Mem_Jumin2.select()
83	}
84}
85
86//이메일 형식 체크
87function Check_Mail(str) {
88	emailEx1 = /[^@]+@[A-Za-z0-9_-]+.[A-Za-z]+/;
89	emailEx2 = /[^@]+@[A-Za-z0-9_-]+.[A-Za-z0-9_-]+.[A-Za-z]+/;
90	emailEx3 = /[^@]+@[A-Za-z0-9_-]+.[A-Za-z0-9_-]+.[A-Za-z0-9_-]+.[A-Za-z]+/;
91	if (emailEx1.test(str)) return true;;
92	if (emailEx2.test(str)) return true;
93	if (emailEx3.test(str)) return true;
94	return false;
95}
96
97//라디오버튼값 넘기기
98function get_radioChk(fname){
99	var arrRadio = document.getElementsByName(fname);
100	var i;
101
102	bCheck = false
103	for (i = 0; i < arrRadio.length; i++) {
104		if (arrRadio[i].checked) {
105			bCheck = true;
106		}
107	}
108	return bCheck
109}
110
111//선택된 라디오버튼이 있는지 체크
112function hasCheckedRadio(input) {
113    if (input.length > 1) {
114        for (var inx = 0; inx < input.length; inx++) {
115            if (input[inx].checked) return true;
116        }
117    } else {
118        if (input.checked) return true;
119    }
120    return false;
121}
122
123// 아이디 비번 영문 숫자만
124function checknumchar(str) {
125	var ch, chk;
126	for (i = 0; i <= str.length - 1; i++) {
127		ch = str.substring(i, i + 1);
128		if ((ch >= "0" & ch <= "9") || (ch >= "a" & ch <= "z") || (ch >= "A" & ch <= "Z")) {
129			chk = true;
130		} else {
131			chk = false;
132			break;
133		}
134	}
135	if (chk) {
136		return true;
137	} else {
138		return false;
139	}
140}
141
142//파일형식 체크
143function FileUploadCheck(str){
144	var temp = new Array();
145	temp[0] = "doc";
146	temp[1] = "hwp";
147
148	if (str == ""){
149		return false;
150	}
151	if (str == null || str.length == 0){
152		return true;
153	}
154
155	var index = str.lastIndexOf(".");
156	if (index == -1){
157		return true;
158	}
159	var substr = (str.substring(index)).toLowerCase();
160	for(i = 0; i < temp.length; i++){
161		var xx = substr.indexOf(temp[i]);
162		if(xx > -1){
163			return true;
164		}
165	}
166	alert("첨부파일은 [doc,hwp] 파일만 업로드 가능합니다.");
167	return false;
168}
169
170//파일형식 체크
171function FileUploadCheck_Gongmu(str){
172	var temp = new Array();
173	temp[0] = "doc";
174	temp[1] = "docx";
175	temp[2] = "hwp";
176	temp[3] = "jpg";
177	temp[4] = "jpeg";
178	temp[5] = "bmp";
179	temp[6] = "png";
180	temp[7] = "pdf";
181
182	if (str == ""){
183		return false;
184	}
185	if (str == null || str.length == 0){
186		return true;
187	}
188
189	var index = str.lastIndexOf(".");
190	if (index == -1){
191		return true;
192	}
193	var substr = (str.substring(index)).toLowerCase();
194	for(i = 0; i < temp.length; i++){
195		var xx = substr.indexOf(temp[i]);
196		if(xx > -1){
197			return true;
198		}
199	}
200	alert("파일은 [doc,docx,hwp,jpg,jpeg,bmp,png,pdf] 파일만 업로드 가능합니다.");
201	return false;
202}
203
204//엔터검색
205function Search_Enter(i) {
206	if (event.keyCode == 13 && i == 7) {
207		Search_it();
208	}
209	return false;
210}
211
212// 전체선택
213function SelectAll(){
214	if(document.form_main.checkbox.length > 0){
215		for(i=0;i<document.form_main.checkbox.length;i++)
216			document.form_main.checkbox[i].checked=true;
217	}
218	else
219		document.form_main.checkbox.checked=true;
220}
221
222// 전체선택 취소
223function CancelAll(){
224	if(document.form_main.checkbox.length > 0){
225		for(i=0;i<document.form_main.checkbox.length;i++)
226			document.form_main.checkbox[i].checked=false;
227	}
228	else
229		document.form_main.checkbox.checked=false;
230}
231
232// 선택 반전
233function selectToggle(){	//선택반전
234	if(document.form_main.checkbox.length > 0){
235		for(i=0;i<document.form_main.checkbox.length;i++)
236			document.form_main.checkbox[i].checked=!document.form_main.checkbox[i].checked;
237	}
238	else
239		document.form_main.checkbox.checked=!document.form_main.checkbox.checked;
240}
241//선택한 목록을 삭제
242function Total_Delete() {
243	var chk_box = document.form_main.checkbox;
244	var chk_len = chk_box.length;
245	var flag = 0;
246	if (chk_len > 0) {
247		for (i = 0; i < chk_len; i++) {
248			if (chk_box[i].checked == true) {
249				var flag = 1;
250			}
251		}
252	} else {
253		if (chk_box.checked == true) {
254			var flag = 1;
255		}
256	}
257	if (flag == 0) {
258		alert("삭제할 목록을 선택해 주세요.");
259		return;
260	}
261	chkDel = confirm("정말로 삭제하시겠습니까?");
262	if (chkDel == true) {
263		document.form_main.submit();
264	}
265}
266
267function His_Del_it() {
268	chkDel = confirm("정말로 삭제하시겠습니까?");
269	if (chkDel == true) {
270		document.form_main.mode.value="del"
271		document.form_main.submit();
272	}
273}
274
275// 오픈 창
276function optView(url, name, w, h){
277  var p_l= screen.width/2-(w/2);
278  var p_t= screen.height/2-(h/2);
279  var win = window.open(url, name, 'width=' + w + ', height=' + h + ',scrollbars=yes');
280  win.moveTo(p_l, p_t);
281  win.focus();
282}
283
284// 오픈창: 스크린 높이에 최대
285function optView_h(url, name, w){
286  var width= screen.width;
287  var height = screen.height-150;
288  var p_l= screen.width/2-(w/2);
289
290  var win = window.open(url, name, 'width=' + w + ', height=10, scrollbars=yes');
291
292  win.moveTo(p_l, 100);
293  win.resizeTo(w, height);
294  win.focus();
295}
296
297// 오픈창을 스크린 최대 크기로 띄우기
298function optView_max(url){
299  var width= screen.width;
300  var height = screen.height;
301
302  var win = window.open(url, 'optionView_max', 'width='+width+', height=10, scrollbars=yes');
303
304  win.moveTo(0, 0);
305  win.resizeTo(width, height);
306  win.focus();
307}
308// 이미지 크기로 새창 띄우기
309function imageView(url) {
310   var img = new Image();
311   img.onload = function() {
312    var imgW = this.width;
313     var imgH = this.height;
314     if((imgW!=0) && (imgH!=0)) {
315         window.open(url,'imgView','width='+imgW+', height='+imgH+', scrollbars=no');
316      }
317  }
318  img.src = url;
319}

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.