PageSourceSearch

https://vpixmedical.com/admin/js/lib2.js

js vpixmedical.com collected 2026-10-04 07:52:44 UTC 29,195 bytes, 1,179 lines download raw bytes

1
2// 클립보드 복사(주소복사)
3function set_ClipBoard(uri)
4{
5	uri = uri.replace(/\&lt;/g,'<');
6	uri = uri.replace(/\&gt;/g,'>');
7
8 uri.select();
9 var clip=uri.createTextRange();
10 clip.execCommand('copy');
11 alert('클립보드에 복사되었습니다');
12//	window.clipboardData.setData('TEXT', uri);
13//	alert('복사되었습니다.');
14}
15
16
17// 즐겨찾기 추가
18function set_BookMark(site_url, site_name)
19{
20	window.external.AddFavorite(site_url, site_name);
21}
22
23
24// 시작페이지
25function set_StartPage(site_url)
26{
27	//<a href="javascript:;" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.dadembi.com');">시작페이지 설정</a>
28}
29
30
31// 가격에 원단위 컴마를 찍는다.
32function set_WonComma(price)
33{
34
35	if(price != null){
36		var pricelen = price.length;
37		var ii = pricelen%3;
38		var wonprice = price.substring(0,ii);
39		for(;ii<pricelen;ii+=3){
40			wonprice += "," + price.substring(ii,ii+3);
41		}
42		if((pricelen%3) == 0)
43		wonprice = wonprice.substring(1,wonprice.length);
44		return wonprice;
45	}
46
47}
48
49// 인풋내 콤마 제거
50function removeComma(str) {
51	if(typeof(str) == 'string') str = str.replace(/,/g, '');
52	return str;
53}
54
55// 이메일 체크
56function check_Email(email)
57{
58
59	var email_1 = "";
60	var email_2 = "";
61	var check_point = 0;
62
63	if (email.indexOf("@") < 0 ) {
64		alert("e-mail에 @ 가 빠져있습니다.");
65		return false;
66	}
67	if (email.indexOf(".") < 0 ) {
68		alert("이메일형식이 잘못되었습니다.");
69		return false;
70	}
71
72	if (email.indexOf("'") >= 0 ) {
73		alert("e-mail에 ' 는 포함할수 없습니다..");
74		return false;
75	}
76	if (email.indexOf("|") >= 0 ) {
77		alert("e-mail에 | 는 포함할수 없습니다..");
78		return false;
79	}
80	if (email.indexOf(">") >= 0 ) {
81		alert("e-mail에 > 는 포함할수 없습니다..");
82		return false;
83	}
84	if (email.indexOf("<") >= 0 ) {
85		alert("e-mail에 < 는 포함할수 없습니다..");
86		return false;
87	}
88	if (email.indexOf(" ") >= 0 ) {
89		alert("e-mail에 스페이스는 포함할수 없습니다..");
90		return false;
91	}
92
93	for(var j = 0 ; j < email.length; j++)
94	{
95		if(email.substring(j, j + 1) != "@" && check_point == 0)
96		{
97			email_1 = email_1 + email.substring(j, j + 1)
98		}
99		else if(email.substring(j, j + 1) == "@" )
100		{
101			check_point = check_point + 1;
102		}
103		else
104		{
105			email_2 = email_2 + email.substring(j, j + 1);
106		}
107	}
108
109	//if (email_1.length < 3 ) {
110	//	alert("e-mail에 @ 앞자리는 3자리이상 입력하셔야합니다.");
111	//	form1.email.focus();
112	//	return false;
113	//}
114
115	//if (email_2.length < 2 ) {
116	//	alert("e-mail에 @ 뒷자리는 2자리이상 입력하셔야합니다.");
117	//	form1.email.focus();
118	//	return false;
119	//}
120
121	if (check_point > 1 ) {
122		alert("e-mail에 @ 는 1번이상 들어갈수 없습니다.");
123		return false;
124	}
125
126	if (email_2.indexOf("(") >= 0 ) {
127		alert("e-mail에 ( 는 포함할수 없습니다..");
128		return false;
129	}
130	if (email_2.indexOf("(") >= 0 ) {
131		alert("e-mail에 ( 는 포함할수 없습니다..");
132		return false;
133	}
134	if (email_2.indexOf(")") >= 0 ) {
135		alert("e-mail에 ) 는 포함할수 없습니다..");
136		return false;
137	}
138	if (email_2.indexOf(",") >= 0 ) {
139		alert("e-mail에 , 는 포함할수 없습니다..");
140		return false;
141	}
142	if (email_2.indexOf(";") >= 0 ) {
143		alert("e-mail에 ; 는 포함할수 없습니다..");
144		return false;
145	}
146	if (email_2.indexOf(":") >= 0 ) {
147		alert("e-mail에 : 는 포함할수 없습니다..");
148		return false;
149	}
150	if (email_2.indexOf("/") >= 0 ) {
151		alert("e-mail에 / 는 포함할수 없습니다..");
152		return false;
153	}
154	if (email_2.indexOf("[") >= 0 ) {
155		alert("e-mail에 [ 는 포함할수 없습니다..");
156		return false;
157	}
158	if (email_2.indexOf("]") >= 0 ) {
159		alert("e-mail에 ] 는 포함할수 없습니다..");
160		return false;
161	}
162	if (email_2.indexOf("{") >= 0 ) {
163		alert("e-mail에 { 는 포함할수 없습니다..");
164		return false;
165	}
166	if (email_2.indexOf("}") >= 0 ) {
167		alert("e-mail에 } 는 포함할수 없습니다..");
168		return false;
169	}
170	if (email_2.indexOf(" ") >= 0 ) {
171		alert("e-mail에 스페이스는 포함할수 없습니다..");
172		return false;
173	}
174
175	return true;
176
177}
178
179
180// 숫자 체크
181function check_Num(tocheck)
182{
183
184	if (tocheck == null || tocheck == "")
185	{
186		return false;
187	}
188
189	for(var j = 0 ; j < tocheck.length; j++)
190	{
191		if ( tocheck.substring(j, j + 1) != "0"
192			&&   tocheck.substring(j, j + 1) != "1"
193			&&   tocheck.substring(j, j + 1) != "2"
194			&&   tocheck.substring(j, j + 1) != "3"
195			&&   tocheck.substring(j, j + 1) != "4"
196			&&   tocheck.substring(j, j + 1) != "5"
197			&&   tocheck.substring(j, j + 1) != "6"
198			&&   tocheck.substring(j, j + 1) != "7"
199			&&   tocheck.substring(j, j + 1) != "8"
200			&&   tocheck.substring(j, j + 1) != "9" )
201		{
202			return false;
203		}
204	}
205
206	return true;
207
208}
209
210// 주민 등록 번호 체크
211function check_ResidentNO(str_f_num, str_l_num)
212{
213
214	var juminno = str_f_num + str_l_num;
215
216	if(juminno=="" || juminno==null || juminno.length!=13) {
217		alert("주민등록번호를 적어주세요.");
218		return false;
219	}
220	var jumin1 = juminno.substr(0,6);
221	var jumin2 = juminno.substr(6,7);
222	var yy         = jumin1.substr(0,2);     // 년도
223	var mm     = jumin1.substr(2,2);     // 월
224	var dd     = jumin1.substr(4,2);     // 일
225	var genda = jumin2.substr(0,1);     // 성별
226	var msg, ss, cc;
227
228	// 숫자가 아닌 것을 입력한 경우
229	if (!isNumeric(jumin1)) {
230		alert("주민등록번호 앞자리를 숫자로 입력하세요.");
231		return false;
232	}
233	// 길이가 6이 아닌 경우
234	if (jumin1.length != 6) {
235		alert("주민등록번호 앞자리를 다시 입력하세요.");
236		return false;
237	}
238	// 첫번째 자료에서 연월일(YYMMDD) 형식 중 기본 구성 검사
239	if (yy < "00" || yy > "99" ||
240	mm < "01" || mm > "12" ||
241	dd < "01" || dd > "31") {
242		alert("주민등록번호 앞자리를 다시 입력하세요.");
243		return false;
244	}
245	// 숫자가 아닌 것을 입력한 경우
246	if (!isNumeric(jumin2)) {
247		alert("주민등록번호 뒷자리를 숫자로 입력하세요.");
248		return false;
249	}
250	// 길이가 7이 아닌 경우
251	if (jumin2.length != 7) {
252		alert("주민등록번호 뒷자리를 다시 입력하세요.");
253		return false;
254	}
255	// 성별부분이 1 ~ 4 가 아닌 경우
256	if (genda < "1" || genda > "4") {
257		alert("주민등록번호 뒷자리를 다시 입력하세요.");
258		return false;
259	}
260	// 연도 계산 - 1 또는 2: 1900년대, 3 또는 4: 2000년대
261	cc = (genda == "1" || genda == "2") ? "19" : "20";
262	// 첫번째 자료에서 연월일(YYMMDD) 형식 중 날짜 형식 검사
263	if (isYYYYMMDD(parseInt(cc+yy), parseInt(mm), parseInt(dd)) == false) {
264		alert("주민등록번호 앞자리를 다시 입력하세요.");
265		return false;
266	}
267	// Check Digit 검사
268	if (!isSSN(jumin1, jumin2)) {
269		alert("입력한 주민등록번호를 검토한 후, 다시 입력하세요.");
270		return false;
271	}
272
273	return true;
274
275}
276
277function isYYYYMMDD(y, m, d) {
278	switch (m) {
279		case 2:     // 2월의 경우
280			if (d > 29) return false;
281			if (d == 29) {
282			     // 2월 29의 경우 당해가 윤년인지를 확인
283			        if ((y % 4 != 0) || (y % 100 == 0) && (y % 400 != 0))
284			                return false;
285			}
286		break;
287		case 4:     // 작은 달의 경우
288		case 6:
289		case 9:
290		case 11:
291		if (d == 31) return false;
292	}
293
294	// 큰 달의 경우
295	return true;
296}
297function isNumeric(s) {
298	for (i=0; i<s.length; i++) {
299		c = s.substr(i, 1);
300		if (c < "0" || c > "9") return false;
301	}
302	return true;
303}
304function isLeapYear(y) {
305	if (y < 100)
306		y = y + 1900;
307	if ( (y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0) ) {
308		return true;
309	} else {
310		return false;
311	}
312}
313function getNumberOfDate(yy, mm) {
314	month = new Array(29,31,28,31,30,31,30,31,31,30,31,30,31);
315	if (mm == 2 && isLeapYear(yy)) mm = 0;
316	return month[mm];
317}
318function isSSN(s1, s2) {
319	n = 2;
320	sum = 0;
321	for (i=0; i<s1.length; i++)
322		sum += parseInt(s1.substr(i, 1)) * n++;
323	for (i=0; i<s2.length-1; i++) {
324		sum += parseInt(s2.substr(i, 1)) * n++;
325		if (n == 10) n = 2;
326	}
327	c = 11 - sum % 11;
328	if (c == 11) c = 1;
329	if (c == 10) c = 0;
330	if (c != parseInt(s2.substr(6, 1))) return false;
331	else return true;
332}
333
334// 주민 등록 번호 체크
335function check_ResidentNO_old(str_f_num, str_l_num)
336{
337
338	var i3=0
339	for (var i=0;i<str_f_num.length;i++)
340	{
341		var ch1 = str_f_num.substring(i,i+1);
342		if (ch1<'0' || ch1>'9') { i3=i3+1 }
343	}
344	if ((str_f_num == '') || ( i3 != 0 ))
345	{
346		return (false);
347	}
348
349	var i4=0
350	for (var i=0;i<str_l_num.length;i++)
351	{
352		var ch1 = str_l_num.substring(i,i+1);
353		if (ch1<'0' || ch1>'9') { i4=i4+1 }
354	}
355	if ((str_l_num == '') || ( i4 != 0 ))
356	{
357		return (false);
358	}
359
360	if(str_f_num.substring(0,1) < 0)
361	{
362		return (false);
363	}
364
365	if(str_l_num.substring(0,1) > 2)
366	{
367		return (false);
368	}
369
370	if((str_f_num.length > 7) || (str_l_num.length > 8))
371	{
372		return (false);
373	}
374
375	if ((str_f_num == '72') || ( str_l_num == '18'))
376	{
377		return (false);
378	}
379
380	var f1=str_f_num.substring(0,1)
381	var f2=str_f_num.substring(1,2)
382	var f3=str_f_num.substring(2,3)
383	var f4=str_f_num.substring(3,4)
384	var f5=str_f_num.substring(4,5)
385	var f6=str_f_num.substring(5,6)
386	var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
387	var l1=str_l_num.substring(0,1)
388	var l2=str_l_num.substring(1,2)
389	var l3=str_l_num.substring(2,3)
390	var l4=str_l_num.substring(3,4)
391	var l5=str_l_num.substring(4,5)
392	var l6=str_l_num.substring(5,6)
393	var l7=str_l_num.substring(6,7)
394	hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5
395	hap=hap%11
396	hap=11-hap
397	hap=hap%10
398	if (hap != l7)
399	{
400		return (false);
401	}
402
403	return true;
404
405}
406
407
408
409// 특수문자가있는지 체크
410function check_Char(id_text)
411{
412
413	var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
414	var numeric = '1234567890';
415	var nonkorean = alpha+numeric+'_';
416
417	var i ;
418	for ( i=0; i < id_text.length; i++ )  {
419		if( nonkorean.indexOf(id_text.substring(i,i+1)) < 0) {
420			break ;
421		}
422	}
423
424	if ( i != id_text.length ) {
425		return false ;
426	}
427	else{
428		return true ;
429	}
430
431	return true;
432
433}
434
435// 특수문자 체크
436function check_nonChar(id_text)
437{
438	var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"';
439	var numeric = '1234567890';
440	var nonkorean = nonchar+numeric;
441
442	var i ;
443	for ( i=0; i < id_text.length; i++ )  {
444		if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) {
445			break ;
446		}
447	}
448
449	if ( i != id_text.length ) {
450		return false ;
451	}
452	else{
453		return true ;
454	}
455
456	return false;
457}
458
459// 이미지 롤오버
460function WIZ_jumpMenu(targ,selObj,restore){ //v3.0
461  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
462  if (restore) selObj.selectedIndex=0;
463}
464
465function WIZ_swapImgRestore() { //v3.0
466  var i,x,a=document.WIZ_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
467}
468
469function WIZ_preloadImages() { //v3.0
470  var d=document; if(d.images){ if(!d.WIZ_p) d.WIZ_p=new Array();
471    var i,j=d.WIZ_p.length,a=WIZ_preloadImages.arguments; for(i=0; i<a.length; i++)
472    if (a[i].indexOf("#")!=0){ d.WIZ_p[j]=new Image; d.WIZ_p[j++].src=a[i];}}
473}
474
475function WIZ_findObj(n, d) { //v4.01
476  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
477    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
478  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
479  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=WIZ_findObj(n,d.layers[i].document);
480  if(!x && d.getElementById) x=d.getElementById(n); return x;
481}
482
483function WIZ_swapImage() { //v3.0
484  var i,j=0,x,a=WIZ_swapImage.arguments; document.WIZ_sr=new Array; for(i=0;i<(a.length-2);i+=3)
485   if ((x=WIZ_findObj(a[i]))!=null){document.WIZ_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
486}
487
488function WIZ_reloadPage(init) {  //reloads the window if Nav4 resized
489  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
490    document.WIZ_pgW=innerWidth; document.WIZ_pgH=innerHeight; onresize=WIZ_reloadPage; }}
491  else if (innerWidth!=document.WIZ_pgW || innerHeight!=document.WIZ_pgH) location.reload();
492}
493WIZ_reloadPage(true);
494
495/* 게시판 목록 체크박스 */
496
497// 체크박스 전체선택
498function selectAllBbs(){
499	var i;
500	for(i=0;i<document.forms.length;i++){
501		if(document.forms[i].idx != null){
502			if(document.forms[i].select_checkbox){
503				document.forms[i].select_checkbox.checked = true;
504			}
505		}
506	}
507	return;
508}
509
510// 체크박스 선택해제
511function selectCancelBbs(){
512	var i;
513	for(i=0;i<document.forms.length;i++){
514		if(document.forms[i].select_checkbox){
515			if(document.forms[i].idx != null){
516				document.forms[i].select_checkbox.checked = false;
517			}
518		}
519	}
520	return;
521}
522
523// 체크박스선택 반전
524function selectReverseBbs(form){
525	if(form.select_tmp.checked){
526		selectAllBbs();
527	}else{
528		selectCancelBbs();
529	}
530}
531
532// 체크박스 선택리스트
533function selectValueBbs(){
534	var i;
535	var selbbs = "";
536	for(i=0;i<document.forms.length;i++){
537		if(document.forms[i].idx != null){
538			if(document.forms[i].select_checkbox){
539				if(document.forms[i].select_checkbox.checked)
540					selbbs = selbbs + document.forms[i].idx.value + "|";
541				}
542			}
543	}
544	return selbbs;
545}
546
547//선택게시물 삭제
548function delBbs(purl, param){
549
550	selbbs = selectValueBbs();
551
552	if(selbbs == ""){
553		alert("삭제할 게시물을 선택하세요.");
554		return false;
555	}else{
556		if(confirm("선택한 게시물을 정말 삭제하시겠습니까?")){
557			document.location = purl + "?ptype=save&mode=delbbs&selbbs=" + selbbs + "&" + param;
558		}
559	}
560}
561
562//게시물이동
563function moveBbs(code){
564	selbbs = selectValueBbs();
565	if(selbbs == ""){
566		alert("이동할 게시물을 선택하세요.");
567		return false;
568	}else{
569		var uri = "/admin/bbs/move.php?code=" + code + "&selbbs=" + selbbs;
570		window.open(uri,"moveBbs","width=300,height=80");
571	}
572}
573
574// 게시물복사
575function copyBbs(code){
576	selbbs = selectValueBbs();
577	if(selbbs == ""){
578		alert("복사할 게시물을 선택하세요.");
579		return false;
580	}else{
581		var uri = "/admin/bbs/copy.php?code=" + code + "&selbbs=" + selbbs;
582		window.open(uri,"copyBbs","width=300,height=80");
583	}
584}
585
586// 게시물 순서변경
587function orderBbs(code) {
588	var uri = "/admin/bbs/order.php?code=" + code;
589	window.open(uri,"orderBbs","width=600,height=350,resizable=yes,scrollbars=yes");
590}
591
592// 상품 카테고리 레이어
593function disableLay(getno){
594
595	if(document.all.displayer != null){
596  	if(document.all.displayer.length==null) document.all.displayer.style.display='none';
597  	else document.all.displayer[getno].style.display='none';
598  }
599
600}
601
602function displayLay(getno){
603
604	if(document.all.displayer != null){
605	  for(i=0; i<document.all.displayer.length; i++){
606	          document.all.displayer[i].style.display='none';
607	  }
608	  if(document.all.displayer.length==null) document.all.displayer.style.display='block';
609	  else document.all.displayer[getno].style.display='block';
610	}
611
612}
613
614// 가격에 원단위 컴마를 찍는다.
615function won_Comma(price){
616	if(price != null){
617		var pricelen = price.length;
618		var ii = pricelen%3;
619		var wonprice = price.substring(0,ii);
620		for(;ii<pricelen;ii+=3){
621		  wonprice += "," + price.substring(ii,ii+3);
622		}
623		if((pricelen%3) == 0)
624		wonprice = wonprice.substring(1,wonprice.length);
625		return wonprice;
626	}
627}
628
629//트위터로 연결
630function snsTwitter(msg,url){
631	var href = "http://twitter.com/home?status=" + encodeURIComponent(msg) + " " + encodeURIComponent(url);
632	window.open(href, 'twitter', '');
633}
634
635//페이스북으로 연결
636function snsFacebook(msg,url){
637	var href = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(msg);
638	window.open(href, 'facebook', '');
639}
640// 미투데이
641function snsMe2day(msg,url,tag){
642	var href = "http://me2day.net/posts/new?new_post[body]=\"" + encodeURIComponent(msg) + "\":"+encodeURIComponent(url) + "&new_post[tags]=" + encodeURIComponent(tag);
643  window.open(href, 'me2day', '');
644}
645
646function check_all(f)
647{
648	var chk = document.getElementsByName("checks[]");
649	for (i=0; i<chk.length; i++)
650	chk[i].checked = f.chkall.checked;
651}
652
653function check_val(act)
654{
655	var f = document.pgfrm;
656	var act_url = "/admin/manage/as/as_save.php";
657
658	if (act == "update") // 선택수정
659	{
660		var sel=[];
661
662		$('input:checkbox:checked').each(function(){
663			sel.push($(this).val());
664		});
665		var check_id = sel.join('|');
666		f.idx.value = check_id;
667		f.action = act_url;
668		str = "수정";
669	}
670	else if (act == "delete") // 선택삭제
671	{
672		var sel=[];
673		$('input:checkbox:checked').each(function(){
674			sel.push($(this).val());
675		});
676		var check_id = sel.join('|');
677
678		f.idx.value = check_id;
679		f.action = act_url;
680		str = "삭제";
681	}
682	else if (act == "copy") // 선택복사
683	{
684		var sel=[];
685
686		$('input:checkbox:checked').each(function(){
687			sel.push($(this).val());
688		});
689		var check_id = sel.join('|');
690		f.idx.value = check_id;
691		f.action = act_url;
692		str = "복사";
693	}
694	else
695		return;
696
697
698	var chk = document.getElementsByName("checks[]");
699	var bchk = false;
700
701	for (i=0; i<chk.length; i++)
702	{
703		if (chk[i].checked)
704			bchk = true;
705	}
706
707	if (!bchk) 
708	{
709		alert(str + "할 AS리스트를 선택하세요.");
710		return;
711	}
712
713	if (act == "delete")
714	{
715		if (!confirm("선택한 자료를 정말 삭제 하시겠습니까?"))
716			return;
717	}
718
719	f.mode.value = act;
720	f.submit();
721}
722
723function check_val2(num)
724{
725	var chk = document.getElementsByName("checks[]");
726	chk[num].checked = true;
727}
728
729function check_down(act)
730{
731	var f = document.pgfrm;
732	var act_url = "/admin/manage/as/sel_download.php";
733	var act_url2 = "/admin/manage/as/sel_print.php";
734
735	if (act == "download")
736	{
737		var sel=[];
738		$('input:checkbox:checked').each(function(){
739			sel.push($(this).val());
740		});
741		var check_id = sel.join('|');
742
743		f.idx.value = check_id;
744		f.action = act_url;
745		str = "다운로드";
746	}
747	else if (act == "print")
748	{
749		var sel=[];
750		$('input:checkbox:checked').each(function(){
751			sel.push($(this).val());
752		});
753		var check_id = sel.join('|');
754
755		f.idx.value = check_id;
756		f.action = act_url2;
757		str = "송장출력";
758	}
759	else
760		return;
761
762
763	var chk = document.getElementsByName("checks[]");
764	var bchk = false;
765
766	for (i=0; i<chk.length; i++)
767	{
768		if (chk[i].checked)
769			bchk = true;
770	}
771
772	if (!bchk) 
773	{
774		alert(str + "할 AS리스트를 선택하세요.");
775		return;
776	}
777
778	f.submit();
779
780}
781
782function servicechg(idx,num)
783{
784	var url = "as_service.php?idx="+idx+"&srv_idx="+num;
785	var win = "servicechg";
786	
787	window.open(url, win, "fullscreen=0,toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=400,height=300,top=0,left=0");
788}
789
790function asUpdate(check_id)
791{
792	var f = document.pgfrm;
793	var act_url = "/admin/manage/as/as_save.php";
794
795	f.idx.value = check_id;
796	f.mode.value = "update";
797	f.date_check.value = "date_check";
798	f.action = act_url;
799	f.submit();
800}
801
802function asDefer(check_id)
803{
804	var f = document.pgfrm;
805	var act_url = "/admin/manage/as/as_save.php";
806
807	f.idx.value = check_id;
808	f.mode.value = "update";
809	f.date_check.value = "date_defer";
810	f.action = act_url;
811	f.submit();
812}
813
814function asDelete(check_id)
815{
816	var f = document.pgfrm;
817	var act_url = "/admin/manage/as/as_save.php";
818
819	f.idx.value = check_id;
820	f.mode.value = "delete";
821	f.action = act_url;
822
823	q = confirm("선택한 자료를 정말 삭제하시겠습니까?")
824	if (q == true)
825	{
826		f.submit();
827	}
828	else
829	{
830		f.mode.value = "no_delete";
831		return false;
832	}
833	
834}
835
836function btnchange(href)
837{
838	if(confirm("처리결과를 변경하시겠습니까?")) 
839		document.location.href = href;
840}
841
842function csv_submit()
843{
844	var f = document.csvfrm;
845	f.action = "./as_file_update.php";
846	f.submit();
847}
848
849function csv_submit_out()
850{
851	var f = document.csvfrm_out;
852	f.action = "./as_file_update_out.php";
853	f.submit();
854}
855
856function stats_submit(act) 
857{
858	var f = document.searchForm;
859	f.action = act;
860	f.submit();
861}
862
863function sms_submit(href) 
864{
865	if(confirm("문자를 발송하시겠습니까?")) 
866		document.location.href = href;
867}
868
869
870function sms_submit_t(href,date_idx,dilnum_idx) 
871{
872
873	//출고송장 비어있는지 확인
874	var dilnum = document.getElementById(dilnum_idx).value;
875	//alert(dilnum);
876	if(dilnum==""){
877		alert("출고송장이 비어있습니다.");
878		return false;
879	}
880	
881
882	var date = document.getElementById(date_idx).value;
883
884	
885	//출고일 날짜 형식 
886	var outdate = date;
887	var outdate_split = outdate.split('-');
888
889	var outdate_split_1=outdate_split[0];
890	var outdate_split_2=outdate_split[1];
891	var outdate_split_3=outdate_split[2];
892
893	if(outdate.length=='10'){
894		if(outdate_split_1.length=='4'){
895
896			if(outdate_split_2.length=='2'){
897
898				if(outdate_split_2<13 && outdate_split_2>0){
899
900					if(outdate_split_3.length=='2'){
901						if(outdate_split_3<32 && outdate_split_3>0){
902							if(confirm("문자를 발송하시겠습니까?")) 
903								document.location.href = href;
904						}else{
905							alert("출고일이 잘못 표기되었습니다");
906							return false;
907						}
908					}else{
909						alert("출고일이 잘못 표기되었습니다");
910						return false;
911					}
912
913				}else{
914					alert("출고일이 잘못 표기되었습니다");
915					return false;
916				}
917
918			}else{
919				alert("출고일이 잘못 표기되었습니다");
920				return false;
921			}
922
923		}else{
924		  alert("출고일이 잘못 표기되었습니다");
925		  return false;
926		}
927	}else if(outdate.length=='0'){
928		alert("출고일이 비어있습니다.");
929		return false;
930	}else{
931	  alert("출고일이 잘못 표기되었습니다");
932	  return false;
933	}
934}
935
936
937
938$(function() {
939	var fileTarget = $('.filebox .upload-hidden');
940
941	fileTarget.on('change', function(){		// 값이 변경되면
942		if(window.FileReader){				// modern browser
943			var filename = $(this)[0].files[0].name;
944		}
945		else {  // old IE
946			var filename = $(this).val().split('/').pop().split('\\').pop();  // 파일명만 추출
947		}
948
949		// 추출한 파일명 삽입
950		$(this).siblings('.upload-name').val(filename);
951	});
952});
953
954$(function() {
955	var imgTarget = $('.preview-image .upload-hidden');
956
957	imgTarget.on('change', function(){
958		var parent = $(this).parent();
959		parent.children('.upload-display').remove();
960
961		if(window.FileReader){
962			//image 파일만
963			if (!$(this)[0].files[0].type.match(/image\//)) return;
964
965			var reader = new FileReader();
966			reader.onload = function(e){
967				var src = e.target.result;
968				parent.prepend('<div class="upload-display"><div class="upload-thumb-wrap"><img src="'+src+'" class="upload-thumb"></div></div>');
969			}
970			reader.readAsDataURL($(this)[0].files[0]);
971		}
972		else {
973			$(this)[0].select();
974			$(this)[0].blur();
975			var imgSrc = document.selection.createRange().text;
976			parent.prepend('<div class="upload-display"><div class="upload-thumb-wrap"><img class="upload-thumb"></div></div>');
977
978			var img = $(this).siblings('.upload-display').find('img');
979			img[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enable='true',sizingMethod='scale',src=\""+imgSrc+"\")";
980		}
981	});
982
983});
984
985/** 트리구조 **/
986$(function(){
987	var tree_menu	= $('#tree_menu');
988	var TREE_OPEN	= '/admin/manage/image/ic_plus.gif';
989	var TREE_CLOSE	= '/admin/manage/image/ic_minus.gif';
990
991	var FOLDER_OPEN	   = '<img src="/admin/manage/image/ic_folder_o.gif" style="vertical-align:middle">';
992	var FOLDER_CLOSE   = '<img src="/admin/manage/image/ic_folder_c.gif" style="vertical-align:middle">';
993
994	tree_menu.find('li:has("ul")').prepend('<a href="#" class="controller"><img src="' + TREE_CLOSE + '" /></a> ');
995	tree_menu.find('li:last-child').addClass('end');
996
997	$('.controller').click(function(){
998		var temp_el = $(this).parent().find('>ul');
999		var temp_el_vv = $(this).parent().find('span').attr('id');
1000
1001		if (temp_el.css('display') == 'none'){
1002			temp_el.slideDown(100);
1003			$(this).find('img').attr('src', TREE_CLOSE);
1004			$("span#"+temp_el_vv).html(FOLDER_OPEN);
1005			return false;
1006		} else {
1007			temp_el.slideUp(100);
1008			$(this).find('img').attr('src', TREE_OPEN);
1009			$("span#"+temp_el_vv).html(FOLDER_CLOSE);
1010			return false;
1011		}
1012	});
1013
1014	function tree_init(status){
1015		if (status == 'close'){
1016			tree_menu.find('ul').hide();
1017			$('a.controller').find('img').attr('src', TREE_OPEN);
1018		} else if (status == 'open'){
1019			tree_menu.find('ul').show();
1020			$('a.controller').find('img').attr('src', TREE_CLOSE);
1021		}
1022	}
1023	tree_init('open');
1024
1025});
1026
1027function moveCode(catcode,depthno,prior,menucode){
1028/*	$.ajax({
1029		type:"post"
1030		, async: false
1031		, url:  "/admin/manage/product/prd_category.php"
1032		, data : {"mode":"update","catcode":catcode,"depthno":depthno,"prior":prior}
1033		, success: function(data) {
1034			var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior;
1035			//$("#detailcategoryList").load(href);
1036			document.location.href = data;
1037		}	
1038		, error: function(){
1039		}
1040	});
1041*/
1042
1043	$.get("/admin/manage/product/prd_category.php?&mode=update&catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode, function(data){
1044		var href = "/admin/manage/product/prd_category.php?&mode=update&catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode;
1045		//$("#detailcategoryList").load(href);
1046			document.location.href = href;
1047	});
1048}
1049
1050function moveCode2(catcode,menucode){
1051	var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&menucode="+menucode;
1052	//$("#detailcategoryList").load(href);
1053	document.location.href = href;
1054
1055}
1056
1057function moveCategory(mode,posi,catcode,depthno,menucode){
1058/*	$.ajax({
1059		type:"post"
1060		, url:  "/admin/manage/product/category_save.php"
1061		, data : {"mode":mode,"posi":posi,"catcode":catcode,"depthno":depthno}
1062		, success: function(data) {
1063			var result = data.split("|");
1064			if(result[0] == "ok"){
1065				var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior;
1066				$("#detailcategoryList").load(href);
1067				//document.location.href = "/admin/manage/product/prd_category.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3];
1068			}
1069		}	
1070		, error: function(){
1071		}
1072	})*/
1073	$.get("/admin/manage/product/category_save.php?&mode="+mode+"&posi="+posi+"&catcode="+catcode+"&depthno="+depthno+"&menucode="+menucode, function(data){
1074		if(data){
1075			var result = data.split("|");
1076			var href = "/admin/manage/product/prd_category.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3]+"&menucode="+menucode;
1077			//$("#detailcategoryList").load(href);
1078			document.location.href = href;
1079
1080		}
1081	});
1082
1083}
1084
1085function SmoveCode(catcode,depthno,prior,menucode){
1086	$.get("/admin/manage/product2/prd_cat.php?&mode=update&catcode"+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode, function(data){
1087		var href = "/admin/manage/product2/prd_cat.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode;
1088		//$("#detailcategoryList").load(href);
1089		document.location.href = href;
1090
1091	});
1092}
1093
1094function SmoveCode2(catcode,menucode){
1095	var href = "/admin/manage/product2/prd_cat.php?catcode="+catcode+"&menucode="+menucode;
1096	//$("#detailcategoryList").load(href);
1097	document.location.href = href;
1098}
1099
1100function SmoveCategory(mode,posi,catcode,depthno,menucode){
1101	$.get("/admin/manage/product2/cat_save.php?mode="+mode+"&posi="+posi+"&catcode="+catcode+"&depthno="+depthno+"&menucode="+menucode, function(data){
1102		if(data){
1103			var result = data.split("|");
1104			var href = "/admin/manage/product2/prd_cat.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3]+"&menucode="+menucode
1105			//$("#detailcategoryList").load(href);
1106			document.location.href = href;
1107		}
1108	});
1109
1110}
1111
1112function brandCode(idx,menucode){
1113	$.get("/admin/manage/product/prd_brand.php?&mode=update&idx="+idx+"&menucode="+menucode, function(data){
1114		var href = "/admin/manage/product/prd_brand.php?mode=update&idx="+idx+"&menucode="+menucode;
1115		//$("#detailcategoryList").load(href);
1116		document.location.href = href;
1117	});
1118}
1119
1120function brandCode2(menucode){
1121	var href = "/admin/manage/product/prd_brand.php?menucode="+menucode;
1122//	$("#detailcategoryList").load(href);
1123	document.location.href = href;
1124
1125
1126}
1127
1128function BrandmoveCategory(mode,posi,idx,menucode){
1129	$.get("/admin/manage/product/brand_save.php?&mode="+mode+"&posi="+posi+"&idx="+idx+"&menucode="+menucode, function(data){
1130		if(data){
1131			var result = data.split("|");
1132			var href = "/admin/manage/product/prd_brand.php?mode="+result[1]+"&idx="+result[2]+"&menucode="+menucode;
1133			//$("#detailcategoryList").load(href);
1134			document.location.href = href;
1135		}
1136	});
1137
1138}
1139
1140$(function(){
1141
1142	$(document).on("keyup", "input:text[Onlynum]", function() {
1143		regExp = /[^0-9]/gi;
1144		v = $(this).val();
1145		if(regExp.test(v)){
1146			alert("숫자만 가능합니다.");
1147			$(this).val(v.replace(regExp,"") );
1148		}
1149	});
1150
1151});
1152
1153/*$(function() {
1154	var calendar = {
1155		showButtonPanel: true, 
1156		dateFormat: "yy-mm-dd",
1157		currentText: '오늘', 
1158		closeText: '닫기', 
1159		changeMonth: true, 
1160		changeYear: true, 
1161		dayNames: ['일요일','월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
1162		dayNamesMin: ['<font color=red>일</font>', '월', '화', '수', '목', '금', '<font color=#0071bf>토</font>'], 
1163		monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
1164		monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
1165		yearRange: 'c-10:c'
1166	};
1167
1168	$("#srh_prev,#srh_next").datepicker(calendar);
1169	$("#sdate,#edate").datepicker(calendar);
1170	$("#wdate").datepicker(calendar);
1171	$("#coupon_sdate,#coupon_edate").datepicker(calendar);
1172
1173
1174});*/
1175
1176/* 오른쪽 마우스 막기 */
1177//$(document).bind("contextmenu", function(e){
1178//	return false;
1179//});

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.