PageSourceSearch

https://www.3917majung.com/common/js/common_1.js?1791410221

js 3917majung.com collected 2026-10-07 21:57:23 UTC 65,759 bytes, 1,706 lines download raw bytes

1//=================================================================================================
2// 프로젝트 : 피케이소프트
3// 파 일 명 : /common/js/common.js
4// 처리내용 : 공통자바스크립트
5// 작 성 자 : 2019-10-13 강대인
6//=================================================================================================
7
8if (typeof(COMMON_1_JS) == 'undefined')
9{
10  var COMMON_1_JS = true;
11
12  var getOp7Up,getOp6Dn,getIE4Up,getIE4,getIE5,getIE6,getNN4,getUA=navigator.userAgent.toLowerCase();
13  if(window.opera)
14  {
15    var i=getUA.indexOf('opera');
16    if( i!=-1 )
17    {
18      var v=parseInt(getUA.charAt(i+6));
19      getOp7Up=v>=7;
20      getOp6Dn=v<7;
21    }
22  }
23
24  // sns 연동
25
26  /*
27
28<title>태안서 5.1규모 지진…국내 지진 중 두번째 규모</title>
29<meta name="description" content=" 충남 태안지역에서 규모 5.1의 지진이 발생해 서울과 인천 등 수도권 지역에까지 진동이 전해졌다. 이는 국내 지진 중 두 번째 ..." />
30
31<meta name="author" content="헤럴드경제" />
32<meta http-equiv="Content-Script-Type" content="text/javascript" />
33<meta http-equiv="Content-Style-Type" content="text/css" />
34<LINK rel="alternate" TYPE="application/rss+xml" TITLE="헤럴드경제" HREF="/rss_xml.php" />
35<link rel="image_src" href="http://res.heraldm.com/content/image/2014/04/01/20140401000020_0.jpg" />
36
37
38<meta property="me2:post_tag"		content="헤럴드경제"/>
39<meta property="me2:category1"		content="헤럴드경제"/>
40<meta property="me2:category2"		content="속보"/>
41<meta property="me2:image"			content="http://res.heraldm.com/content/image/2014/04/01/20140401000020_0.jpg"/>
42
43<meta property="og:title"			content="태안서 5.1규모 지진…국내 지진 중 두번째 규모"/>
44<meta property="og:type"			content="article"/>
45<meta property="og:url"				content="http://biz.heraldcorp.com/view.php?ud=20140401000028"/>
46<meta property="og:image"			content="http://res.heraldm.com/content/image/2014/04/01/20140401000020_0.jpg"/>
47<meta property="og:description"		content=" 충남 태안지역에서 규모 5.1의 지진이 발생해 서울과 인천 등 수도권 지역에까지 진동이 전해졌다. 이는 국내 지진 중 두 번째 ..."/>
48<meta property="og:article:author"	content="헤럴드경제 | 코리아헤럴드"/>
49
50<meta name="twitter:card"			content="summary_large_image">
51<meta name="twitter:title"			content="태안서 5.1규모 지진…국내 지진 중 두번째 규모">
52<meta name="twitter:site"			content="헤럴드경제">
53<meta name="twitter:creator"		content="헤럴드">
54<meta name="twitter:image"			content="http://res.heraldm.com/content/image/2014/04/01/20140401000020_0.jpg">
55<meta name="twitter:description"	content=" 충남 태안지역에서 규모 5.1의 지진이 발생해 서울과 인천 등 수도권 지역에까지 진동이 전해졌다. 이는 국내 지진 중 두 번째 ...">
56
57function fbs_click()
58{
59  u='http://biz.heraldcorp.com/view.php?ud=20140401000028&pp=001';
60  var fbWin = window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u),'facebooksharer','toolbar=0,status=0,width=626,height=436');
61  return;
62}
63
64<a target="blank" href="http://twitter.com/?status=%ED%83%9C%EC%95%88%EC%84%9C 5.1%EA%B7%9C%EB%AA%A8 %EC%A7%80%EC%A7%84%E2%80%A6%EA%B5%AD%EB%82%B4 %EC%A7%80%EC%A7%84 %EC%A4%91 %EB%91%90%EB%B2%88%EC%A7%B8 %EA%B7%9C%EB%AA%A8 http://biz.heraldcorp.com/view.php?ud=20140401000028"><img alt="" src="http://res.heraldm.com/new_201209/images/icon/ico_sns_t.gif"></a>
65<a target="blank" href="http://me2day.net/posts/new?new_post[body]=%ED%83%9C%EC%95%88%EC%84%9C+5.1%EA%B7%9C%EB%AA%A8+%EC%A7%80%EC%A7%84%E2%80%A6%EA%B5%AD%EB%82%B4+%EC%A7%80%EC%A7%84+%EC%A4%91+%EB%91%90%EB%B2%88%EC%A7%B8+%EA%B7%9C%EB%AA%A8:http://biz.heraldcorp.com/view.php?ud=20140401000028"><img alt="" src="http://res.heraldm.com/new_201209/images/icon/ico_sns_m.gif"></a>
66<a href="javascript:var clogWin=window.open('http://csp.cyworld.com/bi/bi_recommend_pop.php?url=http%3A%2F%2Fbiz.heraldcorp.com%2Fview.php%3Fud%3D20140401000028', 'recom_icon_pop', 'width=400,height=364,scrollbars=no,resizable=no');"><img alt="" src="http://res.heraldm.com/new_201209/images/icon/icn_sns04.gif"></a>
67<a href="javascript:var daumWin=window.open( 'http://yozm.daum.net/api/popup/prePost?link=http://biz.heraldcorp.com/view.php?ud=20140401000028&prefix=%ED%83%9C%EC%95%88%EC%84%9C+5.1%EA%B7%9C%EB%AA%A8+%EC%A7%80%EC%A7%84%E2%80%A6%EA%B5%AD%EB%82%B4+%EC%A7%80%EC%A7%84+%EC%A4%91+%EB%91%90%EB%B2%88%EC%A7%B8+%EA%B7%9C%EB%AA%A8', 'yozmSend', 'width=466, height=356' );"><img alt="" src="http://res.heraldm.com/new_201209/images/icon/icn_sns05.gif"></a>
68  */
69
70
71
72  var SNS = {
73    facebook: function (DocTitle, DocSummary,ShareUrl,DocImage )
74    {
75      //link = encodeURIComponent(link);
76      //description = encodeURIComponent(description);
77      //var url = 'http://www.facebook.com/sharer.php?u=' + link + '&t=' + description;
78
79      ShareUrl = encodeURIComponent(ShareUrl);
80      DocTitle = encodeURIComponent(DocTitle);
81      DocSummary = encodeURIComponent(DocSummary);
82      DocImage = encodeURIComponent(DocImage);
83
84      var url = 'http://www.facebook.com/sharer.php?s=100&p[url]='+(ShareUrl)+'&p[title]='+(DocTitle)+"&p[summary]="+(DocSummary)+"&p[images][0]="+(DocImage);
85      var a = window.open(url, 'facebook', 'width=466, height=356');
86      if (a)
87      {
88        a.focus();
89      }
90    },
91    /*
92    facebook_feed:function (title, desc, url, img)
93    {
94      FB.init({appId:"259680654171010", cookie:true, status:true, xfbml:true});
95      FB.ui({
96        method:"feed",
97        name:title,
98        caption:url,
99        description:desc,
100        message:desc,
101        picture:img,
102        link:url,
103      });
104    },
105    */
106    twitter:function(link, title, description)
107    {
108      link = encodeURIComponent(link);
109      title = encodeURIComponent(title);
110      description = encodeURIComponent(description);
111
112      //var url = 'http://twitter.com/share?text=' + description + '& url=' + link;
113      var url = 'http://twitter.com/share?original_referer='+ link +'&url=' + link + '&text=' + title + '::' + description;
114      var a = window.open(url, 'twitter', 'width=466, height=356');
115      if (a)
116      {
117        a.focus();
118      }
119    },
120    me2day : function (link, description)
121    {
122      link=encodeURIComponent(link);
123      description = encodeURIComponent(description);
124
125      var url = 'http://www.me2day.net/posts/new?new_post[body]="'+description+'":'+link;
126      var a = window.open(url,'me2day','');
127      if (a)
128      {
129        a.focus();
130      }
131    },
132    yozm: function (link, description)
133    {
134      link=encodeURIComponent(link);
135      description = encodeURIComponent(description);
136
137      var url = 'http://yozm.daum.net/api/popup/prePost?sourceid=&link='+link+'&prefix='+description;
138      var a = window.open(url,'yozm','');
139      if (a)
140      {
141        a.focus();
142      }
143     }
144  };
145
146 function share_sns(sns)
147 {
148   var long_url = "<?=$board_skin_path?>/sns_share.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>";
149   if(sns == "fb") snsurl = long_url + "&sns=fb";
150   if(sns == "tw") snsurl = long_url + "&sns=tw";
151   if(sns == "cs") snsurl = long_url + "&sns=cs";
152   var newwin = window.open(snsurl, "sns", "width=600, height=400, toolbar=0");
153  }
154
155  // IE 버젼확인
156  var strAppVersion = navigator.appVersion;
157  var ieVersion = strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1)
158
159  var scrollAddFlag      = true; // 스크롤형 목록에서 추가되는 데이타가 중복되지 않도록 처리
160  var findSelectOverFlag = false;
161  var calendarOverFlag   = false; // 달력이미지오버상태
162
163  var topMenuClick = false; // 탑메뉴클릭(토글)
164  var topMenuOver  = false; // 탑메뉴오버상태
165
166  var menuFlag     = false; // top메뉴보기처리
167  var menuSubFlag  = false; // top메뉴보기처리
168  var menuSubFlagA = false; // top메뉴보기처리
169  var topFlag1 = false;
170  var topFlag2 = false;
171  var topFlag3 = false;
172  //---------------------------------------------------------------------------------------
173  // 함수명 : findSelectOver
174  // 기  능 : DIV선택목록 mouse over 상태 저장
175  // 작성일 : 2010-03-20 김현옥
176  // --------------------------------------------------------------------------------------
177  function findSelectOver(pKbn)
178  {
179    if ("1" == pKbn) { findSelectOverFlag = true;  }
180    else             { findSelectOverFlag = false; }
181  }
182  //---------------------------------------------------------------------------------------
183  // 함수명 : getNum
184  // 기  능 : 숫자형체크
185  // 작성일 : 2010-03-20 김현옥
186  // --------------------------------------------------------------------------------------
187  function getNum(arguments)
188  {
189    for ( var loopC=0; loopC<arguments.length; ++loopC )
190    {
191      if (isNaN(arguments[loopC]) || typeof(arguments[loopC])!='number')
192      {
193        return false;
194      }
195    }
196    return true;
197  }
198
199  //---------------------------------------------------------------------------------------
200  // 함수명 : getStr
201  // 기  능 : 문자형체크
202  // 작성일 : 2010-03-20 김현옥
203  // --------------------------------------------------------------------------------------
204  function getStr(arguments)
205  {
206    for ( var loopC=0; loopC<arguments.length; ++loopC )
207    {
208      if ( typeof(arguments[loopC])!='string' )
209      {
210        return false;
211      }
212    }
213    return true;
214  }
215
216  //---------------------------------------------------------------------------------------
217  // 함수명 : getDef
218  // 기  능 : 객체생성체크
219  // 작성일 : 2010-03-20 김현옥
220  // --------------------------------------------------------------------------------------
221  function getDef(arguments)
222  {
223    for( var loopC=0; loopC<arguments.length; ++loopC )
224    {
225      if( typeof(arguments[loopC])=='undefined' )
226      {
227        return false;
228      }
229    }
230    return true;
231  }
232
233  //---------------------------------------------------------------------------------------
234  // 함수명 : toGetElementById
235  // 기  능 :
236  // 작성일 : 2010-03-20 김현옥
237  // --------------------------------------------------------------------------------------
238  function toGetElementById( pE )
239  {
240    if( typeof(pE) != 'string' ) { return pE; }
241
242    if      (document.getElementById) { pE = document.getElementById(pE); }
243    else if (document.all)            { pE = document.all[pE]; }
244    else                              { pE = null; }
245    return pE;
246  }
247
248  //---------------------------------------------------------------------------------------
249  // 함수명 : getClientWidth
250  // 기  능 : 화면폭취득
251  // 작성일 : 2010-03-20 김현옥
252  // --------------------------------------------------------------------------------------
253  function getClientWidth()
254  {
255    /*
256    var width = 0;
257    if ( getOp6Dn )
258    {
259      width = window.innerWidth;
260    }
261    else if ( document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientWidth )
262    {
263      width = document.documentElement.clientWidth;
264    }
265    else if ( document.body && document.body.clientWidth )
266    {
267      width = document.body.clientWidth;
268    }
269    else if ( getDef(window.innerWidth,window.innerHeight,document.height) )
270    {
271      width = window.innerWidth;
272      if ( document.height>window.innerHeight ) { width -= 16; }
273    }
274    return width;
275    */
276
277    return $(window).width();
278
279  }
280
281  //---------------------------------------------------------------------------------------
282  // 함수명 : getClientHeight
283  // 기  능 : 화면높이취득
284  // 작성일 : 2010-03-20 김현옥
285  // --------------------------------------------------------------------------------------
286  function getClientHeight()
287  {
288    var height = 0;
289    /*
290    if ( getOp6Dn )
291    {
292      height = window.innerHeight;
293    }
294    else if ( document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientHeight )
295    {
296      height = document.documentElement.clientHeight;
297    }
298    else if ( document.body && document.body.clientHeight )
299    {
300      height = document.body.clientHeight;
301    }
302    else if ( getDef(window.innerWidth,window.innerHeight,document.width) )
303    {
304      height = window.innerHeight;
305      if ( document.width>window.innerWidth ) { height -= 16; }
306    }
307    */
308
309    height = $(window).height();
310    return height;
311  }
312
313  //---------------------------------------------------------------------------------------
314  // 함수명 : getBodyHeight
315  // 기  능 : 바디높이
316  // 작성일 : 2010-03-20 김현옥
317  // --------------------------------------------------------------------------------------
318  function getBodyHeight()
319  {
320    /*
321    var cw = getClientHeight();
322    //var sw = window.document.body.scrollHeight;
323    var sw = $(window).scrollTop() + $(window).height();
324    return cw>sw ? cw : sw;
325    */
326    return $(document).height();
327  }
328
329  //---------------------------------------------------------------------------------------
330  // 함수명 : getScrollTop
331  // 기  능 : top stroll
332  // 작성일 : 2009-07-07 김현옥
333  // --------------------------------------------------------------------------------------
334  function getScrollTop(pE, pWin)
335  {
336    var offset = 0;
337    /*
338    if ( !getDef(pE) || pWin || pE == document || pE.tagName.toLowerCase() == 'html' || pE.tagName.toLowerCase() == 'body' )
339    {
340      var w = window;
341      if (pWin && pE) { w = pE; }
342      if      (w.document.documentElement && w.document.documentElement.scrollTop) { offset = w.document.documentElement.scrollTop; }
343      else if (w.document.body && getDef(w.document.body.scrollTop)              ) { offset = w.document.body.scrollTop; }
344    }
345    else
346    {
347      pE = toGetElementById(pE);
348      if (pE && getNum(pE.scrollTop)) { offset = pE.scrollTop; }
349    }
350    */
351    offset = $(window).scrollTop();
352    return offset;
353  }
354
355  //---------------------------------------------------------------------------------------
356  // 함수명 : getTop
357  // 기  능 : top이동
358  // 작성일 : 2009-07-07 김현옥
359  // --------------------------------------------------------------------------------------
360  function getTop( pE, pY )
361  {
362    if ( !(pE=toGetElementById(pE)) ) { return 0; }
363    var css = getDef(pE.style);
364
365    if ( css && getStr(pE.style.top) )
366    {
367      if ( getNum(pY) )
368      {
369        pE.style.top = pY + 'px';
370      }
371      else
372      {
373        pY = parseInt(pE.style.top);
374        if( isNaN(pY) ) { pY = 0; }
375      }
376    }
377    else if (css && getDef(pE.style.pixelTop))
378    {
379      if(getNum(pY)) { pE.style.pixelTop = pY; }
380      else           { pY = pE.style.pixelTop; }
381    }
382    return pY;
383  }
384
385  //---------------------------------------------------------------------------------------
386  // 함수명 : flashWrite
387  // 기  능 : flash 출력
388  // 작성일 : 2010-03-20 김현옥
389  // ì°¸  ì¡° :
390  // --------------------------------------------------------------------------------------
391  function flashWrite( pUrl, pW, pH, pId, pVars )
392  {
393    // 플래시 코드 정의
394    var flashStr="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+pW+"' height='"+pH+"' id='"+pId+"' align='middle'>"+
395                 "<param name='movie' value='"+pUrl+"' />"+
396                 "<param name='wmode' value='transparent' />"+
397                 "<param name='menu' value='false' />"+
398                 "<param name='quality' value='high' />"+
399                 "<param name='flashVars' value='"+pVars+"' />"+
400                 "<embed src='"+pUrl+"' wmode='transparent' menu='false' flashVars='"+pVars+"' quality='high' width='"+pW+"' height='"+pH+"' name='"+pId+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
401                 "</object>";
402
403    // 플래시 코드 출력
404    document.write(flashStr);
405  }
406
407  //---------------------------------------------------------------------------------------#
408  // 함수명 : goUrl
409  // 기  능 : URL이동
410  // 작성일 : 2010-03-20 김현옥
411  // --------------------------------------------------------------------------------------#
412  function goUrl(pUrl, pTarget)
413  {
414    if (pTarget == "_blank") { newwin = window.open(pUrl,'newwin',''); }
415    else                     { location.href = pUrl;                   }
416  }
417
418  //---------------------------------------------------------------------------------------
419  // 함수명 : byteCheck
420  // 기  능 : Textarea의 바이트수 (글자수 제한)
421  // 작성일 : 2010-03-20 김현옥
422  // --------------------------------------------------------------------------------------
423  function byteCheck(pObj, pTarget, pBytesLimit)
424  {
425    var msgVal      = pObj.value;
426    var bytesLen    = 0;
427    var curMsgLen   = '';
428    var curBytesLen = 0;
429    var realVal     = '';
430    var realLen     = 0;
431    for(var loopC = 0; loopC < msgVal.length; loopC++)
432    {
433      var oneChar = msgVal.charAt(loopC);
434      if ( escape(oneChar).length > 4              ) { bytesLen += 2; }
435      else if ( oneChar != '\r' || oneChar != '\n' ) { bytesLen++;    }
436
437      if ( bytesLen <= pBytesLimit )
438      {
439        curMsgLen = loopC + 1;
440        curBytesLen = bytesLen;
441      }
442    }
443
444    if ( bytesLen > pBytesLimit )
445    {
446      alert("더이상 입력하실 수 없습니다. 초과된 글은 삭제합니다.");
447      pObj.value = msgVal.substr(0, curMsgLen);    // 초과 입력시 초과된 만큼 잘라줌
448      realLen = curBytesLen;
449    }
450    else
451    {
452      realLen = bytesLen;
453    }
454
455    if(pTarget)
456    {
457      toGetElementById(pTarget).innerHTML = realLen;
458    }
459    else
460    {
461      return realLen;
462    }
463  }
464
465  //---------------------------------------------------------------------------------------
466  // 함수명 : contentReSize
467  // 기  능 :
468  // 작성일 : 2010-03-20 김현옥
469  // ì°¸  ì¡° :
470  // --------------------------------------------------------------------------------------
471  function contentReSize(pType)
472  {
473    frm = document.getElementById('reply');
474    switch(pType)
475    {
476      case "+" : frm.style.pixelHeight += 50;                                      break;
477      case "-" : if( frm.style.pixelHeight > 82 ) { frm.style.pixelHeight -= 50; } break;
478    }
479  }
480
481  //---------------------------------------------------------------------------------------
482  // 함수명 : getCookie
483  // 기  능 : 쿠키값취득
484  // 작성일 : 2010-03-20 김현옥
485  // --------------------------------------------------------------------------------------
486  function getCookie(pName)
487  {
488    var flag = document.cookie.indexOf(pName+'=');
489    if (flag != -1)
490    {
491      flag += pName.length + 1
492      end = document.cookie.indexOf(';', flag)
493
494      if (end == -1) { end = document.cookie.length; }
495      return unescape(document.cookie.substring(flag, end))
496    }
497  }
498
499  //---------------------------------------------------------------------------------------
500  // 함수명 : setCookie
501  // 기  능 : 쿠키값저장
502  // 작성일 : 2010-03-20 김현옥
503  // --------------------------------------------------------------------------------------
504  function setCookie(pName, pValue, pExpire)
505  {
506    var today     = new Date();
507    var expireday = new Date(today.getTime() + pExpire);
508
509    if(pExpire<1000)
510    {
511      expireday = new Date(today.getTime() + (pExpire*24*60*60*1000));
512      expireday.setHours(0, 0, 0, 0);
513    }
514
515    document.cookie = pName + "=" + escape(pValue)+ "; path=/; expires=" + expireday.toUTCString() + ";";
516  }
517
518  //---------------------------------------------------------------------------------------
519  // 함수명 : new_window
520  // 기  능 : 가운데창 - POST용 파라메타 사용
521  // 작성일 : 2014-04-01 강대인
522  // ì°¸  ì¡° :
523  // --------------------------------------------------------------------------------------
524  function new_window( pPage, arrVal, pName, pW, pH, pTool, pScroll,pFull,pNameHold,pWindowType)
525  {
526    if ( "yes" != pNameHold   ) { pName       = gf_getTime(); }
527    if ( "yes" != pFull       ) { pFull       = "no"; }
528    if ( "yes" != pWindowType ) { pWindowType = "no"; }
529    var winl = (screen.width-pW)/2;
530    var wint = (screen.height-pH)/2;
531    var settings  = 'height='+pH+',';
532        settings += 'width='+pW+',';
533        settings += 'top='+wint+',';
534        settings += 'left='+winl+',';
535        settings += 'toolbar='+pTool+',';
536        settings += 'scrollbars='+pScroll+',';
537        settings += 'fullscreen='+pFull+',';
538        settings += 'location='+pWindowType+',directories='+pWindowType+',menubar='+pWindowType+',resizable='+pWindowType;
539    win = window.open("about:blank",pName,settings);
540
541    $('#idPost').remove();
542    var act     = pPage;
543    var html = "<form name='postForm' method='post' action='"+act+"' target='"+pName+"'>";
544
545    for(var key in arrVal)
546    {
547      html += "<input type='hidden' name='"+key+"' value='"+arrVal[key]+"' />";
548    }
549
550    html += "</form>";
551    $('<div id="idPost" class="ssHide"></div>').appendTo('body');
552    $('#idPost').html(html);
553
554    document.postForm.submit();
555  }
556
557  //---------------------------------------------------------------------------------------
558  // 함수명 : newWindow
559  // 기  능 : 가운데창
560  // 작성일 : 2010-03-20 김현옥
561  // ì°¸  ì¡° :
562  // --------------------------------------------------------------------------------------
563  function newWindow( pPage, pName, pW, pH, pTool, pScroll,pFull,pNameHold,pWindowType)
564  {
565    if ( "yes" != pNameHold   ) { pName       = gf_getTime(); }
566    if ( "yes" != pFull       ) { pFull       = "no"; }
567    if ( "yes" != pWindowType ) { pWindowType = "no"; }
568    var winl = (screen.width-pW)/2;
569    var wint = (screen.height-pH)/2;
570    var settings  = 'height='+pH+',';
571        settings += 'width='+pW+',';
572        settings += 'top='+wint+',';
573        settings += 'left='+winl+',';
574        settings += 'toolbar='+pTool+',';
575        settings += 'scrollbars='+pScroll+',';
576        settings += 'fullscreen='+pFull+',';
577        settings += 'location='+pWindowType+',directories='+pWindowType+',menubar='+pWindowType+',resizable='+pWindowType;
578    win = window.open("about:blank",pName,settings);
579
580    $('#idPost').remove();
581    var tmpPage  = pPage.split("?");
582    var act     = tmpPage[0];
583    var html = "<form name='postForm' method='post' action='"+act+"' target='"+pName+"'>";
584
585    if ( 1 < tmpPage.length )
586    {
587      var tmpParm = tmpPage[1].split("&");
588      for( loopC=0; loopC<tmpParm.length; loopC++ )
589      {
590        var parm = tmpParm[loopC].split("=");
591        if ( "" != parm )
592        {
593          html += "<input type='hidden' name='"+parm[0]+"' value='"+parm[1]+"' />";
594        }
595      }
596    }
597    html += "</form>";
598    $('<div id="idPost" class="ssHide"></div>').appendTo('body');
599    $('#idPost').html(html);
600
601    document.postForm.submit();
602  }
603  //---------------------------------------------------------------------------------------
604  // 함수명 : newWindow2
605  // 기  능 : 구석창
606  // 작성일 : 2010-03-20 김현옥
607  // --------------------------------------------------------------------------------------
608  function newWindow2( pPage, pName, pW, pH, pL, pTool, pScroll,pFull )
609  {
610    pName = gf_getTime();
611    if ( "yes" != pFull ) { pFull = "no"; }
612    var settings  = 'height='+pH+',';
613        settings += 'width='+pW+',';
614        settings += 'top=0,';
615        settings += 'left='+pL+',';
616        settings += 'toolbar='+pTool+',';
617        settings += 'scrollbars='+pScroll+',';
618        settings += 'fullscreen='+pFull+',';
619        settings += 'location=no,directories=no,menubar=no,resizable=no';
620    win = window.open("about:blank",pName,settings);
621
622    $('#idPost').remove();
623    var tmpPage  = pPage.split("?");
624    var act     = tmpPage[0];
625    var html = "<form name='postForm' method='post' action='"+act+"' target='"+pName+"'>";
626    var tmpParm = tmpPage[1].split("&");
627
628    if ( 1 < tmpPage.length )
629    {
630      var tmpParm = tmpPage[1].split("&");
631      for( loopC=0; loopC<tmpParm.length; loopC++ )
632      {
633        var parm = tmpParm[loopC].split("=");
634        if ( "" != parm )
635        {
636          html += "<input type='hidden' name='"+parm[0]+"' value='"+parm[1]+"' />";
637        }
638      }
639    }
640    html += "</form>";
641    $('<div id="idPost" class="ssHide"></div>').appendTo('body');
642    $('#idPost').html(html);
643
644    document.postForm.submit();
645
646  }
647  //---------------------------------------------------------------------------------------
648  // 함수명 : newWindow3
649  // 기  능 : 위치지정창
650  // 작성일 : 2010-03-20 김현옥
651  // --------------------------------------------------------------------------------------
652  function newWindow3( pPage, pName, pWidth, pHeight, pTop, pLeft, pTool, pScroll,pFull )
653  {
654    pName = gf_getTime();
655    if ( "yes" != pFull ) { pFull = "no"; }
656    var settings  = 'height='+pHeight+',';
657        settings += 'width='+pWidth+',';
658        settings += 'top='+pTop+',';
659        settings += 'left='+pLeft+',';
660        settings += 'toolbar='+pTool+',';
661        settings += 'scrollbars='+pScroll+',';
662        settings += 'fullscreen='+pFull+',';
663        settings += 'location=no,directories=no,menubar=no,resizable=no';
664    win = window.open("about:blank",pName,settings);
665
666    $('#idPost').remove();
667    var tmpPage  = pPage.split("?");
668    var act     = tmpPage[0];
669    var html = "<form name='postForm' method='post' action='"+act+"' target='"+pName+"'>";
670
671    if ( 1 < tmpPage.length )
672    {
673      var tmpParm = tmpPage[1].split("&");
674      for( loopC=0; loopC<tmpParm.length; loopC++ )
675      {
676        var parm = tmpParm[loopC].split("=");
677        if ( "" != parm )
678        {
679          html += "<input type='hidden' name='"+parm[0]+"' value='"+parm[1]+"' />";
680        }
681      }
682    }
683    html += "</form>";
684    $('<div id="idPost" class="ssHide"></div>').appendTo('body');
685    $('#idPost').html(html);
686
687    document.postForm.submit();
688
689  }
690  //---------------------------------------------------------------------------------------
691  // 함수명 : newWindow3
692  // 기  능 : 위치지정창
693  // 작성일 : 2010-03-20 김현옥
694  // --------------------------------------------------------------------------------------
695  function newWindow32( pPage, pName, pWidth, pHeight, pTop, pLeft, pTool, pScroll,pFull )
696  {
697    //pName = gf_getTime();
698    if ( "yes" != pFull ) { pFull = "no"; }
699    var settings  = 'height='+pHeight+',';
700        settings += 'width='+pWidth+',';
701        settings += 'top='+pTop+',';
702        settings += 'left='+pLeft+',';
703        settings += 'toolbar='+pTool+',';
704        settings += 'scrollbars='+pScroll+',';
705        settings += 'fullscreen='+pFull+',';
706        settings += 'location=no,directories=no,menubar=no,resizable=no';
707    win = window.open("about:blank",pName,settings);
708
709    $('#idPost').remove();
710    var tmpPage  = pPage.split("?");
711    var act     = tmpPage[0];
712    var html = "<form name='postForm' method='post' action='"+act+"' target='"+pName+"'>";
713    var tmpParm = tmpPage[1].split("&");
714
715    if ( 1 < tmpPage.length )
716    {
717      var tmpParm = tmpPage[1].split("&");
718      for( loopC=0; loopC<tmpParm.length; loopC++ )
719      {
720        var parm = tmpParm[loopC].split("=");
721        if ( "" != parm )
722        {
723          html += "<input type='hidden' name='"+parm[0]+"' value='"+parm[1]+"' />";
724        }
725      }
726    }
727    html += "</form>";
728    $('<div id="idPost" class="ssHide"></div>').appendTo('body');
729    $('#idPost').html(html);
730
731    document.postForm.submit();
732
733  }
734  // --------------------------------------------------------------------------------------
735  // 모달창 오픈
736  // --------------------------------------------------------------------------------------
737  function modalWindow( pUrl, pParam, pW, pH, pScroll )
738  {
739    var settings  ='dialogWidth='+pW+'px;';
740    settings +='dialogHeight='+pH+'px;';
741    settings +='center=yes;';
742    settings +='screenTop=yes;';
743    settings +='scroll='+pScroll+';';
744    settings +='status=no;';
745    settings +='help=no;';
746    showModalDialog( pUrl, pParam, settings );
747  }
748
749  //---------------------------------------------------------------------------------------
750  // 함수명 : disableKeys
751  // 기  능 :
752  // 작성일 : 2010-03-20 김현옥
753  // --------------------------------------------------------------------------------------
754  function disableKeys()
755  {
756    //var event = e || window.event; //
757
758    if( (event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) ||
759        (event.keyCode >= 112 && event.keyCode <= 123) )
760    {
761      event.keyCode = 0;
762      event.cancelBubble = true;
763      event.returnValue  = false;
764    }
765  }
766
767  //---------------------------------------------------------------------------------------
768  // 함수명 : gf_checkNums
769  // 기  능 : 숫자만 입력
770  // 작성일 : 2010-03-20 김현옥
771  // --------------------------------------------------------------------------------------
772  function gf_checkNums(e)
773  {
774    var keyCode = "";
775
776    if(window.event)
777    {
778      keyCode = window.event.keyCode;
779    }
780    else
781    {
782      keyCode = e.which;
783    }
784
785    //alert(keyCode);
786    if((keyCode >= 48 && keyCode <=57) || (keyCode >= 96 && keyCode <=105) ||  keyCode == 8 || keyCode == 9 || keyCode == 13 || keyCode == 46 || keyCode == 37 || keyCode == 39 )
787    {
788      return true;
789    }
790    else
791    {
792      if(navigator.appName == "Opera")
793      {
794        alert("숫자만 입력할 수 있습니다.");
795        e.preventDefault();
796        return false;
797      }
798
799      if(window.event)
800        window.event.returnValue = false;
801      else
802      {
803        e.preventDefault();
804      }
805    }
806
807  }
808
809  //---------------------------------------------------------------------------------------
810  // 함수명 : gf_checkNumsPoint
811  // 기  능 : 숫자만 입력(소수점 가능)
812  // 작성일 : 2013-05-08 이영남
813  // --------------------------------------------------------------------------------------
814  function gf_checkNumsPoint(e)
815  {
816    var keyCode = "";
817
818    if(window.event)
819    {
820      keyCode = window.event.keyCode;
821    }
822    else
823    {
824      keyCode = e.which;
825    }
826
827    if((keyCode >= 48 && keyCode <=57) || (keyCode >= 96 && keyCode <=105) || keyCode == 8 || keyCode == 9 || keyCode == 13 || keyCode == 46 || keyCode == 110 || keyCode == 190 || keyCode == 37 || keyCode == 39 )
828    {
829      return true;
830    }
831    else
832    {
833
834      if(navigator.appName == "Opera")
835      {
836        alert("숫자만 입력할 수 있습니다.");
837        e.preventDefault();
838        return false;
839      }
840
841      if(window.event)
842      {
843        window.event.returnValue = false;
844      }
845      else
846      {
847        e.preventDefault();
848      }
849    }
850
851  }
852
853  //---------------------------------------------------------------------------------------
854  // 함수명 : isNumber
855  // 기  능 : 숫자인지 체크
856  // 작성일 : 2013-05-29 이영남
857  // --------------------------------------------------------------------------------------
858  function isNumber(s)
859  {
860    s += ''; // 문자열로 변환
861    s = s.replace(/^\s*|\s*$/g, ''); // 좌우 공백 제거
862    if (s == '' || isNaN(s)) return false;
863    return true;
864  }
865
866  //---------------------------------------------------------------------------------------
867  // 함수명 : floatCheck
868  // 기  능 : 소수점 체크
869  // --------------------------------------------------------------------------------------
870  function isFloat(num)
871  {
872    num = OutComma(num);
873    if (num == "")
874    {
875      return false;
876    }
877
878    if (num.indexOf(".") == -1)
879    {
880      return false;
881    }
882    else
883    {
884      return true;
885    }
886  }
887
888  //---------------------------------------------------------------------------------------
889  // 함수명 : OutHyphen
890  // 기  능 : 숫자하이픈빼기
891  // 작성일 : 2013-05-19 이영남
892  // 참  조 : pStr : 문자열
893  // --------------------------------------------------------------------------------------
894  function OutHyphen(pStr)
895  {
896    hyphenStr   = String(pStr);
897    unHyphenStr = '';
898
899    for( loopC=0; loopC<hyphenStr.length; loopC++ )
900    {
901        substr = hyphenStr.substring(loopC,loopC+1);
902        if( substr != '-' ) { unHyphenStr += substr; }
903    }
904
905    return unHyphenStr;
906  }
907
908  //---------------------------------------------------------------------------------------
909  // 함수명 : filterChk
910  // 기  능 : 특수문자체크
911  // 작성일 : 2013-06-19 이영남
912  // 참  조 : pStr : 문자열
913  // --------------------------------------------------------------------------------------
914  function filterChk(pStr)
915  {
916    var chktext = /[ \{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi;
917    if ( chktext.test(pStr) ) { alert('특수문자는 입력하실 수 없습니다.'); return ''; }
918    return pStr;
919  }
920
921  //---------------------------------------------------------------------------------------
922  // 함수명 : getByteLen
923  // 기  능 : 바이트구하기
924  // 작성일 : 2013-06-24 이영남
925  // 참  조 : str : 문자열
926  // --------------------------------------------------------------------------------------
927  function getByteLen(str)
928  {
929    len = (function(s,b,i,c) { for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?2:1); return b })(str);
930    return len;
931  }
932
933  // 자동하이픈(주민번호) ----------------------------------------------------------------------------
934  function gf_autoHyphen(pObj)
935  {
936    var phone = pObj.value;
937    phone = phone.replace(/-/gi,"");
938    if ( 6 <= phone.length )
939    {
940      pObj.value = phone.substring(0,6)+"-"+phone.substring(6,phone.length);
941    }
942  }
943  //---------------------------------------------------------------------------------------
944  // 함수명 : gf_checkComma
945  // 기  능 : 실시간 입력창에 콤마 찍기
946  // 작성일 : 2010-03-20 김현옥
947  // ì°¸  ì¡° :
948  // --------------------------------------------------------------------------------------
949  function gf_checkComma(pObj)
950  {
951    var num = pObj.value;
952    if (pObj.value.length >= 3)
953    {
954      re  = /^$|,/g;
955      num = num.replace(re, "");
956      fl  = "";
957      if ( isNaN(num) ) { alert("문자는 사용할 수 없습니다."); return 0; }  // 숫자형이 아닌경우
958      if ( num == 0 ) { return num; }                                       // 0인경우
959      if ( num < 0  ) { num = num * (-1); fl = "-"; } // 음수확인
960      else            { num = num * 1;              }
961
962      num = new String(num);
963      var arrNum = num.split(".");
964      num = new String(arrNum[0]);
965
966      var temp    = "";
967      var co      = 3;
968      var num_len = num.length;
969      while ( num_len > 0 )
970      {
971        num_len = num_len - co;
972        if ( num_len < 0 ) { co = num_len + co; num_len=0; }
973        temp = "," + num.substr(num_len,co) + temp;
974      }
975      if ( arrNum[1] ) { pObj.value = fl + temp.substr(1) + "." + arrNum[1];    }
976      else             { pObj.value = fl + temp.substr(1);    }
977    }
978  }
979
980  //---------------------------------------------------------------------------------------
981  // 함수명 : OutComma
982  // 기  능 : 숫자컴마빼기
983  // 참  조 : pStr : 문자열
984  // --------------------------------------------------------------------------------------
985  function OutComma(pStr) {
986      str = String(pStr);
987      return str.replace(/[^-\.\d]/g, '');
988  }
989
990  //---------------------------------------------------------------------------------------
991  // 함수명 : InComma
992  // 기  능 : 숫자컴마넣기
993  // 참  조 : pStr : 문자열
994  // --------------------------------------------------------------------------------------
995  function InComma(pStr)
996  {
997    var str = OutComma(pStr);
998	  var regExp = /^([-+]?\d+)(\d{3})(\.\d+)?/;  // 필요한 정규식.
999
1000	  while ( regExp.test( str ) )
1001    {
1002      str = str.replace( regExp, "$1" + "," + "$2" + "$3" );  // 쉼표 삽입.
1003    }
1004
1005    return str;
1006  }
1007
1008  //---------------------------------------------------------------------------------------
1009  // 함수명 : chkBox
1010  // 기  능 : 체크박스 체크
1011  // 작성일 : 2010-03-20 김현옥
1012  // --------------------------------------------------------------------------------------
1013  function chkBox( pObj )
1014  {
1015    var tmp = pObj.id;
1016    var objName = tmp.split("__");
1017    var chk = document.getElementById(objName[0]);
1018    if ( "6" == ieVersion ) { chk.click(); } // IE6인경우 클릭처리
1019
1020    if ( chk.checked ) { $("#"+pObj.id).css({'background':'#afe02e'}); } // 체크액션이 일어나기전이라 반대로 세팅
1021    else               { $("#"+pObj.id).css({'background':''});        }
1022  }
1023
1024  //---------------------------------------------------------------------------------------
1025  // 함수명 : chkRadio
1026  // 기  능 : 라디오버튼 체크
1027  // 작성일 : 2010-03-20 김현옥
1028  // 참  조 : pObj : 라벨Obj
1029  //          라벨의 명칭은 __ 로 구분(예:이름__번호)
1030  // --------------------------------------------------------------------------------------
1031  function chkRadio( pObj,pColor)
1032  {
1033    var label_id = pObj.id;
1034
1035    var tmp = label_id.split("__");
1036    $("label[id^="+tmp[0]+"__]").css({'background':''}); // 그룹라벨 배경을 지움
1037
1038    if ( "nocolor" != pColor )
1039    {
1040      $("#"+label_id).css({'background':'#afe02e'}); // 해당라벨의 배경색변경
1041    }
1042
1043    //$("#"+label_id+" > input[type:radio]").click();
1044  }
1045
1046
1047  //-----------------------------------------------------------------------------
1048  // 처리내용 : 사업자등록번호 정합성 체크
1049  // 인수     : 사업자등록번호(XXX-XX-XXXXX) 생략불가
1050  // 변경이력 : xxxx.xx.xx    xxxxxxxxxxxxxxxxxxxxxxxxxx
1051  // 이벤트   : onBlur
1052  // 사용예   : onBlur='f_chk_SaupNo(this.value)'
1053  //-----------------------------------------------------------------------------
1054  function gf_ChkSaupNo(WorkNum)
1055  {
1056     var rtn_cd = true;
1057     WorkNum    = WorkNum.replace(/-/gi,"");
1058
1059     if ( 10 != WorkNum.length )
1060     {
1061        alert("잘못된 사업자등록번호 입니다.");
1062        rtn_cd = false;
1063     }
1064
1065     if ( rtn_cd )
1066     {
1067        sumMod  = 0;
1068        sumMod += parseInt(WorkNum.substring(0,1));
1069        sumMod += parseInt(WorkNum.substring(1,2)) * 3 % 10;
1070        sumMod += parseInt(WorkNum.substring(2,3)) * 7 % 10;
1071        sumMod += parseInt(WorkNum.substring(3,4)) * 1 % 10;
1072        sumMod += parseInt(WorkNum.substring(4,5)) * 3 % 10;
1073        sumMod += parseInt(WorkNum.substring(5,6)) * 7 % 10;
1074        sumMod += parseInt(WorkNum.substring(6,7)) * 1 % 10;
1075        sumMod += parseInt(WorkNum.substring(7,8)) * 3 % 10;
1076        sumMod += Math.floor(parseInt(WorkNum.substring(8,9)) * 5 / 10);
1077        sumMod += parseInt(WorkNum.substring(8,9)) * 5 % 10;
1078        sumMod += parseInt(WorkNum.substring(9,10));
1079
1080        if ( 0 != sumMod % 10 )
1081        {
1082           alert("잘못된 사업자등록번호 입니다.");
1083           rtn_cd = false;
1084        }
1085     }
1086     return rtn_cd;
1087  }
1088  //---------------------------------------------------------------------------------------
1089  // 함수명 : gf_checkDate
1090  // 기  능 : 날짜자동생성 및 정합성체크
1091  // 작성일 : 2010-03-20 김현옥
1092  // 참  고 : onChange 이벤트 또는 외부셋팅이후 체크
1093  // --------------------------------------------------------------------------------------
1094  function gf_checkDate(pObj)
1095  {
1096    if ("" == pObj.value) { return false; }
1097
1098    var rtnCode = true;
1099    var pattern = /^[12][0-9]{3}\-[01]?[0-9]\-[0-3]?[0-9]$/;
1100    var repDate = pObj.value.match(/[0-9]+$/);
1101    var d = new Date();
1102    var year  = d.getFullYear();
1103    var month = d.getMonth()+1;
1104    var days  = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
1105    var chkDate = pObj.value;
1106
1107    switch(repDate.length)
1108    {
1109      case 8 : chkDate = repDate.substring(0,4)+"-"+repDate.substring(4,6)+"-"+repDate.substring(6,8);      break;
1110      case 6 : chkDate = "20"+repDate.substring(0,2)+"-"+repDate.substring(2,4)+"-"+repDate.substring(4,6); break;
1111      case 4 : chkDate = year+"-"+repDate.substring(0,2)+"-"+repDate.substring(2,4); break;
1112      case 2 : chkDate = year+"-"+month+"-"+repDate.substring(0,2); break;
1113    }
1114
1115    var arrDate = chkDate.split("-");
1116
1117    if( 3 == arrDate.length && "" != arrDate[0] )
1118    {
1119      var aYear  = arrDate[0];
1120      var aMonth = arrDate[1];
1121      var aDay   = arrDate[2];
1122
1123      //윤년계산(윤년의2월은29일로지정)
1124      if( aYear%4==0 && (aYear%100!=0 || aYear%400==0)) { days[1]=29; }
1125
1126      //월체크
1127      if( '01' > aMonth || '12' < aMonth ) { rtnCode = true; }
1128      //일체크
1129      if( rtnCode && ( '01' > aDay || days[aMonth-1] < aDay ) ) { rtnCode = true; }
1130
1131      if(rtnCode)
1132      {
1133         //월 포맷변경
1134         if( 1 == aMonth.length ){ aMonth = '0' + aMonth; }
1135         //일 포맷변경
1136         if( 1 == aDay.length )  { aDay = '0' + aDay; }
1137         chkDate = aYear+"-"+aMonth+"-"+aDay;
1138      }
1139    }
1140    else
1141    {
1142      rtnCode = false;
1143    }
1144    if ( rtnCode ) { pObj.value = chkDate; }
1145    else           { alert("입력된 날짜가 형식에 맞지 않습니다.["+chkDate+"]"); pObj.value = ""; }
1146    return rtnCode;
1147  }
1148  //---------------------------------------------------------------------------------------
1149  // 함수명 : gf_fileTypecheck
1150  // 기  능 : 업로드파일의 파일타입확인
1151  // 작성일 : 2010-03-20 김현옥
1152  // --------------------------------------------------------------------------------------
1153  function gf_fileTypecheck(pObj,pType)
1154  {
1155    if ( "excel" == pType )
1156    {
1157      var fileName = pObj.value;
1158      if (fileName != "")
1159      {
1160        var dotIndex = fileName.lastIndexOf(".");
1161        var ext = fileName.substring(dotIndex+1).toLowerCase();
1162        if(ext != "xlsx")
1163        {
1164          return false;
1165        }
1166      }
1167    }
1168    return true;
1169  }
1170  //---------------------------------------------------------------------------------------
1171  // 함수명 : gf_autoSize
1172  // 기  능 : 입력폼의 길이를 글자수에 맞게 자동조정
1173  // 작성일 : 2010-03-20 김현옥
1174  // --------------------------------------------------------------------------------------
1175  function gf_autoSize(pObj)
1176  {
1177    var msgVal      = pObj.value;
1178    var bytesLen    = 0;
1179    for(var loopC = 0; loopC < msgVal.length; loopC++)
1180    {
1181      var oneChar = msgVal.charAt(loopC);
1182      if ( escape(oneChar).length > 4              ) { bytesLen += 2; }
1183      else if ( oneChar != '\r' || oneChar != '\n' ) { bytesLen++;    }
1184    }
1185    if ( bytesLen )
1186    {
1187      pObj.size = bytesLen+1;
1188    }
1189  }
1190  //---------------------------------------------------------------------------------------
1191  // 함수명 : gf_leftShow
1192  // 기  능 : 좌측메뉴숨기기(토글)
1193  // 작성일 : 2010-03-20 김현옥
1194  // --------------------------------------------------------------------------------------
1195  function gf_leftShow(pKbn)
1196  {
1197    if ( "hide" == pKbn ) { $('#idLeftMenu').hide(); $("#idContainer").css({"padding-left":"0px"});   }
1198    else                  { $('#idLeftMenu').show(); $("#idContainer").css({"padding-left":"195px"}); }
1199  }
1200  //---------------------------------------------------------------------------------------
1201  // 함수명 : overClass
1202  // 기  능 :
1203  // 작성일 : 2009-07-07 김현옥
1204  // --------------------------------------------------------------------------------------
1205  function overClass(pEl)
1206  {
1207    var pattern = /(On)$/;
1208    var code    = pEl.className;
1209    var tag     = "On";
1210
1211    if( pattern.test(code) == true )
1212    {
1213      code = code.replace(tag, "");
1214      pEl.className = code;
1215    }
1216    else
1217    {
1218      pEl.className = code+"On";
1219    }
1220  }
1221  //---------------------------------------------------------------------------------------
1222  // 함수명 : gf_ucFirst
1223  // 기  능 : 문자열의 첫글자를 대문자로 변환
1224  // 작성일 : 2010-03-20 김현옥
1225  // --------------------------------------------------------------------------------------
1226  function gf_ucFirst(pStr)
1227  {
1228    return pStr.substring(0,1).toUpperCase()+pStr.substring(1,pStr.length);
1229  }
1230  //---------------------------------------------------------------------------------------
1231  // 선택레이어토글표시
1232  // --------------------------------------------------------------------------------------
1233  function gf_viewSelectBox(pId1,pId2,pLocation)
1234  {
1235    if ( "none" == $("#"+pId2).css("display") )
1236    {
1237      $('[id^=shHide]').hide();
1238      if ( "top" == pLocation )
1239      {
1240        $("#"+pId2).css({"top":(parseInt($("#"+pId1).offset().top)+7)+"px"});
1241        $("#"+pId2).css({"left":"0"});
1242      }
1243      else
1244      {
1245        $("#"+pId2).css({"top":(parseInt($("#"+pId1).offset().top)+parseInt($("#"+pId1).height())+2)+"px"});
1246        $("#"+pId2).css({"left":(parseInt($("#"+pId1).offset().left))+"px"});
1247      }
1248      $("#"+pId2).show();
1249      $("#"+pId2).focus();
1250    }
1251    else
1252    {
1253      $("#"+pId2).hide();
1254      $("#"+pId1).blur();
1255    }
1256  }
1257  //---------------------------------------------------------------------------------------
1258  // 선택레이어토글표시
1259  // --------------------------------------------------------------------------------------
1260  function gf_allCheckBox(pId)
1261  {
1262    if ($("#shAll"+pId+":checked").length > 0)
1263    {
1264      $("input[id^=sh"+pId+"]:not(checked)").attr("checked", true);
1265      $("label[id^=sh"+pId+"]").css("background", "#afe02e");
1266    }
1267    else
1268    {
1269      $("input[id^=sh"+pId+"]:checked").attr("checked", false);
1270      $("label[id^=sh"+pId+"]").css("background", "");
1271    }
1272  }
1273  //---------------------------------------------------------------------------------------
1274  // 함수명 : gf_bookMark
1275  // 기  능 : 즐겨찾기 등록
1276  // 작성일 : 2012-03-19
1277  // 참  조 : pTitle = 북마크 제목
1278  // --------------------------------------------------------------------------------------
1279  function gf_bookMark(pTitle)
1280  {
1281    pUrl = location.href;
1282    if (window.sidebar) // firefox
1283    window.sidebar.addPanel(pTitle, pUrl, "");
1284
1285    else if(window.opera && window.print)
1286    { // opera
1287     var elem = document.createElement('a');
1288     elem.setAttribute('href',url);
1289     elem.setAttribute('title',pTitle);
1290     elem.setAttribute('rel','sidebar');
1291     elem.click();
1292    }
1293    else if(document.all) // ie
1294    window.external.AddFavorite(pUrl,pTitle);
1295  }
1296  //---------------------------------------------------------------------------------------
1297  // 날짜값취득(팝업창의 명칭에사용:동일명칭안생기게하기위한방법)
1298  // --------------------------------------------------------------------------------------
1299  function gf_getTime()
1300  {
1301    var now = new Date();
1302    var nowStr = now.toString().replace(/ /gi,"").replace(/[+:]/gi,"");
1303    return nowStr;
1304  }
1305
1306  // 스피트메뉴추가 ----------------------------------------------------------------------------------
1307  function addSpeedMenu(pType,pCate,pName,pPos)
1308  {
1309    if ( "" != pCate )
1310    {
1311      if ( confirm("["+pName+"]을(를) 메뉴에 추가 하시겠습니까?") )
1312      {
1313        $.post("/_admin/index.php", {shProgram:15,shType:pType,addCate:pCate}, function(data)
1314        {
1315          if ( "DUP" == data )
1316          {
1317            alert("이미 등록하신 메뉴 입니다.");
1318          }
1319          else
1320          {
1321            var aData = data.split("||");
1322            if ( "POPUP" == pPos ) { opener.refreshSpeedMenu(aData[1]); }
1323            else                   { refreshSpeedMenu(aData[1]); }
1324
1325          }
1326        });
1327      }
1328    }
1329  }
1330
1331  //---------------------------------------------------------------------------------------
1332  // 카피할때 출처 삽입하기
1333  // --------------------------------------------------------------------------------------
1334  function insertOrigin(pTitle, pForm, pUrl)
1335  {
1336    if (window.event)
1337    {
1338      window.event.returnValue = true;
1339      __insert_origin_title__  = pTitle;
1340      __insert_origin_url__    = pUrl;
1341      __insert_origin_from__   = pForm;
1342      window.setTimeout("_procInsertOrigin()", 25);
1343    }
1344  }
1345
1346  //---------------------------------------------------------------------------------------
1347  // _procInsertOrigin
1348  // --------------------------------------------------------------------------------------
1349  function _procInsertOrigin()
1350  {
1351    if (window.clipboardData)
1352    {
1353      var obj       = document.frames["hdFrame"].document.body;
1354      var rng       = obj.createTextRange();
1355      var printFrom = '';
1356      if ( __insert_origin_from__ != "" )
1357      {
1358        printFrom = " from " + __insert_origin_from__;
1359      }
1360      var footerHTML = "<p style='margin:15px 0 0 0;'>";
1361      footerHTML    += "<a href='"+ __insert_origin_url__ +"' target='_new' title='제목 부분을 클릭하면\n원 게시물을 볼 수 있습니다.'>[출처] "+ __insert_origin_title__ + printFrom;
1362      footerHTML    += "</a></p>";
1363      rng.execCommand("Paste");
1364      obj.insertAdjacentHTML("BeforeEnd",  footerHTML);
1365      rng = obj.createTextRange();
1366      rng.execCommand("SelectAll");
1367      rng.execCommand("Cut");
1368    }
1369  }
1370
1371  // 라인선택시 색상변경 -----------------------------------------------------------------------------
1372  function gf_lineSelect(pPos,pObj,pChoice)
1373  {
1374    //if ( "white" == $("#tr_"+pPos).css('backgroundColor') ) { $("#tr_"+pPos).css({'backgroundColor' : '#f2f2f2'}); $("#choice_"+pChoice).attr("checked","checked"); }
1375
1376    if ( !$("#choice_"+pChoice).is(":checked") ) { $("#tr_"+pPos).css({'backgroundColor' : '#f2f2f2'}); $("#choice_"+pChoice).attr("checked",true);}
1377    else                                         { $("#tr_"+pPos).css({'backgroundColor' : 'white'});    $("#choice_"+pChoice).attr("checked",false);}
1378  }
1379
1380  // 전체선택시 색상변경 -----------------------------------------------------------------------------
1381  function gf_allLineSelect(pObj)
1382  {
1383    if ( pObj.checked ) { $("#srListList [id^=tr_]").css({'background' : '#f2f2f2'});   }
1384    else                { $("#srListList [id^=tr_]").css({'background' : 'white'}); }
1385  }
1386
1387  // 화면 상단 메뉴관련함수 --------------------------------------------------------------------------
1388  function tmOver(pPos) { $("#idHeader #menu"+pPos).attr("class","ssTblOn"); mf_topMenuMouseOver(pPos); }
1389  function tmOut(pPos)  { $("#idHeader #menu"+pPos).attr("class","ssTbl");   }
1390  function tssOver()    { $("#idHeader #topSpeedSys").attr("class","ssBtnSysOn"); }
1391  function tssOut()     { $("#idHeader #topSpeedSys").attr("class","ssBtnSys");   }
1392  function tshOver()    { $("#idHeader #topSpeedHome").attr("class","ssBtnHomeOn"); }
1393  function tshOut()     { $("#idHeader #topSpeedHome").attr("class","ssBtnHome");   }
1394  function tsmOver()    { $("#idHeader #topSpeedMenu").attr("class","ssBtnMenuOn"); }
1395  function tsmOut()     { $("#idHeader #topSpeedMenu").attr("class","ssBtnMenu");   }
1396  function tspOver()    { $("#idHeader #topSpeedPlus").attr("class","ssBtnPlusOn"); }
1397  function tspOut()     { $("#idHeader #topSpeedPlus").attr("class","ssBtnPlus");   }
1398  function tslOver()    { $("#idHeader #topSpeedMoveLeft").attr("class","ssBtnLeftOn"); }
1399  function tslOut()     { $("#idHeader #topSpeedMoveLeft").attr("class","ssBtnLeft");   }
1400  function tsrOver()    { $("#idHeader #topSpeedMoveRight").attr("class","ssBtnRightOn"); }
1401  function tsrOut()     { $("#idHeader #topSpeedMoveRight").attr("class","ssBtnRight");   }
1402  function tsiOver(pObj) { pObj.className="ssSMenuOn"; }
1403  function tsiOut(pObj)  { pObj.className="ssSMenu"; }
1404
1405  //-----------------------------------------------------------------------------
1406  // 이미지 롤오버 관련함수(드림위버)
1407  //-----------------------------------------------------------------------------
1408  function MM_swapImgRestore() { //v3.0
1409    var i,x,a=document.MM_sr;
1409 for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
1410  }
1411  function MM_preloadImages() { //v3.0
1412    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
1413      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
1414      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
1415  }
1416  function MM_findObj(n, d) { //v4.01
1417    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
1418      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
1419    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
1420    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
1421    if(!x && d.getElementById) x=d.getElementById(n); return x;
1422  }
1423  function MM_swapImage() { //v3.0
1424    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
1425     if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
1426  }
1427  function MM_scanStyles(obj, prop) { //v8.0
1428    var inlineStyle = null; var ccProp = prop; var dash = ccProp.indexOf("-");
1429    while (dash != -1){ccProp = ccProp.substring(0, dash) + ccProp.substring(dash+1,dash+2).toUpperCase() + ccProp.substring(dash+2); dash = ccProp.indexOf("-");}
1430    inlineStyle = eval("obj.style." + ccProp);
1431    if(inlineStyle) return inlineStyle;
1432    var ss = document.styleSheets;
1433    for (var x = 0; x < ss.length; x++) { var rules = ss[x].cssRules;
1434    for (var y = 0; y < rules.length; y++) { var z = rules[y].style;
1435      if(z[prop] && (rules[y].selectorText == '*[ID"' + obj.id + '"]')) {
1436          return z[prop];
1437    }  }  }  return "";
1438  }
1439
1440  function MM_getProp(obj, prop) { //v8.0
1441    if (!obj) return ("");
1442    if (prop == "L") return obj.offsetLeft;
1443    else if (prop == "T") return obj.offsetTop;
1444    else if (prop == "W") return obj.offsetWidth;
1445    else if (prop == "H") return obj.offsetHeight;
1446    else {
1447      if (typeof(window.getComputedStyle) == "undefined") {
1448        if (typeof(obj.currentStyle) == "undefined"){
1449          if (prop == "P") return MM_scanStyles(obj,"position");
1450          else if (prop == "Z") return MM_scanStyles(obj,"z-index");
1451          else if (prop == "V") return MM_scanStyles(obj,"visibility");
1452        } else {
1453          if (prop == "P") return obj.currentStyle.position;
1454          else if (prop == "Z") return obj.currentStyle.zIndex;
1455          else if (prop == "V") return obj.currentStyle.visibility;
1456        }
1457      } else {
1458        if (prop == "P") return window.getComputedStyle(obj,null).getPropertyValue("position");
1459        else if (prop == "Z") return window.getComputedStyle(obj,null).getPropertyValue("z-index");
1460        else if (prop == "V") return window.getComputedStyle(obj,null).getPropertyValue("visibility");
1461      }
1462    }
1463  }
1464
1465  function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v8.0
1466    //Copyright 2005 Macromedia, Inc. All rights reserved.
1467    var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
1468    var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
1469    retVal = true; if(IE && event) event.returnValue = true;
1470    if (MM_dragLayer.arguments.length > 1) {
1471      curDrag = MM_findObj(objName); if (!curDrag) return false;
1472      if (!document.allLayers) { document.allLayers = new Array();
1473        with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
1474          for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
1475            with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
1476        } else {
1477          if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div");
1478            for (i=0;i<spns.length;i++) if (MM_getProp(spns[i],'P')) allLayers[allLayers.length]=spns[i];}
1479          for (i=0;i<all.length;i++) {
1480      if (NS4){if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];}
1481            else if (MM_getProp(all[i],'P')) allLayers[allLayers.length]=all[i];
1482          }
1483      } }
1484      curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
1485      curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
1486      curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
1487      curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
1488      curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
1489
1490      curDrag.MM_oldZ = (NS4)?curDrag.zIndex:MM_getProp(curDrag,'Z');
1491      curLeft= (NS4)?curDrag.left:MM_getProp(curDrag,'L');
1492      if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
1493      curTop = (NS4)?curDrag.top:MM_getProp(curDrag,'T');
1494      if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
1495      curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
1496      curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
1497      curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
1498      document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
1499      if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
1500    } else {
1501      var theEvent = ((NS)?objName.type:event.type);
1502      if (theEvent == 'mousedown') {
1503        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
1504        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
1505        var maxDragZ=null; document.MM_maxZ = 0;
1506        for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
1507          var aLayerZ = (NS4)?aLayer.zIndex:MM_getProp(aLayer,'Z');
1508          if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
1509          var isVisible = ((NS4)?aLayer.visibility:MM_getProp(aLayer,'V')).indexOf('hid') == -1;
1510          if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
1511            var parentL=0; var parentT=0;
1512            if (NS6) { parentLayer = aLayer.parentNode;
1513              while (parentLayer != null && parentLayer != document && MM_getProp(parentLayer,'P')) {
1514                parentL += parseInt(MM_getProp(parentLayer,'L')); parentT += parseInt(MM_getProp(parentLayer,'T'));
1515                parentLayer = parentLayer.parentNode;
1516                if (parentLayer==document) parentLayer = null;
1517            } } else if (IE) { parentLayer = aLayer.parentElement;
1518              while (parentLayer != null && MM_getProp(parentLayer,'P')) {
1519                parentL += MM_getProp(parentLayer,'L'); parentT += MM_getProp(parentLayer,'T');
1520                parentLayer = parentLayer.parentElement; } }
1521            var tmpX=mouseX-((NS4)?pageX:(MM_getProp(aLayer,'L'))+parentL+MM_hLeft);
1522            var tmpY=mouseY-((NS4)?pageY:(MM_getProp(aLayer,'T'))+parentT+MM_hTop);
1523            if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
1524            var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += (NS4)?clip.width:MM_getProp(aLayer,'W');
1525            var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += (NS4)?clip.height:MM_getProp(aLayer,'H');
1526            if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
1527                || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
1528        if (curDrag) {
1529          document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
1530          curLeft = (NS4)?curDrag.left:MM_getProp(curDrag,'L');
1531          curTop = (NS4)?curDrag.top:MM_getProp(curDrag,'T');
1532          if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
1533          MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
1534          document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
1535          if(curDrag.MM_toFront) {
1536            var newZ = parseInt(document.MM_maxZ)+1;
1537            eval('curDrag.'+((NS4)?'':'style.')+'zIndex=newZ');
1538            if (!curDrag.MM_dropBack) document.MM_maxZ++; }
1539          retVal = false; if(!NS4&&!NS6) event.returnValue = false;
1540      } } else if (theEvent == 'mousemove') {
1541        if (document.MM_curDrag) with (document.MM_curDrag) {
1542          var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
1543          var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
1544          var newLeft = mouseX-MM_oldX; var newTop  = mouseY-MM_oldY;
1545          if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
1546          if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
1547          if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
1548          if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
1549          MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
1550          if (NS4) {left = newLeft; top = newTop;}
1551          else if (NS6){style.left = newLeft + "px"; style.top = newTop + "px";}
1552          else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
1553          if (MM_dragJS) eval(MM_dragJS);
1554          retVal = false; if(!NS) event.returnValue = false;
1555      } } else if (theEvent == 'mouseup') {
1556        document.onmousemove = null;
1557        if (NS) document.releaseEvents(Event.MOUSEMOVE);
1558        if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
1559        if (document.MM_curDrag) with (document.MM_curDrag) {
1560          if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
1561              (Math.pow(MM_targL-((NS4)?left:MM_getProp(document.MM_curDrag,'L')),2)+
1562               Math.pow(MM_targT-((NS4)?top:MM_getProp(document.MM_curDrag,'T')),2))<=MM_tol) {
1563            if (NS4) {left = MM_targL; top = MM_targT;}
1564            else if (NS6) {style.left = MM_targL + "px"; style.top = MM_targT + "px";}
1565            else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
1566            MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
1567          if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
1568          if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
1569          retVal = false; if(!NS) event.returnValue = false; }
1570        document.MM_curDrag = null;
1571      }
1572      if (NS) document.routeEvent(objName);
1573    } return retVal;
1574  }
1575
1576  //이메일 형식체크
1577  function gf_emailChk(parm)
1578  {
1579    var bol = false;
1580    if(!parm) return false;
1581    var exptext = /^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/;
1582    if (exptext.test(parm) == true) { bol = true; }
1583    return bol;     // bol 값을 반환 . 이메일 형식이 아니면 false
1584  }
1585
1586  // 날짜형식('Y-m-d') 리턴
1587  // 작성자 : 이영남
1588  // sDate  : Date() 값
1589  function f_formatDate(sDate)
1590  {
1591    var year      = sDate.getFullYear();
1592    var month     = (sDate.getMonth()+1)<10? "0" + (sDate.getMonth()+1) : (sDate.getMonth()+1) ;
1593    var day			  = sDate.getDate()<10 ? "0" + sDate.getDate() : sDate.getDate();
1594    var rtn_date  = year + "-" + month+ "-" + day;
1595
1596    return rtn_date;
1597  }
1598
1599  // 날짜 덧셈/뺄셈
1600  // 작성자 : 이영남
1601  // sDate  : Y-m-d 형식 날짜
1602  // op     : 연산자
1603  // dc     : 일수(count day)
1604  function f_calcDate(sDate, op, dc)
1605  {
1606    var	date	= sDate.split('-');
1607    var dt3   = "";
1608
1609    if ( op == "plus" )
1610    {
1611      dt3				= new Date(date[0], Number(date[1])-1, Number(date[2])+Number(dc));
1612    }
1613    else if ( op == 'minus' )
1614    {
1615      dt3				= new Date(date[0], Number(date[1])-1, Number(date[2])-Number(dc));
1616    }
1617
1618    var rtn_date  = f_formatDate(dt3);
1619
1620    return rtn_date;
1621  }
1622
1623  // 날짜계산
1624  // 작성자 : 이영남
1625  // sDate  : Y-m-d 형식 날짜
1626  // op     : 연산자
1627  // type   : 년,월,일 별 계산 (y:년,m:월,d:일)
1628  // cnt    : 계산 수
1629  function f_calcDate2(sDate, op, type, cnt)
1630  {
1631    var	date	= sDate.split('-');
1632    var dt3   = "";
1633
1634    if ( op == "plus" )
1635    {
1636      if      ( type == "y" ) { dt3	= new Date(Number(date[0])+Number(cnt), Number(date[1])-1, Number(date[2])); }
1637      else if ( type == "m" ) { dt3	= new Date(Number(date[0]), Number(date[1])-1+Number(cnt), Number(date[2])); }
1638      else if ( type == "d" ) { dt3	= new Date(Number(date[0]), Number(date[1])-1, Number(date[2])+Number(cnt)); }
1639    }
1640    else if ( op == 'minus' )
1641    {
1642      if      ( type == "y" ) { dt3	= new Date(Number(date[0])-Number(cnt), Number(date[1])-1, Number(date[2])); }
1643      else if ( type == "m" ) { dt3	= new Date(Number(date[0]), Number(date[1])-1-Number(cnt), Number(date[2])); }
1644      else if ( type == "d" ) { dt3	= new Date(Number(date[0]), Number(date[1])-1, Number(date[2])-Number(cnt)); }
1645    }
1646
1647    var rtn_date  = f_formatDate(dt3);
1648
1649    return rtn_date;
1650  }
1651
1652  // 날짜형식체크
1653  // 작성자 : 이영남
1654  // confirmText : YYYY-mm_dd 형식값
1655  function onlyDate(confirmText)
1656  {
1657    var txtYear, txtMonth, txtDay, txtLastDay;
1658    if( confirmText.length != 10 ) { return false; }
1659    try
1660    {
1661      var sDate = confirmText.split("-");
1662      var cDate = new Date(sDate[0], Number(sDate[1])-1, sDate[2]);
1663      if( cDate == "NaN" ) { return false; }
1664      if( confirmText != f_formatDate(cDate) ) { return false; }
1665      return true;
1666    }
1667    catch(e)
1668    {
1669      return false;
1670    }
1671  }
1672
1673  // 문자열을 byte 단위로 자르기 - 한글깨지지않게
1674  // 2016-05-11 강대인
1675  function cutByte(str,len)
1676  {
1677    var count = 0;
1678
1679    for(var i = 0; i < str.length; i++) {
1680      if(escape(str.charAt(i)).length >= 4)
1681        count += 2;
1682      else
1683        if(escape(str.charAt(i)) != "%0D")
1684          count++;
1685
1686
1687      if(count >  len) {
1688        if(escape(str.charAt(i)) == "%0A")
1689          i--;
1690        break;
1691      }
1692    }
1693    return str.substring(0, i);
1694  }
1695
1696  // 숫자 앞자리에 0으로 채우기 2019-11-13 강대인
1697  function number_pad(n, width)
1698  {
1699    n = n + '';
1700    return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
1701  }
1702
1703
1704
1705
1706}

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.