1// ì ì ë³ì 2var errmsg = ""; 3var errfld = null; 4 5// íë ê²ì¬ 6function check_field(fld, msg) 7{ 8 if ((fld.value = trim(fld.value)) == "") 9 error_field(fld, msg); 10 else 11 clear_field(fld); 12 return; 13} 14 15// íë ì¤ë¥ íì 16function error_field(fld, msg) 17{ 18 if (msg != "") 19 errmsg += msg + "\n"; 20 if (!errfld) errfld = fld; 21 fld.style.background = "#BDDEF7"; 22} 23 24// íë를 깨ëíê² 25function clear_field(fld) 26{ 27 fld.style.background = "#FFFFFF"; 28} 29 30function trim(s) 31{ 32 var t = ""; 33 var from_pos = to_pos = 0; 34 35 for (i=0; i<s.length; i++) 36 { 37 if (s.charAt(i) == ' ') 38 continue; 39 else 40 { 41 from_pos = i; 42 break; 43 } 44 } 45 46 for (i=s.length; i>=0; i--) 47 { 48 if (s.charAt(i-1) == ' ') 49 continue; 50 else 51 { 52 to_pos = i; 53 break; 54 } 55 } 56 57 t = s.substring(from_pos, to_pos); 58 // alert(from_pos + ',' + to_pos + ',' + t+'.'); 59 return t; 60} 61 62// ìë°ì¤í¬ë¦½í¸ë¡ PHPì number_format íë´ë¥¼ ë 63// ì«ìì , 를 ì¶ë ¥ 64function number_format(data) 65{ 66 67 var tmp = ''; 68 var number = ''; 69 var cutlen = 3; 70 var comma = ','; 71 var i; 72 73 var sign = data.match(/^[\+\-]/); 74 if(sign) { 75 data = data.replace(/^[\+\-]/, ""); 76 } 77 78 len = data.length; 79 mod = (len % cutlen);
80 k = cutlen - mod; 81 for (i=0; i<data.length; i++) 82 { 83 number = number + data.charAt(i); 84 85 if (i < data.length - 1) 86 { 87 k++; 88 if ((k % cutlen) == 0) 89 { 90 number = number + comma; 91 k = 0; 92 } 93 } 94 } 95 96 if(sign != null) 97 number = sign+number; 98 99 return number; 100} 101 102// ì ì°½ 103function popup_window(url, winname, opt) 104{ 105 window.open(url, winname, opt); 106} 107 108 109// í¼ë©ì¼ ì°½ 110function popup_formmail(url) 111{ 112 opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; 113 popup_window(url, "wformmail", opt); 114} 115 116// , 를 ìì¤ë¤. 117function no_comma(data) 118{ 119 var tmp = ''; 120 var comma = ','; 121 var i; 122 123 for (i=0; i<data.length; i++) 124 { 125 if (data.charAt(i) != comma) 126 tmp += data.charAt(i); 127 } 128 return tmp; 129} 130 131// ìì ê²ì¬ íì¸ 132function del(href) 133{ 134 if(confirm("íë² ìì í ìë£ë 복구í ë°©ë²ì´ ììµëë¤.\n\nì ë§ ìì íìê² ìµëê¹?")) { 135 var iev = -1; 136 if (navigator.appName == 'Microsoft Internet Explorer') { 137 var ua = navigator.userAgent; 138 var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); 139 if (re.exec(ua) != null) 140 iev = parseFloat(RegExp.$1); 141 } 142
143 // IE6 ì´íìì íê¸ê¹¨ì§ ë°©ì§ 144 if (iev != -1 && iev < 7) { 145 document.location.href = encodeURI(href); 146 } else { 147 document.location.href = href; 148 } 149 } 150} 151 152// ì¿ í¤ ì ë ¥ 153function set_cookie(name, value, expirehours, domain) 154{ 155 var today = new Date(); 156 today.setTime(today.getTime() + (60*60*1000*expirehours)); 157 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; 158 if (domain) { 159 document.cookie += "domain=" + domain + ";"; 160 } 161} 162 163// ì¿ í¤ ì»ì 164function get_cookie(name) 165{ 166 var find_sw = false; 167 var start, end; 168 var i = 0; 169 170 for (i=0; i<= document.cookie.length; i++) 171 { 172 start = i; 173 end = start + name.length; 174 175 if(document.cookie.substring(start, end) == name) 176 { 177 find_sw = true 178 break 179 } 180 } 181 182 if (find_sw == true) 183 { 184 start = end + 1; 185 end = document.cookie.indexOf(";", start); 186 187 if(end < start) 188 end = document.cookie.length; 189 190 return unescape(document.cookie.substring(start, end)); 191 } 192 return ""; 193} 194 195// ì¿ í¤ ì§ì 196function delete_cookie(name) 197{ 198 var today = new Date(); 199 200 today.setTime(today.getTime() - 1); 201 var value = get_cookie(name); 202 if(value != "") 203 document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString(); 204} 205 206var last_id = null; 207function menu(id) 208{ 209 if (id != last_id) 210 { 211 if (last_id != null) 212 document.getElementById(last_id).style.display = "none"; 213 document.getElementById(id).style.display = "block"; 214 last_id = id; 215 } 216 else 217 { 218 document.getElementById(id).style.display = "none"; 219 last_id = null; 220 } 221} 222 223function textarea_decrease(id, row) 224{ 225 if (document.getElementById(id).rows - row > 0) 226 document.getElementById(id).rows -= row; 227} 228 229function textarea_original(id, row) 230{ 231 document.getElementById(id).rows = row; 232} 233 234function textarea_increase(id, row) 235{ 236 document.getElementById(id).rows += row; 237} 238 239// ê¸ì«ì ê²ì¬ 240function check_byte(content, target) 241{ 242 var i = 0; 243 var cnt = 0; 244 var ch = ''; 245 var cont = document.getElementById(content).value; 246 247 for (i=0; i<cont.length; i++) { 248 ch = cont.charAt(i); 249 if (escape(ch).length > 4) { 250 cnt += 2; 251 } else { 252 cnt += 1; 253 } 254 } 255 // ì«ì를 ì¶ë ¥ 256 document.getElementById(target).innerHTML = cnt; 257 258 return cnt; 259} 260 261// ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ì¼ìª½ ì¢í 262function get_left_pos(obj) 263{ 264 var parentObj = null; 265 var clientObj = obj; 266 //var left = obj.offsetLeft + document.body.clientLeft; 267 var left = obj.offsetLeft; 268 269 while((parentObj=clientObj.offsetParent) != null) 270 { 271 left = left + parentObj.offsetLeft; 272 clientObj = parentObj; 273 } 274 275 return left; 276} 277 278// ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ìë¨ ì¢í 279function get_top_pos(obj) 280{ 281 var parentObj = null; 282 var clientObj = obj; 283 //var top = obj.offsetTop + document.body.clientTop; 284 var top = obj.offsetTop; 285 286 while((parentObj=clientObj.offsetParent) != null) 287 { 288 top = top + parentObj.offsetTop; 289 clientObj = parentObj; 290 } 291 292 return top; 293} 294 295function flash_movie(src, ids, width, height, wmode) 296{ 297 var wh = ""; 298 if (parseInt(width) && parseInt(height)) 299 wh = " width='"+width+"' height='"+height+"' "; 300 return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>"; 301} 302 303function obj_movie(src, ids, width, height, autostart) 304{ 305 var wh = ""; 306 if (parseInt(width) && parseInt(height)) 307 wh = " width='"+width+"' height='"+height+"' "; 308 if (!autostart) autostart = false;
309 return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>"; 310} 311 312function doc_write(cont) 313{ 314 document.write(cont); 315} 316 317var win_password_lost = function(href) { 318 window.open(href, "win_password_lost", "left=50, top=50, width=617, height=330, scrollbars=1"); 319} 320 321$(document).ready(function(){ 322 $("#login_password_lost, #ol_password_lost").click(function(){ 323 win_password_lost(this.href); 324 return false; 325 }); 326}); 327 328/** 329 * í¬ì¸í¸ ì°½ 330 **/ 331var win_point = function(href) { 332 var new_win = window.open(href, 'win_point', 'left=100,top=100,width=600, height=600, scrollbars=1'); 333 new_win.focus(); 334} 335 336/** 337 * ìª½ì§ ì°½ 338 **/ 339var win_memo = function(href) { 340 var new_win = window.open(href, 'win_memo', 'left=100,top=100,width=620,height=500,scrollbars=1'); 341 new_win.focus(); 342} 343 344/** 345 * ë©ì¼ ì°½ 346 **/ 347var win_email = function(href) { 348 var new_win = window.open(href, 'win_email', 'left=100,top=100,width=600,height=580,scrollbars=0'); 349 new_win.focus(); 350} 351 352/** 353 * ì기ìê° ì°½ 354 **/ 355var win_profile = function(href) { 356 var new_win = window.open(href, 'win_profile', 'left=100,top=100,width=620,height=510,scrollbars=1'); 357 new_win.focus(); 358} 359 360/** 361 * ì¤í¬ë© ì°½ 362 **/ 363var win_scrap = function(href) { 364 var new_win = window.open(href, 'win_scrap', 'left=100,top=100,width=600,height=600,scrollbars=1'); 365 new_win.focus(); 366} 367 368/** 369 * ííì´ì§ ì°½ 370 **/ 371var win_homepage = function(href) { 372 var new_win = window.open(href, 'win_homepage', ''); 373 new_win.focus(); 374} 375 376/** 377 * ì°í¸ë²í¸ ì°½ 378 **/ 379var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) { 380 if(typeof daum === 'undefined'){ 381 alert("ë¤ì ì°í¸ë²í¸ postcode.v2.js íì¼ì´ ë¡ëëì§ ìììµëë¤."); 382 return false; 383 } 384 385 var zip_case = 1; //0ì´ë©´ ë ì´ì´, 1ì´ë©´ íì´ì§ì ë¼ì ë£ê¸°, 2ì´ë©´ ìì°½ 386 387 var complete_fn = function(data){ 388 // íì ìì ê²ìê²°ê³¼ í목ì í´ë¦íìë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 389 390 // ê° ì£¼ìì ë ¸ì¶ ê·ì¹ì ë°ë¼ 주ì를 ì¡°í©íë¤. 391 // ë´ë ¤ì¤ë ë³ìê° ê°ì´ ìë ê²½ì°ì 공백('')ê°ì ê°ì§ë¯ë¡, ì´ë¥¼ ì°¸ê³ íì¬ ë¶ê¸° íë¤. 392 var fullAddr = ''; // ìµì¢ 주ì ë³ì 393 var extraAddr = ''; // ì¡°í©í 주ì ë³ì 394 395 // ì¬ì©ìê° ì íí 주ì íì ì ë°ë¼ í´ë¹ 주ì ê°ì ê°ì ¸ì¨ë¤. 396 if (data.userSelectedType === 'R') { // ì¬ì©ìê° ëë¡ëª 주ì를 ì ííì ê²½ì° 397 fullAddr = data.roadAddress; 398 399 } else { // ì¬ì©ìê° ì§ë² 주ì를 ì ííì ê²½ì°(J) 400 fullAddr = data.jibunAddress; 401 } 402 403 // ì¬ì©ìê° ì íí 주ìê° ëë¡ëª íì ì¼ë ì¡°í©íë¤. 404 if(data.userSelectedType === 'R'){ 405 //ë²ì ëëª ì´ ìì ê²½ì° ì¶ê°íë¤. 406 if(data.bname !== ''){ 407 extraAddr += data.bname; 408 } 409 // ê±´ë¬¼ëª ì´ ìì ê²½ì° ì¶ê°íë¤. 410 if(data.buildingName !== ''){ 411 extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); 412 } 413 // ì¡°í©í주ìì ì 무ì ë°ë¼ ì쪽ì ê´í¸ë¥¼ ì¶ê°íì¬ ìµì¢ 주ì를 ë§ë ë¤. 414 extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); 415 } 416 417 // ì°í¸ë²í¸ì 주ì ì 보를 í´ë¹ íëì ë£ê³ , 커ì를 ìì¸ì£¼ì íëë¡ ì´ëíë¤. 418 var of = document[frm_name]; 419 420 of[frm_zip].value = data.zonecode; 421 422 of[frm_addr1].value = fullAddr; 423 of[frm_addr3].value = extraAddr; 424 425 if(of[frm_jibeon] !== undefined){ 426 of[frm_jibeon].value = data.userSelectedType; 427 } 428 429 of[frm_addr2].focus(); 430 }; 431 432 switch(zip_case) { 433 case 1 : //iframeì ì´ì©íì¬ íì´ì§ì ë¼ì ë£ê¸° 434 var daum_pape_id = 'daum_juso_page'+frm_zip, 435 element_wrap = document.getElementById(daum_pape_id), 436 currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop); 437 if (element_wrap == null) { 438 element_wrap = document.createElement("div"); 439 element_wrap.setAttribute("id", daum_pape_id); 440 element_wrap.style.cssText = 'display:none;border:1px solid;left:0;width:100%;height:300px;margin:5px 0;position:relative;-webkit-overflow-scrolling:touch;'; 441 element_wrap.innerHTML = '<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="bt
441nFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-21px;z-index:1" class="close_daum_juso" alt="ì 기 ë²í¼">'; 442 jQuery('form[name="'+frm_name+'"]').find('input[name="'+frm_addr1+'"]').before(element_wrap); 443 jQuery("#"+daum_pape_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ 444 e.preventDefault(); 445 jQuery(this).parent().hide(); 446 }); 447 } 448 449 new daum.Postcode({ 450 oncomplete: function(data) { 451 complete_fn(data); 452 // iframeì ë£ì element를 ìë³´ì´ê² íë¤. 453 element_wrap.style.display = 'none'; 454 // ì°í¸ë²í¸ 찾기 íë©´ì´ ë³´ì´ê¸° ì´ì ì¼ë¡ scroll ìì¹ë¥¼ ëë린ë¤. 455 document.body.scrollTop = currentScroll; 456 }, 457 // ì°í¸ë²í¸ 찾기 íë©´ í¬ê¸°ê° ì¡°ì ëììë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 458 // iframeì ë£ì elementì ëì´ê°ì ì¡°ì íë¤. 459 onresize : function(size) { 460 element_wrap.style.height = size.height + "px"; 461 }, 462 width : '100%', 463 height : '100%' 464 }).embed(element_wrap); 465 466 // iframeì ë£ì element를 ë³´ì´ê² íë¤. 467 element_wrap.style.display = 'block'; 468 break; 469 case 2 : //ìì°½ì¼ë¡ ëì°ê¸° 470 new daum.Postcode({ 471 oncomplete: function(data) { 472 complete_fn(data); 473 } 474 }).open(); 475 break; 476 default : //iframeì ì´ì©íì¬ ë ì´ì´ ëì°ê¸° 477 var rayer_id = 'daum_juso_rayer'+frm_zip, 478 element_layer = document.getElementById(rayer_id); 479 if (element_layer == null) { 480 element_layer = document.createElement("div"); 481 element_layer.setAttribute("id", rayer_id); 482 element_layer.style.cssText = 'display:none;border:5px solid;position:fixed;width:300px;height:460px;left:50%;margin-left:-155px;top:50%;margin-top:-235px;overflow:hidden;-webkit-overflow-scrolling:touch;z-index:10000'; 483 element_layer.innerHTML = '<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px;z-index:1" class="close_daum_juso" alt="ë«ê¸° ë²í¼">'; 484 document.body.appendChild(element_layer); 485 jQuery("#"+rayer_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ 486 e.preventDefault(); 487 jQuery(this).parent().hide(); 488 }); 489 } 490 491 new daum.Postcode({ 492 oncomplete: function(data) { 493 complete_fn(data); 494 // iframeì ë£ì element를 ìë³´ì´ê² íë¤. 495 element_layer.style.display = 'none'; 496 }, 497 width : '100%', 498 height : '100%' 499 }).embed(element_layer); 500 501 // iframeì ë£ì element를 ë³´ì´ê² íë¤. 502 element_layer.style.display = 'block'; 503 } 504} 505 506/** 507 * ìë¡ì´ ë¹ë°ë²í¸ ë¶ì¤ ì°½ : 101123 508 **/ 509win_password_lost = function(href) 510{ 511 var new_win = window.open(href, 'win_password_lost', 'width=617, height=330, scrollbars=1'); 512 new_win.focus(); 513} 514 515/** 516 * ì¤ë¬¸ì¡°ì¬ ê²°ê³¼ 517 **/ 518var win_poll = function(href) { 519 var new_win = window.open(href, 'win_poll', 'width=616, height=500, scrollbars=1'); 520 new_win.focus(); 521} 522 523/** 524 * ì¤í¬ë¦°ë¦¬ë 미ì¬ì©ì를 ìí ì¤í¬ë¦½í¸ - ì§ì´ìë¹ 2013-04-22 525 * alt ê°ë§ ê°ë ê·¸ëí½ ë§í¬ì ë§ì°ì¤ì¤ë² ì title ê° ë¶ì¬, ë§ì°ì¤ìì ì title ê° ì ê±° 526 **/ 527$(function() { 528 $('a img').mouseover(function() { 529 $a_img_title = $(this).attr('alt'); 530 $(this).attr('title', $a_img_title); 531 }).mouseout(function() { 532 $(this).attr('title', ''); 533 }); 534}); 535 536/** 537 * í ì¤í¸ 리ì¬ì´ì¦ 538**/ 539function font_resize(id, rmv_class, add_class) 540{ 541 var $el = $("#"+id); 542 543 $el.removeClass(rmv_class).addClass(add_class); 544 545 set_cookie("ck_font_resize_rmv_class", rmv_class, 1, g5_cookie_domain); 546 set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain); 547} 548 549$(function(){
550 $(".win_point").click(function() { 551 win_point(this.href); 552 return false; 553 }); 554 555 $(".win_memo").click(function() { 556 win_memo(this.href); 557 return false; 558 }); 559 560 $(".win_email").click(function() { 561 win_email(this.href); 562 return false; 563 }); 564 565 $(".win_scrap").click(function() { 566 win_scrap(this.href); 567 return false; 568 }); 569 570 $(".win_profile").click(function() { 571 win_profile(this.href); 572 return false; 573 }); 574 575 $(".win_homepage").click(function() { 576 win_homepage(this.href); 577 return false; 578 }); 579 580 $(".win_password_lost").click(function() { 581 win_password_lost(this.href); 582 return false; 583 }); 584 585 /* 586 $(".win_poll").click(function() { 587 win_poll(this.href); 588 return false; 589 }); 590 */ 591 592 // ì¬ì´ëë·° 593 var sv_hide = false; 594 $(".sv_member, .sv_guest").click(function() { 595 $(".sv").removeClass("sv_on"); 596 $(this).closest(".sv_wrap").find(".sv").addClass("sv_on"); 597 }); 598 599 $(".sv, .sv_wrap").hover( 600 function() { 601 sv_hide = false;
602 }, 603 function() { 604 sv_hide = true; 605 } 606 ); 607 608 $(".sv_member, .sv_guest").focusin(function() { 609 sv_hide = false; 610 $(".sv").removeClass("sv_on"); 611 $(this).closest(".sv_wrap").find(".sv").addClass("sv_on"); 612 }); 613 614 $(".sv a").focusin(function() { 615 sv_hide = false; 616 }); 617 618 $(".sv a").focusout(function() { 619 sv_hide = true; 620 }); 621 622 // ì ë í¸ ul 623 var sel_hide = false; 624 $('.sel_btn').click(function() { 625 $('.sel_ul').removeClass('sel_on'); 626 $(this).siblings('.sel_ul').addClass('sel_on'); 627 }); 628 629 $(".sel_wrap").hover( 630 function() { 631 sel_hide = false; 632 }, 633 function() { 634 sel_hide = true; 635 } 636 ); 637 638 $('.sel_a').focusin(function() { 639 sel_hide = false; 640 }); 641 642 $('.sel_a').focusout(function() { 643 sel_hide = true; 644 }); 645 646 $(document).click(function() { 647 if(sv_hide) { // ì¬ì´ëë·° í´ì 648 $(".sv").removeClass("sv_on"); 649 } 650 if (sel_hide) { // ì ë í¸ ul í´ì 651 $('.sel_ul').removeClass('sel_on'); 652 } 653 }); 654 655 $(document).focusin(function() { 656 if(sv_hide) { // ì¬ì´ëë·° í´ì 657 $(".sv").removeClass("sv_on"); 658 } 659 if (sel_hide) { // ì ë í¸ ul í´ì 660 $('.sel_ul').removeClass('sel_on'); 661 } 662 }); 663 664 $(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){ 665 var str = $(this).val(); 666 var mx = parseInt($(this).attr("maxlength")); 667 if (str.length > mx) { 668 $(this).val(str.substr(0, mx)); 669 return false; 670 } 671 }); 672});
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.