1 2//datepicker ì¤ì 3var datepickerOption = { 4 "dateFormat" : "yy-mm-dd" 5 ,"dayNames" : ["ì¼ìì¼","ììì¼","íìì¼","ììì¼","목ìì¼","ê¸ìì¼","í ìì¼"] 6 ,"dayNamesMin" : ["ì¼","ì","í","ì","목","ê¸","í "] 7 ,"dayNamesShort" : ["ì¼","ì","í","ì","목","ê¸","í "] 8 ,"monthNames" : ["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"] 9 ,"showMonthAfterYear" : true 10 ,"yearSuffix" : "ë " 11}; 12 13 14// í¹ì object(movObj)를 ê¸°ì¤ object(stdObj)ì ìíë ìì¹ë¡ ì´ëìí¨ë¤. 15// posDirect(ê¸°ë³¸ê° : D) : ì,í,ì¢,ì° (U,D,L,R) movObj를 stdObjì ì´ë ì리ì ìì¹ ìí¬ì§ ê²°ì 16// posVert : movObjì stdObjì ì를 ë§ì¶ì§ ìë를 ë§ì¶ì§ ê²°ì (U, D) 17// posHori(ê¸°ë³¸ê° : L) : movObjì stdObjì ì¼ìª½ì ë§ì¶ì§ ì¤ë¥¸ìª½ì ë§ì¶ì§ ê²°ì (L, R) 18// adjLeft, adjTop (ê¸°ë³¸ê° : 0) : ìì¹ì¡°ì ì© ë³ì 19// movObjì positionì absoluteì¼ë¡, display를 blockì¼ë¡ ë³ê²½ ìí¨ë¤ 20///////////// chkNan() íì(ê°ì´ nanì¸ì§ ì²´í¬) 21function setObjByObj(stdObj, movObj, posDirect, posVert, posHori, adjLeft, adjTop) 22{ 23 if(!posDirect) 24 posDirect = "D"; 25 if(!posHori) 26 posHori = "L"; 27 28 if(!adjLeft || isNaN(adjLeft)) 29 adjLeft = 0; 30 if(!adjTop || isNaN(adjTop)) 31 adjTop = 0; 32 33 // 기ì¤ê°ì²´ì ìì¹ 34 var left = $(stdObj).offset().left; 35 var top = $(stdObj).offset().top; 36 37 // 기ì¤ê°ì²´ í¬ê¸° 38 var stdWidth = $(stdObj).width(); 39 var stdHeight = $(stdObj).height(); 40 41 // 기ì¤ê°ì²´ border ê° 42 var stdBorderTop = chkNan(parseInt($(stdObj).css("border-top-width")), 0); 43 var stdBorderBottom = chkNan(parseInt($(stdObj).css("border-bottom-width")), 0); 44 var stdBorderLeft = chkNan(parseInt($(stdObj).css("border-left-width")), 0); 45 var stdBorderRight = chkNan(parseInt($(stdObj).css("border-right-width")), 0); 46 47 // 기ì¤ê°ì²´ paddingê° 48 var stdPaddingTop = chkNan(parseInt($(stdObj).css("padding-top")), 0); 49 var stdPaddingBottom= chkNan(parseInt($(stdObj).css("padding-bottom")), 0); 50 var stdPaddingLeft = chkNan(parseInt($(stdObj).css("padding-left")), 0); 51 var stdPaddingRight = chkNan(parseInt($(stdObj).css("padding-right")), 0); 52 53 54 55 // ì´ëê°ì²´ í¬ê¸° 56 var movWidth = $(movObj).width(); 57 var movHeight = $(movObj).height(); 58 59 // ì´ëê°ì²´ border ê° 60 var movBorderTop = chkNan(parseInt($(movObj).css("border-top-width")), 0); 61 var movBorderBottom = chkNan(parseInt($(movObj).css("border-bottom-width")), 0); 62 var movBorderLeft = chkNan(parseInt($(movObj).css("border-left-width")), 0); 63 var movBorderRight = chkNan(parseInt($(movObj).css("border-right-width")), 0); 64 65 // ì´ëê°ì²´ marginê° 66 var movMarginTop = chkNan(parseInt($(movObj).css("margin-top")), 0); 67 var movMarginBottom = chkNan(parseInt($(movObj).css("margin-bottom")), 0); 68 var movMarginLeft = chkNan(parseInt($(movObj).css("margin-left")), 0); 69 var movMarginRight = chkNan(parseInt($(movObj).css("margin-right")), 0); 70 71 // ì´ëê°ì²´ paddingê° 72 var movPaddingTop = chkNan(parseInt($(movObj).css("padding-top")), 0); 73 var movPaddingBottom= chkNan(parseInt($(movObj).css("padding-bottom")), 0); 74 var movPaddingLeft = chkNan(parseInt($(movObj).css("padding-left")), 0); 75 var movPaddingRight = chkNan(parseInt($(movObj).css("padding-right")), 0); 76 77 stdWidth += stdBorderLeft + stdBorderRight; 78 stdHeight += stdBorderTop + stdBorderBottom; 79 80 movWidth += movBorderLeft + movBorderRight; 81 movHeight += movBorderTop + movBorderBottom; 82 83 if(posDirect == "U") //ì쪽ì ìì¹ 84 { 85 top -= movHeight + movPaddingTop + movPaddingBottom; 86 if(posHori == "R") 87 left += stdWidth - movWidth - movPaddingLeft - movPaddingRight + stdPaddingLeft + stdPaddingRight; 88 89 }else if(posDirect == "D") //ìë쪽ì ìì¹ 90 { 91 top += stdHeight + stdPaddingTop + stdPaddingBottom; 92 if(posHori == "R") 93 left += stdWidth - movWidth - movPaddingLeft - movPaddingRight + stdPaddingLeft + stdPaddingRight; 94 95 }else if(posDirect == "L") //ì¼ìª½ì ìì¹ 96 { 97 left -= movWidth + movPaddingLeft + movPaddingRight; 98 if(posVert == "D") 99 top -= movHeight - stdHeight + movPaddingTop + movPaddingBottom - stdPaddingTop
99- stdPaddingBottom; 100 101 }else if(posDirect == "R") //ì¤ë¥¸ìª½ì ìì¹ 102 { 103 left += stdWidth + stdPaddingLeft + stdPaddingRight; 104 if(posVert == "D") 105 top -= movHeight - stdHeight + movPaddingTop + movPaddingBottom - stdPaddingTop - stdPaddingBottom; 106 } 107 108 top -= movMarginTop; 109 left -= movMarginLeft; 110 111 left += adjLeft; 112 top += adjTop; 113 114 $(movObj).css({ 115 "display" : "block", 116 "position" :"absolute", 117 "left" : left, 118 "top" : top 119 }); 120} 121 122function chkNan(obj, newVal) 123{ 124 if(isNaN(obj)) 125 return newVal; 126 else 127 return obj; 128} 129 130 131 132// ë°í¬ëª ë ì´ì´ë¥¼ íë©´ ì ì²´ì ë®ëë¤. 133// 모ë ì¸ì ìëµ ê°ë¥(기본 ì¤ì ë í¬ëª ëì íì ë°°ê²½) 134// depth(0~100) : í¬ëª ë. ëì ìë¡ ì§í¨ 135// zIndex : z-indexê°ì´ íìí ë ì¬ì© 136// bgColor : ë°°ê²½ ì(000000 : ê²ì ) 137// n : ì¬ë¬ê°ë¥¼ ì¬ì©í ë(ì¬ì©í ì¼ ììë¯..) 138// 139function setGrayBg(depth, zIndex, bgColor, n) 140{ 141 var docWidth = $(window).width(); 142 var docHeight = $(window).height(); 143 var opacity = 40; 144 145 if(depth) 146 opacity = depth; 147 if(!bgColor) 148 bgColor = "000000"; 149 150 var divHtml = "<div id='idGrayBg"+n+"' "; 151 divHtml += "style='position:absolute; left:0px; top:0px; display:block; width:"+docWidth+"px; height:"+docHeight+"px; "; 152 divHtml += "filter:alpha(opacity="+opacity+");opacity:"+(opacity/100)+";-moz-opacity:"+(opacity/100)+"; "; 153 if(zIndex) 154 divHtml += "z-index:"+zIndex+";"; 155 156 divHtml += "background-color:#"+bgColor+";"; 157 divHtml += "'></div>" 158 159 $("#idGrayBg"+n).remove(); 160 $(document.body).append(divHtml); 161} 162 163 164 165 166/******************************** í¼ê´ë ¨ ìì ********************************/ 167/* 168Name : check_chr 169Parameter : input ì¤ë¸ì í¸, ë©ìì§, ê¸ììê°(ex> 5) 170Description : ì ë ¥ê° í¼ì²´í¬ 171*/ 172function check_chr(tar2, str2, max2) 173{ 174 if(tar2.value.length < max2) { 175 alert(str2+(chkJongsung(str2)>0?"ì":"를")+' '+ max2 +'ì ì´ì ì ë ¥í´ì£¼ì¸ì.'); 176 if (tar2.style.display != "none") 177 { 178 tar2.focus(); 179 } 180 return true; 181 } 182 return false; 183} 184 185function check_chr_e(tar2, str2, max2) 186{ 187 if(tar2.value.length < max2) { 188 alert("Please enter at least "+max2+" letter(s) for "+str2); 189 if (tar2.style.display != "none") 190 { 191 tar2.focus(); 192 } 193 return true; 194 } 195 return false; 196} 197 198/* 199Name : length 200Parameter : ê¸ì 201Description : í´ë¹ê¸ìì 구í기 202*/ 203function length(str) { 204 return (str.length + (escape(str) + "%u").match(/%u/g).length-1); 205} 206 207/* 208Name : length 209Parameter : ê¸ì 210Description : í´ë¹ê¸ìì 구í기 211*/ 212function checkMaxLength(e, obj, len, viewMsg) { 213 if(viewMsg) 214 window.status = ""; 215 216 // backspace(8), tab(9), delete(46), home(35), end(36), left(37), right(39) 217 if(e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 46 218 || e.keyCode == 35 || e.keyCode == 36 219 || e.keyCode == 37 || e.keyCode == 39) { 220 e.returnValue = true; 221 return; 222 } 223 224 225 226 if(length(obj.value) >= len) { 227 if(viewMsg) { 228 window.status = e.keyCode + "overflow length : " + length(obj.value); 229 } 230 alert("ê¸ììê° " + len + "ì ì´íë¡ ì ë ¥í´ì£¼ì¸ì.(íê¸ : " + Math.floor(len/2) + "ì, ì문 : " + len + "ì)"); 231 obj.value = countString(obj.value, len-1); 232 return; 233 } 234 e.returnValue = true; 235} 236 237/* 238Name : length 239Parameter : ê¸ì 240Description : í´ë¹ê¸ìì 구í기 241*/ 242function onBlurCheckLength(obj, len, isAlert) { 243 if(length(obj.value) > len) { 244 var msg = "ê¸ììê° " + len + "ì ì´íë¡ ì ë ¥í´ì£¼ì¸ì.(íê¸ : " + Math.floor(len/2) + "ì, ì문 : " + len + "ì)"; 245 if(isAlert) 246 alert(msg); 247 else 248 window.status = msg; 249 obj.value = countString(obj.value, len); 250 obj.focus(); 251 } 252} 253 254/* 255Name : length 256Parameter : ê¸ì 257Description : í´ë¹ê¸ìì 구í기 258*/ 259function countString(str, len) { 260 if(length(str) < len) 261 return str; 262 var cnt = 0; 263 var ret = ""; 264 265 for(i = 0; i < len && cnt < len; i++) { 266 var ch_i = str.charAt(i); 267 var ch = escape(ch_i); 268 if(length(ch) == 1 || ch_i == "%") { 269 cnt++; 270 ret += str.charAt(i); 271 } else { 272 cnt += 2; 273 if(i + 1 < len) // ì§ì 길ìì íê¸ì´ 걸리면 íµê³¼ 274 ret += str.charAt(i); 275 } 276 } 277 return ret; 278} 279 280/* 281Name : radio_check_write 282Parameter : ê°ì²´, ê° 283Description : input ë¼ëì¤ ê´ë ¨ ê° ì²´í¬ 284*/ 285function radio_check_write(item01, item02) 286{ 287 if(typeof(item01.length) == ""){ 288 if(item01.value == item02){ 289 item01.checked = true; 290 } 291 else{ 292 item01.checked = false;
293 } 294 } 295 else{ 296 for (i = 0; i < item01.length; i++ ) 297 { 298 if(item01[i].value == item02){ 299 item01[i].checked = true; 300 } 301 else{ 302 item01[i].checked = false; 303 } 304 } 305 } 306} 307 308/* 309Name : num_check 310Parameter : ê°ì²´ 311Description : ì«ìì ë ¥ì²´í¬(ex > num_check(this)) 312*/ 313function num_check(e, item) 314{ 315 if(!e) var e = window.event; 316 if(e.which) eventObj = e.which; 317 else if(e.keyCode) eventObj = e.keyCode; 318 319 if(eventObj == 48 || eventObj == 49 || eventObj == 50 || eventObj == 51 || eventObj == 52 || eventObj == 53 || eventObj == 54 || eventObj == 55 || eventObj == 56 || eventObj == 57 || eventObj == 17 || eventObj == 67 || eventObj == 43 || eventObj == 86 || eventObj == 56 || eventObj == 9 || eventObj == 56 || eventObj == 8 || eventObj == 46 || eventObj == 37 || eventObj == 38 || eventObj == 39 || eventObj == 40 || eventObj == 45 || eventObj == 13){ 320 } 321 else{ 322 alert("ì«ìë§ ì ë ¥í´ì£¼ì¸ì."); 323 if(e.preventDefault){ 324 e.preventDefault(); 325 } 326 else{ 327 e.returnValue=false; 328 } 329 item.focus(); 330 } 331} 332 333/* 334Name : new_chkDate 335Parameter : ê°ì²´ 336Description : ë ì§ íìì²´í¬(ex > new_chkDate(this)) 337*/ 338function new_chkDate(obj) 339{ 340 var str = obj.value; 341 if(str == "") return; 342 var exp = /[0-9]{4}-[0-9]{2}-[0-9]{2}/ 343 if(!exp.test(str)) 344 { 345 alert("ë ì§íìì ë§ê² ì ë ¥íì¸ì.\n\nì)2007-05-05") 346 obj.value = ""; 347 obj.focus(); 348 return 349 } 350 var Year = Number(str.substring(0,4)); 351 var Month = Number(str.substring(5,7)); 352 var Day = Number(str.substring(8,10)); 353 354 var february = ((0 == Year % 4) && (0 != (Year % 100))) || 355 (0 == Year % 400) ? 29 : 28; 356 var arrLastDate = new Array(31, february, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);//í´ë¹ìì ë§ì§ë§ì¼ 357 if((Month < 1 || Month > 12) || (Day < 1 || Day > arrLastDate[Month-1])) 358 { 359 alert("ì못ë ë ì§ ê°ì ì ë ¥íì ¨ìµëë¤.\nì¬ë°ë¥¸ ìì§ ê°ì ì ë ¥íì¸ì."); 360 obj.value=""; 361 obj.focus(); 362 return; 363 } 364 365 return; 366} 367/********************************í¼ê´ë ¨ ë ********************************/ 368 369 370/******************************** ë¡ê·¸ì¸ê´ë ¨ ìì ********************************/ 371/* 372Name : check_chr 373Parameter : ë¡ê·¸ì¸ 구ë¶(0:ê´ë¦¬ì,1:ì ì ) 374Description : ì ë ¥ê° í¼ì²´í¬ 375*/ 376function goLogin(item) 377{ 378 var f = document.frmInfo; 379 if(item == 0){ 380 if(check_chr(f.login_id, "ìì´ë",2) != false) return false; 381 if(check_chr(f.login_pwd, "ë¹ë°ë²í¸",2) != false) return false; 382 f.action = "/mg/login/login_ok.asp"; 383 } 384 else{ 385 if(check_chr(f.u_id, "ìì´ë",2) != false) return false; 386 if(check_chr(f.u_pwd, "ë¹ë°ë²í¸",2) != false) return false; 387 f.action = "/mem/login_ok.asp"; 388 } 389 390 return true; 391} 392 393/* 394Name : goLoginFocus 395Description : íë©´ ì¶ë ¥ì ìì´ëë¡ í¬ì»¤ì¤ 396*/ 397function goLoginFocus() 398{ 399 var f = document.frmInfo; 400 f.login_id.focus(); 401} 402 403/* 404Name : goLoginEnter 405Parameter : event, ë¡ê·¸ì¸êµ¬ë¶(0:ê´ë¦¬ì,1:ì ì ) 406Description : ìí° ì ë ¥ì ë¡ê·¸ì¸ì²ë¦¬ 407*/ 408function goLoginEnter(e, item) 409{ 410 if(!e) var e = window.event; 411 if(e.which) eventObj = e.which; 412 else if(e.keyCode) eventObj = e.keyCode; 413 414 if(eventObj == 13){ 415 goLogin(item); 416 } 417} 418 419/* 420Name : goLoginOut 421Parameter : ë¡ê·¸ìì 구ë¶(0:ê´ë¦¬ì,1:ì ì ) 422Description : ë¡ê·¸ìì 423*/ 424function goLoginOut(item) 425{ 426 if(item == 0){ 427 location.href = "/mg/login/logout.asp"; 428 } 429 else{ 430 location.href = WEB_ROOT+"/mem/log_out.asp"; 431 } 432} 433 434 435/* 436Name : goMemeberModiLink 437Parameter : íì 구ë¶(1:ì¼ë°íì, 2:기ì íì) 438Description : íì구ë¶ì ë°ë¥¸ ì ë³´ìì íì´ì§ ì´ë 439*/ 440function goMemeberModiLink(item) 441{
442 location.href = (item == "1") ? WEB_ROOT+"/mem/mem_form.asp?scrID=0000000064&pageNum=8&subNum=1&ssubNum=1" 443 : "/mem/business_form.asp?scrID=0000000065&pageNum=9&subNum=1&ssubNum=1"; 444} 445 446/* 447Name : goFindIDCheck 448Parameter : 구ë¶(1:ìì´ë찾기, 2:ë¹ë°ë²í¸ì°¾ê¸°) 449Description : ìì´ë/ë¹ë°ë²í¸ì°¾ê¸° ì²´í¬ 450*/ 451function goFindIDCheck(item) 452{ 453 if(item == "1"){ 454 var f = document.actFormID; 455 if(check_chr(f.u_name, "ì´ë¦",1) != false) return false; 456 if(check_chr(f.u_email, "ì´ë©ì¼",5) != false) return false; 457 f.act.value = "findID"; 458 459 } 460 else{ 461 var f = document.actFormPWD; 462 463 if(check_chr(f.u_id, "ìì´ë",2) != false) return false; 464 if(check_chr(f.u_name, "ì´ë¦",1) != false) return false; 465 if(check_chr(f.u_email, "ì´ë©ì¼",5) != false) return false; 466 f.act.value = "findPWD"; 467 468 var result = true; 469 470 $.ajax({ 471 type : "POST", 472 url : "/mem/login_id_pw_chk.asp", 473 async : false, 474 dataType : "json", 475 data:{ 476 "u_id" : f.u_id.value 477 ,"u_name" : f.u_name.value 478 ,"u_email" : f.u_email.value 479 }, 480 error : function(jqXHR, textStatus, errorThrown){ 481 console.log(jqXHR); 482 // alert(jqXHR.responseText +"\n\n"+textStatus+"\n\n"+errorThrown); 483 }, 484 success : function(msg){ 485 if(msg.result == 1) 486 { 487 if(!confirm("íìì ë³´ê° íì¸ëììµëë¤.\n\në¹ë°ë²í¸ë¥¼ ì´ê¸°í ìí¤ìê² ìµëê¹?")) 488 result = false;
489 }else 490 { 491 alert("ì ë ¥íì ë´ì©ê³¼ ì¼ì¹íë íìì ë³´ê° ììµëë¤."); 492 result = false; 493 } 494 } 495 }); 496 497 if(!result) 498 return result; 499 } 500 501 f.action = "login_id_find_ok.asp"; 502} 503/******************************** ë¡ê·¸ì¸ê´ë ¨ ë ********************************/ 504 505/******************************** 기íê´ë ¨ ìì ********************************/ 506/* 507Name : onLoadHeightSize 508Description : ê´ë¦¬ì íë©´ ê°ë¡ì¸ë¡ 리ì¬ì´ì¦(ì¹´í¼ë¼ì´í¸ ë¶ë¶ ë° íë©ë´ ë문ì ì´ì©ì ììì) - ëì ì´ë¼ì?? 509*/ 510function onLoadHeightSize() 511{ 512 var mainContFrameHeight; 513 if(navigator.userAgent.toUpperCase().indexOf('MSIE')>=0) 514 { 515 mainContFrameHeight = document.body.clientHeight; 516 517 mainContFrameHeight = mainContFrameHeight - document.getElementById('mainTopFrame').offsetHeight - document.getElementById('mainBottomFrame').offsetHeight; 518 519 if(mainContFrameHeight < document.getElementById("mainContFrame").offsetHeight){ 520 mainContFrameHeight = document.getElementById("mainContFrame").offsetHeight; 521 } 522 523 if(Number(document.getElementById("mainLeftFrame").offsetWidth + document.getElementById("mainContFrame").offsetWidth) > document.body.clientWidth){ 524 document.getElementById("mainFrame").style.width = document.getElementById("mainLeftFrame").offsetWidth + document.getElementById("mainContFrame").offsetWidth + 30 + "px"; 525 } 526 527 if(Number(document.getElementById("mainTopFrameMenu").offsetWidth) > Number(document.body.clientWidth)){ 528 document.getElementById("mainFrame").style.width = document.getElementById("mainTopFrameMenu").offsetWidth + "px"; 529 } 530 531 if(Number(document.getElementById("mainFrame").offsetWidth) <= Number(document.body.clientWidth)){ 532 document.getElementById("mainFrame").style.width = document.body.clientWidth + "px"; 533 } 534 535 document.getElementById("mainLeftFrame").style.height = mainContFrameHeight + "px"; 536 } 537 else{ 538 mainContFrameHeight = window.innerHeight - document.getElementById('mainBottomFrame').offsetHeight; 539 if(mainContFrameHeight < document.getElementById("mainContFrame").offsetHeight){ 540 mainContFrameHeight = document.getElementById("mainContFrame").offsetHeight; 541 } 542 543 if(Number(document.getElementById("mainLeftFrame").offsetWidth + document.getElementById("mainContFrame").offsetWidth) > window.innerWidth){ 544 document.getElementById("mainFrame").style.width = document.getElementById("mainLeftFrame").offsetWidth + document.getElementById("mainContFrame").offsetWidth + 30 + "px"; 545 } 546 547 if(Number(document.getElementById("mainTopFrameMenu").offsetWidth) > Number(window.innerWidth)){ 548 document.getElementById("mainFrame").style.width = document.getElementById("mainTopFrameMenu").offsetWidth + "px"; 549 } 550 551 if(Number(document.getElementById("mainFrame").offsetWidth) < Number(window.innerWidth)){ 552 document.getElementById("mainFrame").style.width = window.innerWidth-20 + "px"; 553 } 554 555 document.getElementById("mainLeftFrame").style.height = mainContFrameHeight-55 + "px"; 556 } 557} 558 559/* 560Name : getTopPosType 561Parameter : í´ë¹ ê°ì²´ 562Description : ì¸ë¡ìì¹ êµ¬í기 563*/ 564function getTopPosType(inputObj) 565{ 566 567 var returnValue = inputObj.offsetTop + inputObj.offsetHeight; 568 while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetTop; 569 return returnValue + 0; 570} 571 572/* 573Name : getLeftPosType 574Parameter : í´ë¹ ê°ì²´ 575Description : ê°ë¡ìì¹ êµ¬í기 576*/ 577function getLeftPosType(inputObj) 578{ 579 var returnValue = inputObj.offsetLeft; 580 while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft; 581 return returnValue + 0; 582} 583 584/* 585Name : goImageChange 586Parameter : í´ë¹ ê°ì²´, ë³´ì¬ì¤DIV ID 587Description : 첨ë¶íì¼ ì´ë¯¸ì§ 미리보기 588*/ 589function goImageChange(thisObj, preViewer) 590{ 591 if(!/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i.test(thisObj.value)) { 592 // ì´ë¯¸ì§íìì´ ìë íì¼ì¼ ê²½ì° í¼ ì´ê¸°í 593// $(thisObj).clone().insertBefore(thisObj); 594// $(thisObj).remove(); 595 596 alert("ì´ë¯¸ì§ íìì íì¼ì ì ííììì¤"); 597 return; 598 } 599 600 if($("[name=nameTmpFileUpload]").length<1) 601 { 602 var tmpHtml = "<iframe width='300' height='100' frameborder='1' style='display:none; z-index:100;' src='' name='nameTmpFileUpload'></iframe>"; 603 $(document.body).append(tmpHtml); 604 } 605 if($("[name=nameTmpFileIndex]").length<1) 606 { 607 var tmpHtml = "<input type='hidden' name='nameTmpFileIndex'>"; 608 $("[name=frmInfo]").append(tmpHtml); 609 } 610 if($("[name=namePreviewId]").length<1) 611 { 612 var tmpHtml = "<input type='hidden' name='namePreviewId'>"; 613 $("[name=frmInfo]").append(tmpHtml); 614 } 615 616 617 var $objIframe = $("[name=nameTmpFileUpload]"); 618 619 var obj = document.frmInfo; 620 var prevAction = obj.action; 621 var prevTarget = obj.target; 622 var prevEncoding= obj.encoding; 623 var index = $("[name=file_img]").index($(thisObj)); 624 $("[name=nameTmpFileIndex]").val(index+1); 625 $("[name=namePreviewId]").val(preViewer); 626 627 obj.action = "/include/prevImageUpload.asp"; 628 obj.target = "nameTmpFileUpload"; 629 obj.encoding = "multipart/form-data"; 630 obj.submit(); 631 632 obj.action = prevAction; 633 obj.target = prevTarget; 634 obj.encoding = prevEncoding; 635 636} 637 638/* 639Name : goPhotoView 640Parameter : ë³´ì¬ì¤DIV ID, íì¼ê²½ë¡(ì ë주ì) 641Description : ì ë¡ëë ì´ë¯¸ì§ 보기 642*/ 643function goPhotoView(item01, item02) 644{ 645 var ua = window.navigator.userAgent; 646 647// if (ua.indexOf("MSIE") > -1) { 648// document.getElementById(item01).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + item02 + "', sizingMethod='scale')"; 649// } 650// else{ 651 var tmpImage = new Image(); 652 tmpImage.src = item02; 653 var tmpPreview = document.getElementById(item01); 654 var tmpPreviewWidth = tmpPreview.offsetWidth; 655 var tmpPreviewHeight = tmpPreview.offsetHeight; 656 657 tmpPreview.innerHTML = "<img src='" + item02 + "' width='" + tmpPreviewWidth + "' height='" + tmpPreviewHeight + "' alt='ììì´ë¯¸ì§' title='ìì ì´ë¯¸ì§' />"; 658// } 659 //document.getElementById(item01).style.backgroundImage = "url(" + item02 + ")"; 660} 661/******************************** 기íê´ë ¨ ìì ********************************/ 662 663/******************************** ê²ìí ê´ë ¨ ìì *****************************/ 664 665 666/* 667Name : goAllCheckDis 668Description : ê²ìí ì ì²´ì í ë° ì ì²´ì·¨ì ì´ë¯¸ì§ êµì²´ 669*/ 670function goAllCheckDis() 671{ 672 var f = document.frmInfo; 673 if(typeof(f.bd_all.length) == "undefined"){ 674 document.getElementById("allOk").style.display = (f.bd_all.checked == true) ? "none" : "block"; 675 document.getElementById("allCancel").style.display = (f.bd_all.checked == true) ? "block" : "none"; 676 } 677 else{ 678 var allCnt = 0 679 for(i = 0; i < f.bd_all.length; i++){ 680 if(f.bd_all[i].checked == true){ 681 allCnt++; 682 } 683 } 684 685 document.getElementById("allOk").style.display = (allCnt == f.bd_all.length) ? "none" : "block"; 686 document.getElementById("allCancel").style.display = (allCnt == f.bd_all.length) ? "block" : "none"; 687 } 688} 689 690/* 691Name : goSearchDis 692Parameter : ê²ìí목 ë°°ì´ ì¸ë±ì¤ê° 693Description : ê²ìê´ë ¨ í¼ë³ê²½(ì¼ì ê²ì) 694*/ 695function goSearchDis(item) 696{ 697 document.getElementById("s_string_dis").style.display = (item != "3") ? "block" : "none"; 698 document.getElementById("s_date_dis").style.display = (item == "3") ? "block" : "none"; 699} 700 701/* 702Name : goSearchReset 703Parameter : ì´ê¸°í íìí Parameter ê° 704Description : í´ë¹ íì´ì§ ì´ê¸°í íì´ì§ë¡ ì´ë 705*/ 706function goSearchReset( ) 707{ 708 var searchLinkURL = ""; 709 if(arguments.length == 1){ 710 searchLinkURL = dev_list_name + "?scrID=" + arguments[0]; 711 } 712 else{ 713 searchLinkURL = dev_list_name + "?scrID=" + arguments[0]; 714 for (i = 1; i < arguments.length; i++ ) 715 { 716 if(i == 1 && arguments[i] != ""){ 717 searchLinkURL += "&pageNum=" + arguments[i]; 718 } 719 else if(i == 2 && arguments[i] != ""){ 720 searchLinkURL += "&subNum=" + arguments[i]; 721 } 722 else if(i == 3 && arguments[i] != ""){ 723 searchLinkURL += "&ssubNum=" + arguments[i]; 724 } 725 else if(i == 4 && arguments[i] != ""){ 726 searchLinkURL += "&sssubNum=" + arguments[i]; 727 } 728 } 729 } 730 731 location.href = WEB_ROOT+searchLinkURL; 732} 733 734/* 735Name : goForm 736Parameter : ì¸ë±ì¤ê°, ì¸ë±ì¤ íëëª 737Description : í´ë¹ íì´ì§ ì´ê¸°í íì´ì§ë¡ ì´ë 738*/ 739function goForm(item01, item02) 740{ 741 var f = document.frmInfo; 742 var idxObj = eval("document.frmInfo." + item02); 743 idxObj.value = item01; 744// f.act.value = (item01 == "") ? "form" : "edit"; 745 f.target = "_self"; 746 f.action = dev_form_name; 747 f.submit(); 748} 749 750/* 751Name : goList 752Description : 리ì¤í¸ íì´ì§ë¡ ì´ë 753*/ 754function goList() 755{ 756 var f = document.frmInfo; 757// f.act.value = "list"; 758 f.target = "_self"; 759 f.action = dev_list_name; 760 f.submit(); 761} 762 763/* 764Name : goDetail 765Parameter : ì¸ë±ì¤ê°, ì¸ë±ì¤ íëëª 766Description : í´ë¹ View íë©´ì¼ë¡ ì´ë 767*/ 768function goDetail(item01, item02) 769{ 770 var f = document.frmInfo; 771 var idxObj = eval("document.frmInfo." + item02); 772 idxObj.value = item01; 773// f.act.value = "view"; 774 f.target = "_self"; 775 f.action = dev_detail_name; 776 f.submit(); 777} 778 779/* 780Name : goReply 781Description : ëµê¸ í¼ì¼ë¡ ì´ë 782*/ 783function goReply() 784{ 785 var f = document.frmInfo; 786 f.bd_level.value = Number(f.bd_level.value) + 1; 787// f.act.value = "form"; 788 f.targe = "_self"; 789 f.action = dev_form_name; 790 f.submit(); 791} 792 793/* 794Name : goSearch 795Description : 리ì¤í¸ ê²ìí기 796*/ 797function goSearch() 798{ 799 var f = document.frmInfo; 800 f.currentPage.value = "1"; 801// f.act.value = "list"; 802 f.target = "_self"; 803 f.action = dev_list_name; 804 f.submit(); 805} 806 807/* 808Name : goPage 809Parameter : íì´ì§ëë² 810Description : í´ë¹ Pageë¡ê°ê¸° 811*/ 812function goPage(item) 813{ 814 var f = document.frmInfo; 815 f.currentPage.value = item; 816// f.act.value = "list"; 817 f.target = "_self"; 818 f.action = dev_list_name; 819 f.submit(); 820} 821 822/* 823Name : goCommentPage 824Parameter : íì´ì§ëë² 825Description : í´ë¹ Page ëê¸ ëª©ë¡ì¼ë¡ê°ê¸° 826*/ 827function goCommentPage(item) 828{ 829 var f = document.frmInfo; 830 f.page2.value = item; 831// f.act.value = "view"; 832 f.target = "_self"; 833 f.action = dev_detail_name; 834 f.submit(); 835} 836 837/* 838Name : goAllDelete 839Description : 리ì¤í¸ íë©´ìì ì²´í¬ë í목 ìì 840*/ 841function goAllDelete(item) 842{ 843 var f = document.frmInfo; 844 var cnt = 0; 845 if(typeof(f.bd_all.length) == "undefined"){ 846 if(f.bd_all.checked){ 847 cnt++; 848 } 849 } 850 else{ 851 for(i = 0; i < f.bd_all.length; i++){ 852 if(f.bd_all[i].checked){ 853 cnt++; 854 } 855 } 856 } 857 858 if(cnt == 0){ 859 alert("ì²´í¬ë íëª©ì´ ììµëë¤."); 860 return; 861 } 862 863 if(confirm("ì²´í¬í í목ì ìì íìê² ìµëê¹?")){ 864// f.act.value = "alldel"; 865 if(location.href.indexOf("/mem_list.asp") < 0) 866 f.encoding = "multipart/form-data"; 867 f.target = "_self"; 868 f.action = dev_proc_name; 869 f.submit(); 870 } 871} 872 873/* 874Name : goInsert 875Parameter : ë±ë¡,ìì ì¬ë¶(add, modi) 876Description : ê²ìí ë±ë¡,ìì ì²´í¬ 877*/ 878function goInsert(item) 879{ 880 var f = document.frmInfo; 881 882 if(!checkFileSize(f.file_name)) return ; 883 884// var oEditor = null; 885 if(check_chr(f.bd_title, "ì 목",1) != false) return; 886 if(document.getElementsByName("bd_name").length>0) 887 if(check_chr(f.bd_name, "ìì±ì",1) != false) return; 888 889/* 890 if(oEditor != null) 891 { 892 if (oEditor.GetXHTML(true).replace(/ /g,"") == '') { 893 alert('ë´ì©ì ì ë ¥íì¸ì'); 894 oEditor.Focus(); 895 return; 896 } 897 } 898*/ 899 900// f.act.value = item; 901 f.encoding = "multipart/form-data"; 902 f.targe = "_self"; 903 f.action = dev_proc_name; 904 f.submit(); 905} 906 907function goInsertReq(item) 908{ 909 var f = document.frmInfo; 910 var oEditor = null; 911 //if(document.getElementsByName("bd_content01").length>0) 912 //oEditor = FCKeditorAPI.GetInstance('bd_content01'); 913 if(check_chr(f.bd_title, "ì 목",1) != false) return; 914 if(document.getElementsByName("bd_name").length>0) 915 if(check_chr(f.bd_name, "ìì±ì",1) != false) return; 916 917 //if(check_chr(f.bd_pass, "ë¹ë°ë²í¸",1) != false) return; 918 /* 919 if(oEditor != null){ 920 if (oEditor.GetXHTML(true).replace(/ /g,"") == '') { 921 alert('ë´ì©ì ì ë ¥íì¸ì'); 922 oEditor.Focus(); 923 return; 924 } 925 } 926 */ 927 928 if(f.bd_name.value.length == 0){ 929 alert("ìì±ì를 ì ë ¥í´ì£¼ììì¤."); 930 return false;
931 } 932/* 933 if(f.bd_email.value.length == 0){ 934 alert("ì´ë©ì¼ì ì ë ¥í´ì£¼ììì¤."); 935 return false; 936 } 937*/ 938 if(f.bd_pass.value.length == 0){ 939 alert("ë¹ë°ë²í¸ë¥¼ ì ë ¥í´ì£¼ììì¤."); 940 return false; 941 } 942 943// f.act.value = item; 944 f.encoding = "multipart/form-data"; 945 f.targe = "_self"; 946 f.action = dev_proc_name; 947 //f.submit(); 948 try 949 { 950 Editor.save(); 951 } 952 catch (e) 953 { 954 f.submit(); 955 } 956 957 958} 959 960/* 961Name : goDelete 962Description : ìë£ ìì í기 963*/ 964function goDelete() 965{ 966 var f = document.frmInfo; 967 if(confirm("í´ë¹ ìë£ì ìì íìê² ìµëê¹?")){ 968// f.act.value = "del"; 969// f.encoding = "multipart/form-data"; 970 f.targe = "_self"; 971 f.action = dev_proc_name; 972 f.submit(); 973 } 974} 975 976/* 977Name : goSubFileDel 978Parameter : ìì í íì¼ëª 979Description : 첨ë¶íì¼ ìì í기 980*/ 981function goSubFileDel(item) 982{ 983 var f = document.frmInfo; 984 if(confirm("í´ë¹ íì¼ì ìì íìê² ìµëê¹?")){ 985 f.file_del.value = item; 986// f.act.value = "filedel"; 987 f.encoding = "multipart/form-data"; 988 f.targe = "_self"; 989 f.action = dev_proc_name; 990 f.submit(); 991 } 992} 993 994/* 995Name : mg_flashWrite 996Parameter : ID, íëì 주ì, ê°ë¡, ì¸ë¡, wmode 997Description : íëì ì¶ë ¥ 998*/ 999function mg_flashWrite( id, flashUri, vWidth, vHeight, winMode ) { 1000 var _obj_ = ""; 1001 1002 _obj_ = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + vWidth + '" height="' + vHeight + '" id="' + id + '" align="middle">'; 1003 _obj_ += '<param name="movie" value="' + flashUri + '" />'; 1004 _obj_ += '<param name="quality" value="high" />'; 1005 _obj_ += '<param name="wmode" value="' + winMode + '" /> '; 1006 _obj_ += '<param name="bgcolor" value="#ffffff" /> '; 1007 _obj_ += '<embed src="' + flashUri + '" quality="high" wmode="' + winMode + '" bgcolor="#ffffff" width="' + vWidth +'" height="' + vHeight + '" id="' + id + '" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed> '; 1008 _obj_ += '</object>'; 1009 document.writeln( _obj_ ); 1010} 1011 1012/* 1013Name : popupView 1014Parameter : íì ëª (íì´íìë), íì ì¸ë±ì¤, ê°ë¡, ì¸ë¡ 1015Description : ê´ë¦¬ìíì ê´ë¦¬ì 미리보기íì 1016*/ 1017function popupView(item01, item02, item03, item04) 1018{ 1019 win = window.open("/include/popup_view.asp?popup_num=" + item02+"&wid="+item03+"&hei="+item04,item01,"width=" + (item03+1) + ",height=" + (item04+1) + ",top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no"); 1020 win.focus(); 1021} 1022 1023/* 1024Name : fnPhotoDetail 1025Parameter : ì´ë¯¸ì§ì£¼ì, ì´ë¯¸ì§ì¤ëª 1026Description : í¬í ê°¤ë¬ë¦¬ ìì¸ë³´ê¸°ìì í°ì´ë¯¸ì§ 보기 1027*/ 1028function fnPhotoDetail(item01, item02) 1029{ 1030 document.getElementById("photoDetailBox").src = item01; 1031 document.getElementById("dev_photo_detail_box_txt").innerHTML = item02; 1032} 1033 1034/* 1035Name : fnPhotoDeatilOriginally 1036Parameter : ì´ë¯¸ì§ì£¼ì, íì ì¬ë¶(0:ë ì´ì´,1:íì ) 1037Description : í¬í ê°¤ë¬ë¦¬ ìì¸ë³´ê¸°ìì ì본ì´ë¯¸ì§ 보기 1038*/ 1039function fnPhotoDeatilOriginally(item01, item02) 1040{ 1041 var imgWidth, imgHeight, tmpImg; 1042 tmpImg = new Image(); 1043 tmpImg.src = item01.src; 1044 imgWidth = tmpImg.width; 1045 imgHeight = tmpImg.height; 1046 1047 if(item02 == "0"){ 1048// document.getElementById("dev_imgOriCont").style.top = "100px"; 1049// document.getElementById("dev_imgOriCont").style.left = "100px"; 1050 document.getElementById("dev_imgOriCont").style.display = "block"; 1051 document.getElementById("dev_imgOriCont").style.width = Number(tmpImg.width) + "px"; 1052 document.getElementById("dev_imgOriContSrc").src = item01.src; 1053 1054 setCenter($("#dev_imgOriCont")); 1055 } 1056 else{ 1057 win = window.open(item01, "PhotoOriginally", "width=" + imgWidth + ",height=" + imgHeight + ",top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no"); 1058 win.focus(); 1059 } 1060} 1061 1062/* 1063Name : fnPhotoDeatilOriginallyClose 1064Parameter : 1065Description : í¬í ê°¤ë¬ë¦¬ ìì¸ë³´ê¸°ìì ì본ì´ë¯¸ì§ 보기 1066*/ 1067function fnPhotoDeatilOriginallyClose(item) 1068{ 1069 document.getElementById("dev_imgOriCont").style.display = "none"; 1070} 1071 1072/* 1073Name : fnPhotoDeatilOriginallyClose 1074Parameter : idê°, ê²ìí ì¸ë±ì¤ê°, ë´ì© ê¸ìì ì í 1075Description : 컨í ì¸ í ì¤í¸ ì¶ì¶ 1076*/ 1077function fnContentText(item01, item02, item03) 1078{ 1079 if (navigator.userAgent.indexOf("Firefox")>-1){ 1080 var tmpStr = document.getElementById("cont" + item01).textContent; 1081 } 1082 else{ 1083 var tmpStr = document.getElementById("cont" + item01).innerText; 1084 } 1085 1086 if(tmpStr.length > item03){ 1087 tmpStr = tmpStr.substring(0,item03) + "..."; 1088 } 1089 document.getElementById("cont" + item01).innerHTML = "<a href=javascript:goDetail('" + item02 + "','bd_num');>" + tmpStr + "</a>"; 1090} 1091
1092/******************************** ê²ìí ê´ë ¨ ë *******************************/ 1093 1094/******************************** íì ê´ë ¨ ìì *******************************/ 1095 1096//Email ì§ì ì ë ¥? 1097function goEmailValue(item01, item02) 1098{ 1099 var f_eval = document.getElementsByName(item02)[0]; 1100 if(item01=="") 1101 { 1102 f_eval.value = ""; 1103 f_eval.readOnly = false; 1104 f_eval.focus(); 1105 }else 1106 { 1107 f_eval.value = item01; 1108 f_eval.readOnly = true; 1109 } 1110} 1111 1112//ì ë ¥ Reset 1113function goFormRest() 1114{ 1115 document.frmInfo.reset(); 1116} 1117 1118 1119function goDown(type, org, save) 1120{ 1121 location.href = "/download?type="+type+"&org="+org+"&save="+save; 1122} 1123 1124function goDownEtc(item01, item02) 1125{ 1126 item01 = item01.replace(/&/g,"â ") 1127 item02 = item02.replace(/&/g,"â ") 1128 location.href=WEB_ROOT+"/include/download_etcpath.asp?file_name=" + item01 + "&file_full_name=" + item02; 1129} 1130 1131function goLink(item) 1132{ 1133 if(item == ""){ 1134 alert("ì¤ì ë ë§í¬ê° ììµëë¤."); 1135 } 1136 else{ 1137 if (location.href.indexOf("/board/") > 0) 1138 { 1139 location.href = (location.href.indexOf("/mg/") > 0) ? "/mg/" + item : WEB_ROOT+item; 1140 } 1141 else{ 1142 location.href = item; 1143 } 1144 } 1145} 1146 1147//컨ì¤í ê°ë¥ë¶ì¼ ì í íì ì°½ ëì 1148//conList : ì´ë¯¸ ì íë ë¶ì¼ì½ë 1149function popConsultList(conList) 1150{ 1151 window.popConsult = window.open("/include/popConsultList.asp?conList="+conList, "ConsultList", "width=800px, height=500px"); 1152} 1153 1154/******************************** íì ê´ë ¨ ë *********************************/ 1155 1156 1157function dev_dayList_searchCheck(objStartName, objEndName, item01, item02){ 1158 document.getElementsByName(objStartName)[0].value = item01; 1159 document.getElementsByName(objEndName)[0].value = item02; 1160} 1161 1162//ì²´í¬ë°ì¤ ì ì²´ ì í/í´ì 1163var chkStatus = true; 1164function chkAll(objName, bCheck) 1165{ 1166 if(typeof(bCheck)!="undefined") 1167 $(":checkbox[name="+objName+"]").prop("checked", bCheck); 1168 else 1169 { 1170 $(":checkbox[name="+objName+"]").prop("checked", chkStatus); 1171 chkStatus = !chkStatus; 1172 } 1173} 1174 1175var dir = -1; 1176var gap = 10; 1177function chDir(n) 1178{ 1179 dir = n; 1180} 1181 1182function slideBanner() 1183{ 1184 var $obj1 = $(".banner_ul").eq(0); 1185 var $obj2 = $(".banner_ul").eq(1); 1186 var $obj3 = $(".banner_ul").eq(2); 1187 1188 $obj1.css({"width" : $obj1.width(), "left" : parseInt($obj1.css("left")) + dir}); 1189 $obj2.css("width", $obj2.width()); //"left", parseInt($obj2.css("left")) + dir); 1190 $obj3.css("width", $obj3.width()); //"left", parseInt($obj3.css("left")) + dir); 1191 1192 if(dir<0) 1193 { 1194 if(parseInt($obj2.css("left")) < 1) 1195 $obj1.css("left", 0); 1196 }else 1197 { 1198 if(parseInt($obj1.css("left")) > -1) 1199 $obj1.css("left", parseInt($obj1.width()) * (-1)); 1200 } 1201 1202 $obj2.css("left", parseInt($obj1.css("left"))+$obj1.width()); 1203 $obj3.css("left", parseInt($obj1.css("left"))+$obj1.width()+$obj2.width()); 1204 1205 setTimeout("slideBanner()", gap); 1206} 1207 1208// objê°ì²´ë¥¼ íë©´ ì ì¤ìì ìì¹ 1209function setCenter(obj) 1210{ 1211 var top = ($(window).height()/2)-($(obj).height()/2)-10; 1212 var left = ($(window).width()/2)-($(obj).width()/2); 1213 1214 var adjTop = $(document).scrollTop(); 1215 var adjLeft = $(document).scrollLeft(); 1216 1217 top += adjTop; 1218 left += adjLeft; 1219 1220 if(top<0) 1221 top = 0; 1222 if(left<0) 1223 left = 0; 1224 $(obj).css({"top":top+10, "left":left}); 1225} 1226 1227 1228var g_chkPasswordIdx; 1229var g_chkPasswordAct; 1230function viewPasswordForm(idx, act) 1231{ 1232 $(".pass_pop").show().animate({ 1233 "margin-top" : (parseInt(document.body.clientHeight)/2)-125 1234 }, 500, function(){ 1235 $("[name=pwdObj]").focus(); 1236 }); 1237 1238 $('.gray_bg').fadeTo("slow",0.8).css({ 1239 "width" : $("body").width()+20, 1240 "height" : $("body").height() 1241 }); 1242 1243 g_chkPasswordIdx = idx; 1244 g_chkPasswordAct = act; 1245} 1246 1247function hidePasswordForm() 1248{ 1249 $(".pass_pop").animate({"margin-top" : "-250px"}, 500); 1250 $('.gray_bg').animate({"opacity": 0}, "slow", function(){ 1251 $(this).hide(); 1252 }); 1253} 1254 1255function chkPassword() 1256{ 1257 if($.trim($("[name=pwdObj]").val())=="") 1258 { 1259 alert("ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì."); 1260 }else 1261 { 1262 $.post("/include/chkPassword.asp", { 1263 "idx" : g_chkPasswordIdx, 1264 "pass" : $("[name=pwdObj]").val() 1265 }, function(data) 1266 { 1267 if(data+"" == "1") 1268 { 1269 if(g_chkPasswordAct == "view") 1270 goDetail(g_chkPasswordIdx, "bd_num"); 1271 else if(g_chkPasswordAct == "modi")
1272 goForm(g_chkPasswordIdx, "bd_num"); 1273 else 1274 goDelete(); 1275 }else 1276 alert("ë¹ë°ë²í¸ê° íë ¸ìµëë¤."); 1277 }); 1278 } 1279} 1280 1281//íìì ê´ë ¨ë³ìë¤ ë³ê²½ëì§ ìëê° 1282var dev_list_name = "board_list.asp"; 1283var dev_detail_name = "board_detail.asp"; 1284var dev_form_name = "board_form.asp"; 1285var dev_proc_name = "board_proc.asp"; 1286var dev_excel_name = "board_excel.asp"; 1287var dev_pop_name = "board_pop.asp"; 1288 1289//ì´ë¯¸ì§ 리ì¬ì´í¸í¨ì 1290function imgResize(img){ 1291 img1= new Image(); 1292 img1.src=(img); 1293 imgControll(img); 1294} 1295 1296//ì´ë¯¸ì§ 컨í¸ë¡¤ í¨ì 1297function imgControll(img){ 1298 if((img1.width!=0)&&(img1.height!=0)){ 1299 viewImage(img); 1300 } 1301 else{ 1302 controller="imgControll('"+img+"')"; 1303 intervalID=setTimeout(controller,20); 1304 } 1305} 1306 1307//ì´ë¯¸ì§ 보기 í¨ì 1308function viewImage(img){ 1309 W=img1.width; 1310 H=img1.height; 1311 if (W>800){ 1312 H *= (800/W); 1313 W = 800; 1314 } 1315 if (H>800){ 1316 W *= (800/H); 1317 H = 800; 1318 } 1319 O="left=100,top=150, width="+W+",height="+H; 1320 imgWin=window.open("","",O); 1321 imgWin.document.write("<html><head><title>ì´ë¯¸ì§ íë보기</title></head>"); 1322 imgWin.document.write("<body topmargin=0 leftmargin=0>"); 1323 imgWin.document.write("<img src="+img+" width="+W+" height="+H+" onclick='self.close()'>"); 1324 imgWin.document.close(); 1325} 1326 1327function addDbg() 1328{ 1329 $(document.body).html("<div id='dbg' style='position:absolute; left:0px; top:0px; width:100px; height:30px; border:1px solid #000000;'></div>"+$(document.body).html()); 1330} 1331 1332$(document).ready(function(){ 1333 $("caption").hide(); 1334}); 1335 1336/* $obj를 ììëë¡ fadeIn ìì¼ì¤ */ 1337function fadeObject($obj) 1338{ 1339 var cntVisible = 0; //$obj.find(":visible").length; 1340 1341 $obj.each(function(){ 1342 if($(this).is(":visible")) 1343 cntVisible++; 1344 }); 1345 1346 if(cntVisible < $obj.length) 1347 { 1348 $obj.eq(cntVisible).fadeIn(1000, function(){ fadeObject($obj); }); 1349 } 1350 1351} 1352 1353/* $obj를 initLeft, initTop ìì¹ë¡ ì¤ì í termë°ë¦¬ì´ í destLeft, destTop ìì¹ë¡ speed ìëë¡ animateìí´*/ 1354/* animate í func ì¤í */ 1355function moveImg($obj, initLeft, initTop, term, destLeft, destTop, speed, func) 1356{ 1357 $obj.css({"left" : initLeft, "top" : initTop, "display" : "block"}); 1358 1359 setTimeout(function(){ 1360 $obj.animate({"left" : destLeft, "top" : destTop}, speed, function(){ 1361 func; 1362 }); 1363 }, term); 1364 1365} 1366 1367 1368function adjWidth($obj) 1369{ 1370 var result = 0; 1371 if(!isNaN(parseInt($obj.css("margin-left")))) 1372 result += parseInt($obj.css("margin-left")); 1373 if(!isNaN(parseInt($obj.css("margin-right")))) 1374 result += parseInt($obj.css("margin-right")); 1375 if(!isNaN(parseInt($obj.css("padding-left")))) 1376 result += parseInt($obj.css("padding-left")); 1377 if(!isNaN(parseInt($obj.css("padding-right")))) 1378 result += parseInt($obj.css("padding-right")); 1379 return result; 1380} 1381 1382/********************* 1383idOut : ê°ì¥ ë°ê¹¥ìª½ ë ì´ì´ ID (string) 1384viewWidth : ë³´ì´ë ìì ê°ë¡ ì¬ì´ì¦ (number) 1385viewHeight : ë³´ì´ë ìì ì¸ë¡ ì¬ì´ì¦ (number) 1386speed : ì´ë ìë (number : ms) 1387bAuto : ìë ë¡¤ë§ ì¬ë¶ (bool) 1388term : ë©ì¶°ìë ìê° (number : ms) 1389dir : ë°©í¥(1, -1) 1390countPerPage: íì´ì§ë¹ ë³´ì¬ì§ ê°¯ì (number) 1391moveUnit : íë²ì ì´ëí ê°¯ì (number) 1392func : ì¬ë¼ì´ë©ì´ ì¢ ë£ë í í¸ì¶ë í¨ì 1393********************/ 1394function SlidingObject(idOut, viewWidth, viewHeight, speed, bAuto, term, dir, countPerPage, moveUnit, func) 1395{ 1396 var $objOut = $("#"+idOut); 1397 var $obj = $("#"+idOut+">div:eq(0)"); 1398 var $objSub = $("#"+idOut+">div:eq(0)>div"); 1399 var width = 0; 1400 var gTick; 1401 var curPosition = 0; 1402 var pageWidth = 0; 1403 var count = 0; 1404 var direction; 1405 var moveCount = 0; 1406 var pageCount = 0; 1407 1408 if(isNaN(parseInt(dir))) 1409 direction = 1; 1410 else 1411 direction = dir; 1412 1413 $objSub.each(function(){ 1414 count++; 1415 width += viewWidth; 1416 width += adjWidth($(this)); 1417 if(pageWidth==0) 1418 pageWidth = width; 1419 }); 1420 1421 1422 if(isNaN(parseInt(countPerPage))) 1423 countPerPage = 1; 1424 1425 if( (count % countPerPage) > 0) 1426 pageCount = parseInt(count / countPerPage)+1; 1427 else 1428 pageCount = parseInt(count / countPerPage); 1429 1430 if(isNaN(parseInt(moveUnit)) && moveUnit == "P") 1431 moveUnit = countPerPage; 1432 else if(isNaN(parseInt(moveUnit)) && moveUnit != "P") 1433 moveUnit = 1; 1434 1435 $objOut.css({ 1436 "width" : viewWidth*countPerPage, 1437 "height" : viewHeight, 1438 "overflow" : "hidden", 1439 "position" : "relative" 1440 }); 1441 1442 $objSub.css({ 1443 "float" : "left", 1444 "width" : viewWidth, 1445 "height": viewHeight 1446 }); 1447 1448 $obj.css({ 1449 "width" : width, 1450 "height" : viewHeight, 1451 "overflow-x": "hidden", 1452 "position" : "relative" 1453 }); 1454 1455 var gObj = this; 1456 this.moveSliding = function() 1457 { 1458 if(gTick) 1459 clearTimeout(gTick); 1460 $obj.stop(); 1461 1462 if(curPosition>count-1) 1463 curPosition = 0; 1464 else if(curPosition<0) 1465 curPosition = count-1; 1466 1467 if(direction>0) 1468 { 1469 1470 $obj.animate({"left" : pageWidth*curPosition * (-1)}, speed, function(){ 1471 if(typeof(func) == "function") 1472 func(); 1473 if(bAuto) 1474 { 1475// curPosition += moveUnit; 1476 gTick = setTimeout(function(){gObj.move1Step(1);}, term); 1477 } 1478 }); 1479 }else 1480 { 1481 $obj.animate({"left" : pageWidth*curPosition}, speed, function(){ 1482 if(typeof(func) == "function") 1483 func(); 1484 if(bAuto) 1485 { 1486// curPosition -= moveUnit; 1487 gTick = setTimeout(function(){gObj.move1Step(-1);}, term); 1488 } 1489 }); 1490 } 1491 } 1492 1493 this.move1Step = function(n) 1494 { 1495 if(curPosition+n>count-1) 1496 curPosition = 0; 1497 else if(curPosition+n<0) 1498 curPosition = count-1; 1499 else 1500 curPosition += n; 1501 1502 gObj.moveSliding(); 1503 } 1504 1505 this.moveDirect = function(n) 1506 { 1507 curPosition = n; 1508 gObj.moveSliding(); 1509 } 1510 1511 this.slidingPause = function() 1512 { 1513 clearTimeout(gTick); 1514 } 1515 1516 this.slidingResume = function() 1517 { 1518 clearTimeout(gTick); 1519 gTick = setTimeout(function(){gObj.move1Step(direction);}, term); 1520 } 1521 1522 if(bAuto) 1523 gTick = setTimeout(function(){gObj.move1Step(1);}, term); 1524 1525 1526 this.getCurPosition = function() 1527 { 1528 return curPosition; 1529 } 1530 1531 this.setCurPosition = function(cPosition) 1532 { 1533 curPosition = cPosition; 1534 } 1535} 1536 1537
1538//ì´ë¯¸ì§ë¥¼ ì본 ì´ë¯¸ì§ ë¹ì¨ì ë§ê² ì¶ì 1539//imgObj : ì´ë¯¸ì§ ê²½ë¡ 1540//widLimit, heiLimit : ê°ë¡, ì¸ë¡ ì¬ì´ì¦ ìíê° 1541function fitImageSize(imgObj, widLimit, heiLimit, destObj) 1542{ 1543 1544 if(typeof(imgObj)=="undefined" || imgObj==null || $(imgObj).attr("src")=="") 1545 return ; 1546 1547 if($("#tempImageObject").length<1) 1548 $(document.body).append("<img id='tempImageObject' style='display:none;' />"); 1549 $("#tempImageObject").attr("src", $(imgObj).attr("src")); 1550 1551 1552 var wid = parseInt($("#tempImageObject").css("width")); 1553 var hei = parseInt($("#tempImageObject").css("height")); 1554 var ratio = 1.0; 1555 1556 if(wid > widLimit) 1557 ratio = widLimit / wid; 1558 1559 if(hei > heiLimit && ratio > (heiLimit / hei)) 1560 ratio = heiLimit / hei; 1561 1562 wid *= ratio; 1563 hei *= ratio; 1564 1565 if(destObj==null || typeof(destObj)=="undefined") 1566 { 1567 $(imgObj) 1568 .css({"width" : wid, "height" : hei}) 1569 .show(); 1570 }else 1571 { 1572 $(destObj) 1573 .css({"width" : wid, "height" : hei}) 1574 .show(); 1575 } 1576} 1577 1578var oEditors = new Array(); 1579 1580function setEditorJs(val, objId, w, h) 1581{ 1582 document.write("<textarea name='"+objId+"' style='height:"+h+";width:"+w+";'>"+val+"</textarea>"); 1583 setEditor(objId, w, h); 1584} 1585 1586function setEditor(objId, w, h) 1587{ 1588 var $obj; 1589 1590 if(objId.indexOf("#")>-1 || objId.indexOf("[")>-1) 1591 $obj = $(objId); 1592 else 1593 { 1594 if($("#"+objId).length>0) 1595 $obj = $("#"+objId); 1596 else if($("[name="+objId+"]").length>0) 1597 $obj = $("[name="+objId+"]"); 1598 } 1599 1600 if(typeof(w)=="undefined" || w=="") 1601 { 1602 if(typeof($obj.css("width"))=="undefined" || $obj.css("width")=="") 1603 w = "100%"; 1604 } 1605 if(typeof(h)=="undefined" || h=="") 1606 { 1607 if(typeof($obj.css("height"))=="undefined" || $obj.css("height")=="") 1608 h = 300; 1609 } 1610 h = Number(h); 1611 1612 $obj.froalaEditor({ 1613 key: 'yB5E5E4H3jC10D7A5A5B2A3F3E2A2A5B-16MFIZJNKLDXIREJI==', 1614 language: 'ko', 1615 width: w, 1616// height: h, 1617 heightMin: h, 1618 heightMax: 1000, 1619 dragInline: false, 1620 1621 fontFamily: { 1622 'NanumGothic': 'ëëê³ ë', 1623 'NanumBarunGothic': 'ëëë°ë¥¸ê³ ë', 1624 'NanumSquare': 'ëëì¤íì´', 1625 'Malgun Gothic': 'ë§ìê³ ë', 1626 '굴림': '굴림', 1627 'ëì': 'ëì', 1628 'ëª ì¡°': 'ëª ì¡°', 1629 'ê¶ì': 'ê¶ì' 1630 }, 1631 fontFamilySelection: true, 1632 1633 fontSizeSelection: true, 1634 1635 linkAlwaysBlank : true, 1636// enter: $.FroalaEditor.ENTER_BR, 1637 lineHeights: { 1638 "150%": "150%", 1639 "160%": "160%", 1640 "170%": "170%", 1641 "180%": "180%", 1642 "190%": "190%", 1643 "200%": "200%", 1644 "210%": "210%" 1645 }, 1646 1647 1648 1649// toolbarInline: true, 1650// toolbarVisibleWithoutSelection: true, 1651 zIndex: 100, 1652 1653 //ì´ë¯¸ì§ ì ë¡ë ìµì 1654 imageDefaultWidth: 0, 1655 imageUploadURL: "/common/fileUploadProc", 1656 imageUploadParam: 'image_param', 1657 imageUploadParams: {'filetype': 'img'}, 1658 imageUploadMethod: 'POST', 1659 imageMaxSize: 5 * 1024 * 1024, 1660 imageAllowedTypes: ['jpeg', 'jpg', 'png', 'gif', 'bmp'], 1661 1662 //첨ë¶íì¼ ì ë¡ë ìµì 1663 fileUploadURL: "/common/fileUploadProc", 1664 fileUploadParam: 'file_param', 1665 fileUploadParams: {'filetype': 'file'}, 1666 fileUploadMethod: 'POST', 1667 fileMaxSize: 10 * 1024 * 1024, 1668 fileAllowedTypes: ['application/x-zip-compressed', 'application/xls', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/unknown', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp'] 1669 1670 }) 1671 .on('froalaEditor.file.uploaded', function (e, editor, response) { 1672 // File was uploaded to the server. 1673 }) 1674 .on('froalaEditor.file.inserted', function (e, editor, $file, response) { 1675 eval("var res = "+response+";"); 1676 console.log(res); 1677 $file.attr("href", "/download?type=pl&org="+res.result.orgFileName+"&save="+res.result.saveFileName); 1678 // File was inserted in the editor. 1679 }) 1680 .on('froalaEditor.file.error', function (e, editor, error, response) { 1681 console.log("file error"); 1682 getErrCode(error.code); 1683 }) 1684 .on('froalaEditor.image.inserted', function(e, editor, $img, response){ 1685 console.log(e); 1686 console.log($img); 1687 console.log(response); 1688// console.log($img.context.naturalWidth); 1689// console.log(editor.context.clientidth); 1690 1691// $img.css({ 1692// "width": $img.context.naturalWidth>1100? 1100 : $img.context.naturalWidth 1693// }); 1694 1695 $img.attr("src", $img.attr("src").split(location.origin).join("")); 1696 }) 1697 .on('froalaEditor.image.error', function (e, editor, error, response) { 1698 console.log(e); 1699 console.log(response); 1700 getErrCode(error.code); 1701 }); 1702} 1703 1704 1705function getErrCode(n) 1706 { 1707 //https://www.froala.com/wysiwyg-editor/docs/events#image.error 1708 var bAlert = false;
1709 1710 switch(n) 1711 { 1712 case 1: 1713 console.log("Bad link"); 1714 break; 1715 1716 case 2: 1717 console.log("No link in upload response"); 1718 break; 1719 1720 case 3: 1721 console.log("Error during file upload"); 1722 break; 1723 1724 case 4: 1725 console.log("Parsing response failed"); 1726 break; 1727 1728 case 5: 1729 alert("íì¼ì´ ë무 í½ëë¤.") 1730 bAlert = true; 1731// console.log("Image too text-large"); 1732 break; 1733 1734 case 6: 1735 alert("ì ë¡ë ê°ë¥í íì¼ íìì´ ìëëë¤."); 1736 bAlert = true; 1737// console.log("Invalid image type"); 1738 break; 1739 1740 case 7: 1741 console.log("File can be uploaded only to same domain in IE 8 and IE 9"); 1742 break; 1743 } 1744 1745 if(!bAlert) 1746 alert("íì¼ ì ë¡ë ì¤ ì¤ë¥ê° ë°ìíììµëë¤."); 1747} 1748 1749var whiteList = ["jpg", "bmp", "png", "gif"]; 1750function chkIsImage(obj) 1751{ 1752 var result = true; 1753 1754 for(var j=0; j<$(obj).length && result; j++) 1755 { 1756 if($(obj).eq(j).val()!="") 1757 { 1758 var chk = false; 1759 var ext = $(obj).eq(j).val(); 1760 ext = ext.substring(ext.lastIndexOf(".")+1, ext.length).toLowerCase(); 1761 1762 for(var i=0; i<whiteList.length; i++) 1763 { 1764 if(ext == whiteList[i]) 1765 { 1766 chk = true; 1767 break; 1768 } 1769 } 1770 1771 if(!chk) 1772 result = chk; 1773 } 1774 } 1775 1776 if(!result) 1777 alert("ì ë¡ë ë¶ê°ë¥í íì¼ì´ í¬í¨ëì´ ììµëë¤.\n\nì ë¡ë ê°ë¥í íì : "+whiteList.join(", ")); 1778 1779 return result; 1780} 1781 1782var last_scr_id = ""; 1783function getCategory(scr_id) 1784{ 1785 if(last_scr_id=="") 1786 last_scr_id = scr_id; 1787 1788 var result = ""; 1789 scr_id = typeof(scr_id)=="undefined" ? "" : scr_id; 1790 1791 $.ajax({ 1792 type : "POST", 1793 url : "/include/getCategory.asp", 1794 async : false, 1795 dataType : "json", 1796 data:{ 1797 "scr_id" : scr_id 1798 }, 1799 error : function(jqXHR, textStatus, errorThrown){ 1800 console.log(jqXHR); 1801// alert(jqXHR.responseText +"\n\n"+textStatus+"\n\n"+errorThrown); 1802 }, 1803 success : function(msg){ 1804 var d = msg.data; 1805 var html = ""; 1806// console.log(msg); 1807 1808 for(var i=0; i<d.length; i++) 1809 { 1810 html += "<li><a href='"+d[i].scr_link+"' data='"+d[i].scr_id+"' scr_fid='"+msg.scr_fid+"'>"+d[i].scr_desc+"</a></li>"; 1811 } 1812 1813 if(html!="") 1814 { 1815 result = "<div class='tmpDropdownClass1'>"; 1816 result += "<span class='tmpDropdownClass2'></span>"; 1817 result += "<input type='hidden' name='cd-dropdown'>"; 1818 result += "<ul class='tmpDropdownClass3'>"; 1819 result += html; 1820 result += "</ul></div>"; 1821 } 1822 1823 1824 $(result).insertAfter(".lnb_home"); 1825 if(msg.scr_fid!="" && msg.scr_fid!="0000000000") 1826 getCategory(msg.scr_fid); 1827 else 1828 { 1829 //ìë¸ë©ë´ ì¶ë ¥ í í´ëì¤ ë³ê²½ 1830 $(".tmpDropdownClass1").each(function(idx){ 1831 var depth = idx+1; 1832 $(this).addClass("dropdown_depth"+depth); 1833 $(this).find(".tmpDropdownClass2").addClass("select_label_depth"+depth); 1834 $(this).find(".tmpDropdownClass3").addClass("dropdown_list_depth"+depth); 1835 }); 1836 1837 $(".tmpDropdownClass1").removeClass("tmpDropdownClass1"); 1838 $(".tmpDropdownClass2").removeClass("tmpDropdownClass2"); 1839 $(".tmpDropdownClass3").removeClass("tmpDropdownClass3"); 1840 1841 1842 //ìë¸ë©ë´ íì¬ ìì¹ ì í 1843 selectCategory() 1844 1845 } 1846 1847 return ; 1848 1849 1850 selectCategory($(".dropdown_list_depth"+className), scrID); 1851 1852 if(msg.scr_fid != "") 1853 selectCategory($(".dropdown_list_depth1"), msg.scr_fid); 1854 1855 if(scrID=="0000000104" && className=="2") 1856 { 1857 if($(".dropdown_depth3 a.on").length>0) 1858 $(".select_label_depth3").text($(".dropdown_depth3 a.on").text()); 1859 else 1860 $(".select_label_depth3").text($(".dropdown_depth3 a:first").text()); 1861 } 1862 1863 } 1864 }); 1865 1866// return result; 1867} 1868 1869function selectCategory() 1870{ 1871 var scr_fid = ""; 1872 1873 if($(".dropdown_depth3").length>0) 1874 { 1875 scr_fid = $(".dropdown_depth3").find("a:first").attr("scr_fid"); 1876 $(".dropdown_depth3").find("a[data="+last_scr_id+"]").addClass("on"); 1877 $(".select_label_depth3").text($(".dropdown_depth3").find(".on").text()); 1878 } 1879 1880 if($(".dropdown_depth2").length>0) 1881 { 1882 if(scr_fid != "") 1883 last_scr_id = scr_fid; 1884 1885 scr_fid = $(".dropdown_depth2").find("a:first").attr("scr_fid"); 1886 $(".dropdown_depth2").find("a[data="+last_scr_id+"]").addClass("on"); 1887 $(".select_label_depth2").text($(".dropdown_depth2").find(".on").text()); 1888 } 1889 1890 if($(".dropdown_depth1").length>0) 1891 { 1892 if(scr_fid != "") 1893 last_scr_id = scr_fid; 1894 1895 scr_fid = $(".dropdown_depth1").find("a:first").attr("scr_fid"); 1896 $(".dropdown_depth1").find("a[data="+last_scr_id+"]").addClass("on"); 1897 $(".select_label_depth1").text($(".dropdown_depth1").find(".on").text()); 1898 } 1899 1900} 1901 1902function isMobile() 1903{ 1904 var m_userAgent_All = navigator.userAgent.toLowerCase(); 1905 var m_userAgent = ''; 1906 var m_mobile = new Array('iphone', 'ipod', 'ipad', 'android', 'blackberry', 'windows ce', 'nokia', 'webos', 'opera mini', 's
1906onyericsson', 'opera mobi', 'iemobile', 'mot'); 1907 var m_mobileCheck = 0; 1908 1909 1910 for(var m_count=0; m_count<m_mobile.length; m_count++) { 1911 if(m_userAgent_All.indexOf(m_mobile[m_count]) != -1) { 1912 m_mobileCheck++; 1913 m_userAgent = m_mobile[m_count]; 1914 } 1915 } 1916 1917 1918 var m_platform = navigator.platform.toLowerCase(); 1919 var m_platform_filter = new Array('win16', 'win32', 'win64', 'mac', 'macintel'); 1920 1921 for(var m_count=0; m_count<m_platform_filter.length; m_count++) { 1922 if(m_platform.indexOf(m_platform_filter[m_count]) != -1) { 1923 m_mobileCheck = 0; 1924 } 1925 } 1926 1927 return m_mobileCheck>0; 1928} 1929 1930function chkJongsung(txt) 1931{ 1932 var cd = txt.charCodeAt(txt.length-1); 1933 var result = (cd-44032)%28; 1934 1935 //result > 0 : ë°ì¹¨ ìì 1936 //result == 0 : ë°ì¹¨ ìì 1937 //result < 0 : íê¸ ìë 1938 1939 return result; 1940} 1941 1942function findZip(zipId, addr1Id, addr2Id) { 1943 new kakao.Postcode({ 1944 oncomplete: function(data) { 1945 // íì ìì ê²ìê²°ê³¼ í목ì í´ë¦íìë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 1946 1947 // ê° ì£¼ìì ë ¸ì¶ ê·ì¹ì ë°ë¼ 주ì를 ì¡°í©íë¤. 1948 // ë´ë ¤ì¤ë ë³ìê° ê°ì´ ìë ê²½ì°ì 공백('')ê°ì ê°ì§ë¯ë¡, ì´ë¥¼ ì°¸ê³ íì¬ ë¶ê¸° íë¤. 1949 var fullAddr = ''; // ìµì¢ 주ì ë³ì 1950 var extraAddr = ''; // ì¡°í©í 주ì ë³ì 1951 1952 // ì¬ì©ìê° ì íí 주ì íì ì ë°ë¼ í´ë¹ 주ì ê°ì ê°ì ¸ì¨ë¤. 1953 if (data.userSelectedType === 'R') { // ì¬ì©ìê° ëë¡ëª 주ì를 ì ííì ê²½ì° 1954 fullAddr = data.roadAddress; 1955 1956 } else { // ì¬ì©ìê° ì§ë² 주ì를 ì ííì ê²½ì°(J) 1957 fullAddr = data.jibunAddress; 1958 } 1959 1960 // ì¬ì©ìê° ì íí 주ìê° ëë¡ëª íì ì¼ë ì¡°í©íë¤. 1961 if(data.userSelectedType === 'R'){ 1962 //ë²ì ëëª ì´ ìì ê²½ì° ì¶ê°íë¤. 1963 if(data.bname !== ''){ 1964 extraAddr += data.bname; 1965 } 1966 // ê±´ë¬¼ëª ì´ ìì ê²½ì° ì¶ê°íë¤. 1967 if(data.buildingName !== ''){ 1968 extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); 1969 } 1970 // ì¡°í©í주ìì ì 무ì ë°ë¼ ì쪽ì ê´í¸ë¥¼ ì¶ê°íì¬ ìµì¢ 주ì를 ë§ë ë¤. 1971 fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); 1972 } 1973 1974 // ì°í¸ë²í¸ì 주ì ì 보를 í´ë¹ íëì ë£ëë¤. 1975 document.getElementById(zipId).value = data.zonecode; //5ì리 ìì°í¸ë²í¸ ì¬ì© 1976 document.getElementById(addr1Id).value = fullAddr; 1977 1978 // 커ì를 ìì¸ì£¼ì íëë¡ ì´ëíë¤. 1979 document.getElementById(addr2Id).focus(); 1980 } 1981 }).open(); 1982} 1983 1984function addComment(idx) 1985{ 1986 var f = document.frmInfo; 1987 var orgEncoding = ""; 1988 var bd_com_content = ""; 1989 1990 if(f.bd_com_id.value=="") 1991 { 1992 alert("ë¡ê·¸ì¸ íì ë±ë¡ ê°ë¥í©ëë¤."); 1993 return ; 1994 } 1995 1996 if(typeof(idx)=="undefined" || idx==null || idx=="") 1997 { 1998// f.act.value = "comment_add"; 1999 bd_com_content = f.bd_com_content; 2000 }else 2001 { 2002// f.act.value = "comment_reply_add"; 2003 f.comment_idx.value = idx; 2004 bd_com_content = f["bd_com_content_"+idx]; 2005 } 2006 2007 if(bd_com_content.value=="") 2008 { 2009 alert("ëê¸ ë´ì©ì ì ë ¥í´ ì£¼ì¸ì."); 2010 bd_com_content.focus(); 2011 return ; 2012 } 2013 2014 2015 f.action = "board_proc.asp"; 2016 orgEncoding = f.encoding; 2017 f.encoding = "multipart/form-data"; 2018 2019 f.submit(); 2020 2021 f.encoding = orgEncoding; 2022} 2023 2024function delComment(idx) 2025{ 2026 var f = document.frmInfo; 2027 var orgEncoding = ""; 2028 2029 if(typeof(idx)=="undefined" || idx==null || idx=="") 2030 { 2031 alert("ìì íì¤ ëê¸ì´ ì íëì§ ìììµëë¤."); 2032 return ; 2033 } 2034 if(!confirm("ëê¸ì ìì íìê² ìµëê¹?")) 2035 return ; 2036 2037 f.comment_idx.value = idx; 2038// f.act.value = "comment_del"; 2039 f.action = "board_proc.asp"; 2040 orgEncoding = f.encoding; 2041 f.encoding = "multipart/form-data"; 2042 2043 f.submit(); 2044 2045 f.encoding = orgEncoding; 2046} 2047 2048function viewCommentReply(idx) 2049{ 2050 if(!$("#bd_com_reply_"+idx).parent().is(":visible")) 2051 $("#bd_com_reply_"+idx).parent().show(); 2052 if(!$("#bd_com_reply_"+idx).is(":visible")) 2053 $("#bd_com_reply_"+idx).show(); 2054 $("[name=bd_com_content_"+idx+"]").focus(); 2055 2056} 2057 2058function viewCommentEdit(idx) 2059{ 2060 $("#p_bd_com_content_"+idx).hide(); 2061 $("#p_bd_com_content_edit_"+idx).show(); 2062 $("[name=bd_com_content_edit_"+idx+"]").focus(); 2063} 2064 2065function editComment(idx) 2066{ 2067 var f = document.frmInfo; 2068 var orgEncoding = ""; 2069 var bd_com_content = f["bd_com_content_edit_"+idx]; 2070 2071 if(f.bd_com_id.value=="") 2072 { 2073 alert("ë¡ê·¸ì¸ íì ë±ë¡ ê°ë¥í©ëë¤."); 2074 return ; 2075 } 2076 2077 if(bd_com_content.value=="") 2078 { 2079 alert("ëê¸ ë´ì©ì ì ë ¥í´ ì£¼ì¸ì."); 2080 bd_com_content.focus(); 2081 return ; 2082 } 2083 2084 f.comment_idx.value = idx; 2085// f.act.value = "comment_edit"; 2086 f.action = "board_proc.asp"; 2087 orgEncoding = f.encoding; 2088 f.encoding = "multipart/form-data"; 2089 2090 f.submit(); 2091 2092 f.encoding = orgEncoding; 2093} 2094 2095 2096function copyLink(obj) 2097{ 2098 var tmpObj = $("<input>"); 2099 $(document.body).append(tmpObj); 2100 $(tmpObj).val($(obj).attr("data")).select(); 2101 document.execCommand("copy"); 2102 $(tmpObj).remove(); 2103 2104 alert("ê²ì물ì URLì í´ë¦½ë³´ëì ë³µì¬ íììµëë¤."); 2105} 2106 2107function goMemLink(n, memType) 2108{ 2109 switch (n) 2110 { 2111 case 1 : //ë¡ê·¸ì¸ 2112 location.href = WEB_ROOT+"/mem/login.asp?scrID=0000000178"; 2113 break; 2114 case 2 : //id/pwd찾기 2115 location.href = WEB_ROOT+"/mem/login_id_find.asp?scrID=0000000179"; 2116 break; 2117 case 3 : //íìê°ì 2118 location.href = WEB_ROOT+"/mem/join_type01/mem_join.asp?scrID=0000000180"; 2119 break; 2120 case 4 : //ë§ì´íì´ì§
2121 location.href = WEB_ROOT+"/mem/join_type01/mem_form.asp?scrID=0000000186"; 2122 break; 2123 case 5 : //SNSíìê°ì 2124 location.href = WEB_ROOT+"/mem/join_type01/mem_join.asp?scrID=0000000180&u_sns_type="+memType; 2125 break; 2126 } 2127} 2128 2129function addFavorite(obj, e) 2130{ 2131 var bookmarkURL = window.location.href; 2132 var bookmarkTitle = document.title; 2133 2134 2135 if (window.sidebar && window.sidebar.addPanel) { 2136 // Firefox version < 23 2137 window.sidebar.addPanel(bookmarkTitle, bookmarkURL, ''); 2138 } else if ((window.sidebar && (navigator.userAgent.toLowerCase().indexOf('firefox') > -1)) || (window.opera && window.print)) { 2139 // Firefox version >= 23 and Opera Hotlist 2140 var $this = $(obj); 2141 $this.attr('href', bookmarkURL); 2142 $this.attr('title', bookmarkTitle); 2143 $this.attr('rel', 'sidebar'); 2144 $this.off(e); 2145 } else if (window.external && ('AddFavorite' in window.external)) { 2146 // IE Favorite 2147 window.external.AddFavorite(bookmarkURL, bookmarkTitle); 2148 } else { 2149 // WebKit - Safari/Chrome 2150 alert((navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Cmd' : 'Ctrl') + '+D í¤ë¥¼ ëë¬ ì¦ê²¨ì°¾ê¸°ì ë±ë¡íì¤ ì ììµëë¤.'); 2151 } 2152 2153} 2154 2155function cvtCurrent(obj) 2156{ 2157 var result = val; 2158 2159 if(val!="" && !isNaN(parseInt(val))) 2160 { 2161 result = parseInt(val); 2162 result = result.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 2163 } 2164 2165 return result; 2166 2167} 2168 2169function setComma(x) { 2170 return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 2171} 2172 2173 2174function isValidFormat(input,format) { 2175 if ($.trim($(input).val()).search(format) != -1) { 2176 return true; //ì¬ë°ë¥¸ í¬ë§· íì 2177 } 2178 return false; 2179} 2180 2181/** 2182 * ì ë ¥ê°ì´ ì´ë©ì¼ íìì¸ì§ ì²´í¬ 2183 * ex) if (!isValidEmail(form.email)) { 2184 * alert("ì¬ë°ë¥¸ ì´ë©ì¼ 주ìê° ìëëë¤."); 2185 * } 2186 */ 2187function isValidEmail(input) { 2188// var format = /^(\S+)@(\S+)\.([A-Za-z]+)$/; 2189 var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/; 2190 return isValidFormat(input,format); 2191} 2192 2193function isValidId(input){ 2194 var format = /^[A-za-z0-9-_]{5,15}/g 2195 return isValidFormat(input,format); 2196} 2197 2198function isValidDate(input){ 2199 var format = /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/; 2200 return isValidFormat(input, format); 2201} 2202 2203function setFilename(obj, dest) 2204{ 2205 var filename = $(obj).val().substring($(obj).val().lastIndexOf("\\")+1, $(obj).val().length); 2206 $("#"+dest).val(filename); 2207} 2208 2209function setMemo(opt) 2210{ 2211 var style = isnull(opt.style, ""); 2212 var bgColor = isnull(opt.bgColor, "#d9e60c"); 2213 var bdStyle = isnull(opt.bdStyle, "solid 1px #000"); 2214 var left = isnull(opt.left, 0); 2215 var top = isnull(opt.top, 0); 2216 var width = isnull(opt.width, ""); 2217 var height = isnull(opt.height, ""); 2218 var padding = isnull(opt.padding, ""); 2219 var margin = isnull(opt.margin, ""); 2220 2221 var html = "<div style='"; 2222 if(style!="") 2223 { 2224 html += style; 2225 }else 2226 { 2227 html += "position:absolute; z-index:99999999;"; 2228 html += "background-color:"+bgColor+";"; 2229 html += "border:"+bdStyle+";"; 2230 html += "left:"+left+";"; 2231 html += "top:"+top+";"; 2232 html += "width:"+width+";"; 2233 html += "height:"+height+";"; 2234 html += "padding:"+padding+";"; 2235 html += "margin:"+margin+";"; 2236 } 2237 html += "'>"+isnull(opt.html, "")+"</div>"; 2238 2239 $("body").append(html); 2240} 2241 2242function isnull(oldObj, newObj) 2243{ 2244 return typeof(oldObj)=="undefined" || oldObj==null ? newObj : oldObj; 2245} 2246 2247 2248function dateDiff(gubun, _date1, _date2) { 2249 var diffDate_1 = _date1 instanceof Date ? _date1 :new Date(_date1); 2250 var diffDate_2 = _date2 instanceof Date ? _date2 :new Date(_date2); 2251 2252// diffDate_1 =new Date(diffDate_1.getFullYear(), diffDate_1.getMonth(), diffDate_1.getDate()); 2253// diffDate_2 =new Date(diffDate_2.getFullYear(), diffDate_2.getMonth(), diffDate_2.getDate()); 2254 2255 var diff = Math.abs(diffDate_2.getTime() - diffDate_1.getTime()); 2256 2257 gubun = typeof(gubun)=="undefined" || gubun=="" ? "D" : gubun.toUpperCase(); 2258 2259 switch(gubun) 2260 { 2261 case "H" : 2262 diff /= 1000*3600; 2263 break; 2264 2265 case "M" : 2266 diff /= 1000*60; 2267 break; 2268 2269 case "S" : 2270 diff /= 1000; 2271 break; 2272 2273 default : 2274 diff /= 1000*3600*24; 2275 break; 2276 2277 }
2278 diff = Math.ceil(diff); 2279 2280 return diff; 2281} 2282 2283function cvtTime(sec) 2284{ 2285 var result="", s="", m="", h=""; 2286 2287 if(sec>=60) 2288 { 2289 s = sec % 60; 2290 m = Math.floor(sec/60); 2291 2292 if(m>=60) 2293 { 2294 h = Math.floor(m/60); 2295 m = m % 60; 2296 } 2297 }else 2298 s = sec; 2299 2300 if(h!="") 2301 result = h+"ìê° "; 2302 if(m!="") 2303 result += m+"ë¶ "; 2304 if(s!="") 2305 result += s+"ì´"; 2306 2307 return result; 2308} 2309 2310function clickCategory(s_cat) 2311{ 2312 var f = document.frmInfo; 2313 2314 if($(f.sCate01).length<1) 2315 $(f).append("<input type='hidden' name='sCate01' />"); 2316 2317 f.sCate01.value = s_cat; 2318 2319 goSearch(); 2320} 2321 2322function getWeekdayName(wd) 2323{ 2324 switch(wd) 2325 { 2326 case 0: 2327 return "ì¼"; 2328 case 1: 2329 return "ì"; 2330 case 2: 2331 return "í"; 2332 case 3: 2333 return "ì"; 2334 case 4: 2335 return "목"; 2336 case 5: 2337 return "ê¸"; 2338 case 6: 2339 return "í "; 2340 } 2341} 2342 2343 2344(function ($) { 2345 2346 window.addRule = function (selector, styles, sheet) { 2347 2348 if (typeof styles !== "string") { 2349 var clone = ""; 2350 for (var style in styles) { 2351 var val = styles[style]; 2352 2353 style = style.replace(/([A-Z])/g, "-$1").toLowerCase(); // convert to dash-case 2354 clone += style + ":" + (style === "content" ? '"' + val + '"' : val) + "; "; 2355 } 2356 styles = clone; 2357 } 2358 2359 sheet = sheet || document.styleSheets[0]; 2360 2361 if (sheet.insertRule) sheet.insertRule(selector + " {" + styles + "}", sheet.cssRules.length); 2362 else if (sheet.addRule) sheet.addRule(selector, styles); 2363 2364 return this; 2365 2366 }; 2367 2368 if ($) { 2369 $.fn.addRule = function (styles, sheet) { 2370 addRule(this.selector, styles, sheet); 2371 return this; 2372 }; 2373 } 2374 2375}(window.jQuery)); 2376 2377 2378function ajaxBoardMore() 2379{ 2380 var f = document.frmInfo; 2381 2382 var scrID = $(f.scrID).val(); 2383 var page = parseInt($(f.page).val())+1; 2384 var s_string = isnull($(f.s_string).val(), ""); 2385 var s_cat = isnull($(f.s_cat).val(), ""); 2386 2387 $(f.page).val(page); 2388 2389 $.ajax({ 2390 type : "POST", 2391 url : "/include/ajaxBoardMore.asp", 2392 async : false, 2393 dataType : "json", 2394 data:{ 2395 "scrID" : scrID 2396 ,"page" : page 2397 ,"s_string" : s_string 2398 ,"s_cat" : s_cat 2399 }, 2400 error : function(jqXHR, textStatus, errorThrown){ 2401 console.log(jqXHR); 2402// alert(jqXHR.responseText +"\n\n"+textStatus+"\n\n"+errorThrown); 2403 }, 2404 success : function(msg){ 2405 var totalPage = msg.totalPage; 2406 var imgCount = msg.imgCount; 2407 2408 if(totalPage<=page) 2409 $(".page_nv_type04").remove(); 2410 2411 var data = msg.data; 2412 var html = ""; 2413 for(var i=0; i<data.length; i++) 2414 { 2415 html += '<div class="board_gallery_img_type05_item">'; 2416 html += '<div onclick="goDetail(\''+data[i].bd_num+'\',\'bd_num\')">'; 2417 html += data[i].thumb; 2418 html += '<div class="txt">'; 2419 html += '<p>'+data[i].bd_title+'</p>'; 2420 html += '<span>'+data[i].bd_date+'</span>'; 2421 html += '</div>'; 2422 html += '</div>'; 2423 html += '</div>'; 2424 } 2425 2426 var imgLoad = 0; 2427 if($(html).find("img").length>0) 2428 { 2429 $(html).find("img").load(function(){ 2430 imgLoad++; 2431 if(imgLoad>=imgCount) 2432 SetGridItemHeight(); 2433 }); 2434 }else 2435 { 2436 SetGridItemHeight(); 2437 } 2438 2439 $(".dev_list_more").append(html); 2440 2441 } 2442 }); 2443 2444} 2445 2446function adjImage(wrapObj, imgObj, maxWidth) 2447{ 2448 if(typeof(maxWidth)!="undefined" && maxWidth!="") 2449 $(imgObj).css("max-width", maxWidth); 2450 else 2451 $(imgObj).css("max-width", "95%"); 2452 2453 var wrapWidth = $(wrapObj).width(); 2454 2455 $(imgObj).each(function(){ 2456 if($(this)[0].width > wrapWidth) 2457 $(this).css("width", "95%"); 2458 }); 2459} 2460 2461var whiteList = ["jpg", "png", "gif", "bmp", "xls", "xlsx", "ppt", "pptx", "pdf", "zip"]; 2462function checkFile(obj) 2463{ 2464 var result = true; 2465 var dispSize = 10; 2466 var maxSize = dispSize * 1024*1024; 2467 2468 2469 for(var j=0; j<$(obj).length && result; j++) 2470 { 2471 if($(obj).eq(j).val()!="") 2472 { 2473 var chk = false; 2474 var ext = $(obj).eq(j).val(); 2475 ext = ext.substring(ext.lastIndexOf(".")+1, ext.length).toLowerCase(); 2476 2477 for(var i=0; i<whiteList.length; i++) 2478 { 2479 if(ext == whiteList[i]) 2480 { 2481 chk = true; 2482 break; 2483 } 2484 } 2485 2486 if(!chk) 2487 result = chk; 2488 } 2489 } 2490 2491 if(!result) 2492 alert("ì ë¡ë ë¶ê°ë¥í íì¼ì´ í¬í¨ëì´ ììµëë¤.\n\nì ë¡ë ê°ë¥í íì : "+whiteList.join(", ")); 2493 else 2494 { 2495 2496 var browser=navigator.appName; 2497 var fileSize = 0; 2498 2499 // ìµì¤íë¡ë¬ì¼ ê²½ì° 2500 if (browser=="Microsoft Internet Explorer") 2501 { 2502 var oas = new ActiveXObject("Scripting.FileSystemObject"); 2503 fileSize = oas.getFile( obj.value ).size; 2504 } 2505 // ìµì¤íë¡ë¬ê° ìëê²½ì° 2506 else 2507 { 2508 fileSize = obj.files[0].size; 2509 } 2510 2511 if(maxSize<fileSize) 2512 { 2513 result = false;
2514 alert("첨ë¶íì¼ì "+dispSize+"MBê¹ì§ ë±ë¡ ê°ë¥í©ëë¤."); 2515 } 2516 } 2517 2518 return result; 2519} 2520 2521function blockKor(obj) 2522{ 2523 obj.value = obj.value.replace(/[\ã±-ã ã -ã £ê°-í£]/g, ""); 2524} 2525function onlyNum(obj) 2526{ 2527 obj.value = obj.value.replace(/[^0-9-.]/g, ""); 2528} 2529 2530 2531function checkFileSize(obj) 2532{ 2533 if(typeof(obj)=="undefined") 2534 return true; 2535 2536 var result = true; 2537 var dispSize = 30; 2538 var maxSize = dispSize * 1024*1024; 2539 2540 var browser=navigator.appName; 2541 var fileSize = 0; 2542 2543 for(var i=0; i<obj.length; i++) 2544 { 2545 if(obj[i].value!="") 2546 { 2547 // ìµì¤íë¡ë¬ì¼ ê²½ì° 2548 if (browser=="Microsoft Internet Explorer") 2549 { 2550 var oas = new ActiveXObject("Scripting.FileSystemObject"); 2551 fileSize += oas.getFile( obj[i].value ).size; 2552 } 2553 // ìµì¤íë¡ë¬ê° ìëê²½ì° 2554 else 2555 { 2556 fileSize += obj[i].files[0].size; 2557 } 2558 } 2559 } 2560 if(maxSize<fileSize) 2561 { 2562 result = false; 2563 alert("모ë 첨ë¶íì¼ ì©ëì í©ì´ "+dispSize+"MB를 ì´ê³¼ í©ëë¤."); 2564 } 2565 2566 return result; 2567} 2568 2569function RefreshImage(valImageId) { 2570 var objImage = document.getElementById(valImageId) 2571 if (objImage == undefined) { 2572 return; 2573 } 2574 var now = new Date(); 2575 objImage.src = objImage.src.split('?')[0] + '?x=' + now.getTime(); 2576} 2577function checkAll(thisObj, strName) 2578{ 2579 $("[name="+strName+"]").prop("checked", $(thisObj).prop("checked")); 2580} 2581 2582function makeArg() 2583{ 2584 var arg = ""; 2585 var f = arguments[0]; 2586 2587 var s = arguments.length>2 ? arguments[1] : 0; 2588 var e = arguments.length>2 ? arguments[2] : arguments[1]; 2589 2590 for(var i=s; i<e; i++) 2591 { 2592 if($(f[i]).val()!="") 2593 { 2594 if(arg!="") 2595 arg += "&"; 2596 2597 arg += $(f[i]).attr("name")+"="+$(f[i]).val(); 2598 } 2599 } 2600 2601 return arg; 2602} 2603 2604function limitLength(obj, limit) 2605{ 2606 $(obj).keydown(function(){ 2607 checkMaxLength(event, this, limit); 2608 }); 2609 2610 $(obj).blur(function(){ 2611 checkMaxLength(event, this, limit); 2612 }); 2613} 2614 2615function setCookie( name, value, expiredays ) 2616{ 2617 var today = new Date(); 2618 //24ìê° 2619 today.setTime(today.getTime() + 1000*60*60*24); 2620 2621 //var today = new Date(); 2622 //today.setDate( today.getDate() + expiredays ); 2623 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; 2624} 2625 2626function linkDatepicker(obj1, obj2) 2627{ 2628 $(obj1).on("change", function(){ 2629 $(obj2).datepicker("option", "minDate", $(obj1).val()); 2630 }); 2631 2632 $(obj2).on("change", function(){ 2633 $(obj1).datepicker("option", "maxDate", $(obj2).val()); 2634 }); 2635} 2636 2637 2638 2639 2640 2641//////////////ì¼ì ê´ë ¨ 2642 2643var schDatas; 2644var schBdId = ""; 2645//ë±ë¡ë ì¤ì¼ì¤ ì¡°í 2646function getScheduleList(sDate1) 2647{ 2648 var sDate2; 2649 2650 if(isnull(sDate1, "")=="") 2651 { 2652 sDate1 = new Date(); 2653 sDate1 = sDate1.getFullYear() +"-"+ String(sDate1.getMonth()+1).padStart(2, "0") +"-01"; 2654 } 2655 2656 sDate2 = new Date(new Date(sDate1).getFullYear(), new Date(sDate1).getMonth()+1, 0); 2657 sDate2 = sDate2.getFullYear() +"-"+ String(sDate2.getMonth()+1).padStart(2, "0") +"-"+ String(sDate2.getDate()).padStart(2, "0"); 2658 2659 2660 $.ajax({ 2661 type : "POST", 2662 url : "/board/schedule_list", 2663 async : false, 2664 dataType : "json", 2665 data:{ 2666 "sDate1" : sDate1, 2667 "sDate2" : sDate2, 2668 "bd_id" : schBdId 2669 }, 2670 error : function(jqXHR, textStatus, errorThrown){ 2671 console.log(jqXHR); 2672// alert(jqXHR.responseText +"\n\n"+textStatus+"\n\n"+errorThrown); 2673 }, 2674 success : function(msg){ 2675 if(msg.resultCode=="1000") 2676 { 2677 schDatas = msg.data; 2678 }else 2679 { 2680 alert(msg.resultCode +" : "+msg.resultMsg); 2681 } 2682 } 2683 }); 2684 2685} 2686 2687function getCalendar(pType, destObj, thisYear, thisMonth) 2688{ 2689 var today = new Date(); 2690 2691 thisYear = isnull(thisYear, today.getFullYear()); 2692 thisMonth = isnull(thisMonth, today.getMonth()+1); 2693 2694 today = today.getFullYear() +"-"+ String(today.getMonth()+1).padStart(2, "0") +"-"+ String(today.getDate()).padStart(2, "0"); 2695 2696 var sWd = new Date(thisYear, thisMonth-1, 1).getDay(); 2697 var eDate = new Date(thisYear, thisMonth, 0); 2698 2699 eDate = eDate.getDate(); 2700 2701 var html = ""; 2702 var schDestObj = pType=="main" ? ".schedule-list" : ".board-list-1"; 2703 2704 2705 2706 for(var i=1; i<=eDate+sWd; i++) 2707 { 2708 var date = i-sWd; 2709 2710 if((i-1)%7==0) 2711 html += "<tr>\n"; 2712 2713 2714 if(date>0) 2715 { 2716 thisDate = thisYear +"-"+ String(thisMonth).padStart(2, "0") +"-"+ String(date).padStart(2, "0"); 2717 2718 2719 html += " <td onclick='getCurDateSchedule(\""+ pType +"\", \""+thisDate+"\", \""+schDestObj+"\")' class='cal_td' data-date='"+date+"'>\n"; 2720 2721 if(pType=="main" || pType=="subMain") 2722 { 2723 html += " <div class='"; 2724 if(thisDate==today) 2725 html += "today "; 2726 if(hasSchedule(thisDate, schDatas)) //ì¼ì ì´ ìì ë 2727 html += "plan "; 2728 html += "'>"+date+"</div>\n"; 2729 }else if(pType=="sub") 2730 { 2731 html += " <div class='"; 2732 if(thisDate==today) 2733 html += "today "; 2734 html += "'><span class='date'>"+date+"</span>"; 2735 html += getSchedule(thisDate, schDatas); //ì¼ì ëª©ë¡ html 2736 html += " </div>\n"; 2737 } 2738 html += " </td>\n"; 2739 }else 2740 { 2741 html += " <td><div></div></td>\n"; 2742 } 2743 2744 if(i%7==0) 2745 html += "</tr>\n"; 2746 2747 2748 if(i==eDate+sWd) 2749 { 2750 for(var j=0; j<(7-(i%7)); j++) 2751 html += "<td><div></div></td>"; 2752 } 2753 } 2754 html += "</tr>"; 2755 2756 $(destObj).html(html); 2757} 2758 2759function hasSchedule(thisDate) 2760{ 2761 var result = false;
2762 2763 thisDate = thisDate.replaceAll("-", "."); 2764 2765 for(var i=0; i<schDatas.length; i++) 2766 { 2767 if(schDatas[i].item01.substr(0, 10)<=thisDate && schDatas[i].item02.substr(0, 10)>=thisDate) 2768 { 2769 result = true; 2770 break; 2771 } 2772 } 2773 2774 return result; 2775} 2776 2777function getCurDateSchedule(pType, thisDate, destObj) 2778{ 2779 var result = ""; 2780 2781 $("#sch_date").val(thisDate.split("-")[2]) 2782 thisDate = thisDate.replaceAll("-", "."); 2783 2784 setDateText(thisDate); 2785 2786 var schCount = 0; 2787 for(var i=0; i<schDatas.length; i++) 2788 { 2789 2790 if(schDatas[i].item01.substr(0, 10)<=thisDate && schDatas[i].item02.substr(0, 10)>=thisDate) 2791 { 2792 schCount++; 2793 2794 if(pType=="main") 2795 { 2796 result += "<li>"; 2797 result += " <a href='/board/board_detail?bd_type=APPLICATION&sitemap_code=K0401&bd_id="+ schDatas[i].bd_id +"&idx="+ schDatas[i].idx +"'>"; 2798 result += " <div class='left'>"; 2799 result += " <p class='cat'>"+ getScheduleName(schDatas[i].bd_id) +"</p>"; 2800 result += " <h3 class='title'>"+ schDatas[i].title +"</h3>"; 2801 result += " <div class='date'>"; 2802 result += " <p class='tit'>ì¼ì</p>"; 2803 result += " <span>"+ schDatas[i].item01 +" ~ "+ schDatas[i].item02 +"</span>"; 2804 result += " <span>"+ schDatas[i].item03 +"~"+ schDatas[i].item04 +"</span>"; 2805 result += " </div>"; 2806 result += " </div>"; 2807 result += " <span class='schedule-status "+schDatas[i].status +"'>"+ getScheduleStatus(schDatas[i].bd_id, schDatas[i].status) +"</span>"; 2808 result += " </a>"; 2809 result += "</li>"; 2810 2811 }else if(pType=="sub" || pType=="subMain") 2812 { 2813 result += "<li>"; 2814 result += " <a href='/board/board_detail?bd_type=APPLICATION&sitemap_code=K0401&bd_id="+ schDatas[i].bd_id +"&idx="+ schDatas[i].idx +"'>"; 2815 result += " <div class='head'>"; 2816 result += " <h3 class='title'>"+ schDatas[i].title +"</h3>"; 2817 result += " <div class='status-area'>"; 2818 result += " <div class='capacity'>"; 2819 result += " <span class='current'>"+ schDatas[i].app_count +"</span>"; 2820 result += " /"; 2821 result += " <span class='total'>"+ schDatas[i].item08 +"</span>"; 2822 result += " </div>"; 2823 result += " <span class='schedule-status "+schDatas[i].status +"'>"+ getScheduleStatus(schDatas[i].bd_id, schDatas[i].status) +"</span>"; 2824 result += " </div>"; 2825 result += " </div>"; 2826 result += " <ul class='info'>"; 2827 result += " <li>"; 2828 result += " <p class='tit'>ëì</p>"; 2829 result += " <p class='txt'>"; 2830 result += " <span>"+ schDatas[i].item09 +"</span>"; 2831 result += " </p>"; 2832 result += " </li>"; 2833 result += " <li>"; 2834 result += " <p class='tit'>ì¥ì</p>"; 2835 result += " <p class='txt'>"; 2836 result += " <span>"+ schDatas[i].item05 +"</span>"; 2837 result += " </p>"; 2838 result += " </li>"; 2839 result += " <li>"; 2840 result += " <p class='tit'>êµì¡ì¼ì</p>"; 2841 result += " <p class='txt'>"; 2842 result += " <span>"+ schDatas[i].item01 +" ~ "+ schDatas[i].item02 +"</span>"; 2843 result += " <span>"+ schDatas[i].item03 +"~"+ schDatas[i].item04 +"</span>"; 2844 result += " </p>"; 2845 result += " </li>"; 2846 result += " <li>"; 2847 result += " <p class='tit'>ì ì²ê¸°ê°</p>"; 2848 result += " <p class='txt'>"; 2849 result += " <span>"+ schDatas[i].item06 +" ~ "+ schDatas[i].item07 +"</span>"; 2850 result += " </p>"; 2851 result += " </li>"; 2852 result += " </ul>"; 2853 result += " </a>"; 2854 result += "</li>"; 2855 } 2856 } 2857 } 2858 2859 if(result=="") 2860 { 2861 result += " <li class='no-data'>"; 2862 result += " ì¼ì ì´ ììµëë¤."; 2863 result += " </li>"; 2864 } 2865 2866 $(".total strong").html(schCount); 2867 $(destObj).html(result); 2868} 2869 2870function getScheduleName(bd_id) 2871{ 2872 switch(bd_id) 2873 { 2874 case "EDUCATE": 2875 return "êµì¡ì ì²"; 2876 case "WORKSHOP": 2877 return "ìí¬ìµì ì²"; 2878 case "WELLFARE": 2879 return "ë³µì§ì§ìì ì²"; 2880 } 2881} 2882 2883function getScheduleStatus(bd_id, status) 2884{ 2885 var result = ""; 2886 2887 switch(status) 2888 { 2889 case "mint": 2890 result = "ì ì²ê°ë¥"; 2891 break; 2892 case "pink": 2893 result = "ì ì²ë기"; 2894 break; 2895 case "gray": 2896 result = "ì ì²ë§ê°"; 2897 break; 2898 case "white": 2899 switch(bd_id) 2900 { 2901 case "WELLFARE": 2902 result = "ì§ìì¬ì ìë£"; 2903 break; 2904 case "EDUCATE": 2905 result = "êµì¡ìë£"; 2906 break; 2907 case "WORKSHOP": 2908 result = "ìí¬ìµìë£"; 2909 break; 2910 } 2911 break; 2912 } 2913 2914 return result; 2915} 2916 2917function setDateText(thisDate) 2918{ 2919 var year = thisDate.substr(0, 4)
2920 var month = thisDate.substr(5, 2); 2921 var date = thisDate.substr(8, 2); 2922 2923 $("#schedule_date").html(year +"ë "+ month +"ì <span class='day'>"+ date +"ì¼</span>"); 2924} 2925 2926function getSchedule() 2927{ 2928 var result = ""; 2929 var cnt = 0; 2930 2931 thisDate = thisDate.replaceAll("-", "."); 2932 2933 for(var i=0; i<schDatas.length; i++) 2934 { 2935 if(schDatas[i].item01.substr(0, 10)<=thisDate && schDatas[i].item02.substr(0, 10)>=thisDate) 2936 { 2937 cnt++; 2938 result += "<li data-idx='"+ schDatas[i].idx +"'>"+ schDatas[i].title +"</li>"; 2939 } 2940 } 2941 2942 if(result!="") 2943 { 2944 result = "<ul class='plan'>"+ result +"</ul>"; 2945 if(cnt>2) 2946 result = "<span class='remainder'>+"+ (cnt-2) +"</span>"+ result; 2947 } 2948 2949 2950 return result; 2951} 2952 2953function getDateText(objDate, delim) 2954{ 2955 var result = ""; 2956 2957 result = objDate.getFullYear() + delim + String(objDate.getMonth()+1).padStart(2, "0") + delim + String(objDate.getDate()).padStart(2, "0"); 2958 2959 return result; 2960} 2961 2962function loadScript(url) { 2963 var script = document.createElement("script"); 2964 script.src = url; 2965 script.type = "text/javascript"; 2966 2967 document.head.appendChild(script); 2968}
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.