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 data = data + ''; 74 75 var sign = data.match(/^[\+\-]/); 76 if(sign) { 77 data = data.replace(/^[\+\-]/, ""); 78 } 79 80 len = data.length; 81 mod = (len % cutlen);
82 k = cutlen - mod; 83 for (i=0; i<data.length; i++) 84 { 85 number = number + data.charAt(i); 86 87 if (i < data.length - 1) 88 { 89 k++; 90 if ((k % cutlen) == 0) 91 { 92 number = number + comma; 93 k = 0; 94 } 95 } 96 } 97 98 if(sign != null) 99 number = sign+number; 100 101 return number; 102} 103 104// ì ì°½ 105function popup_window(url, winname, opt) 106{ 107 window.open(url, winname, opt); 108} 109 110 111// í¼ë©ì¼ ì°½ 112function popup_formmail(url) 113{ 114 opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; 115 popup_window(url, "wformmail", opt); 116} 117 118// , 를 ìì¤ë¤. 119function no_comma(data) 120{ 121 var tmp = ''; 122 var comma = ','; 123 var i; 124 125 for (i=0; i<data.length; i++) 126 { 127 if (data.charAt(i) != comma) 128 tmp += data.charAt(i); 129 } 130 return tmp; 131} 132 133// ìì ê²ì¬ íì¸ 134function del(href) 135{ 136 if(confirm("íë² ìì í ìë£ë 복구í ë°©ë²ì´ ììµëë¤.\n\nì ë§ ìì íìê² ìµëê¹?")) { 137 document.location.href = href; 138 } 139} 140 141// ì¿ í¤ ì ë ¥ 142function set_cookie(name, value, expirehours, domain) 143{ 144 var today = new Date(); 145 today.setTime(today.getTime() + (60*60*1000*expirehours)); 146 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; 147 if (domain) { 148 document.cookie += "domain=" + domain + ";"; 149 } 150} 151 152// ì¿ í¤ ì»ì 153function get_cookie(name) 154{ 155 var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)')); 156 if (match) return unescape(match[2]); 157 return ""; 158} 159 160// ì¿ í¤ ì§ì 161function delete_cookie(name) 162{ 163 var today = new Date(); 164 165 today.setTime(today.getTime() - 1); 166 var value = get_cookie(name); 167 if(value != "") 168 document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString(); 169} 170 171var last_id = null; 172function menu(id) 173{ 174 if (id != last_id) 175 { 176 if (last_id != null) 177 document.getElementById(last_id).style.display = "none"; 178 document.getElementById(id).style.display = "block"; 179 last_id = id; 180 } 181 else 182 { 183 document.getElementById(id).style.display = "none"; 184 last_id = null; 185 } 186} 187 188function textarea_decrease(id, row) 189{ 190 if (document.getElementById(id).rows - row > 0) 191 document.getElementById(id).rows -= row; 192} 193 194function textarea_original(id, row) 195{ 196 document.getElementById(id).rows = row; 197} 198 199function textarea_increase(id, row) 200{ 201 document.getElementById(id).rows += row; 202} 203 204// ê¸ì«ì ê²ì¬ 205function check_byte(content, target) 206{ 207 var i = 0; 208 var cnt = 0; 209 var ch = ''; 210 var cont = document.getElementById(content).value; 211 212 for (i=0; i<cont.length; i++) { 213 ch = cont.charAt(i); 214 if (escape(ch).length > 4) { 215 cnt += 2; 216 } else { 217 cnt += 1; 218 } 219 } 220 // ì«ì를 ì¶ë ¥ 221 document.getElementById(target).innerHTML = cnt; 222 223 return cnt; 224} 225 226// ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ì¼ìª½ ì¢í 227function get_left_pos(obj) 228{ 229 var parentObj = null; 230 var clientObj = obj; 231 //var left = obj.offsetLeft + document.body.clientLeft; 232 var left = obj.offsetLeft; 233 234 while((parentObj=clientObj.offsetParent) != null) 235 { 236 left = left + parentObj.offsetLeft; 237 clientObj = parentObj; 238 } 239 240 return left; 241} 242 243// ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ìë¨ ì¢í 244function get_top_pos(obj) 245{ 246 var parentObj = null; 247 var clientObj = obj; 248 //var top = obj.offsetTop + document.body.clientTop; 249 var top = obj.offsetTop; 250 251 while((parentObj=clientObj.offsetParent) != null) 252 { 253 top = top + parentObj.offsetTop; 254 clientObj = parentObj; 255 } 256 257 return top; 258} 259 260function flash_movie(src, ids, width, height, wmode) 261{ 262 var wh = ""; 263 if (parseInt(width) && parseInt(height)) 264 wh = " width='"+width+"' height='"+height+"' "; 265 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>"; 266} 267 268function obj_movie(src, ids, width, height, autostart) 269{ 270 var wh = ""; 271 if (parseInt(width) && parseInt(height)) 272 wh = " width='"+width+"' height='"+height+"' "; 273 if (!autostart) autostart = false;
274 return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>"; 275} 276 277function doc_write(cont) 278{ 279 document.write(cont); 280} 281 282var win_password_lost = function(href) { 283 window.open(href, "win_password_lost", "left=50, top=50, width=617, height=330, scrollbars=1"); 284} 285 286$(document).ready(function(){ 287 $("#login_password_lost, #ol_password_lost").click(function(){ 288 win_password_lost(this.href); 289 return false; 290 }); 291}); 292 293/** 294 * í¬ì¸í¸ ì°½ 295 **/ 296var win_point = function(href) { 297 var new_win = window.open(href, 'win_point', 'left=100,top=100,width=600, height=600, scrollbars=1'); 298 new_win.focus(); 299} 300 301/** 302 * ìª½ì§ ì°½ 303 **/ 304var win_memo = function(href) { 305 var new_win = window.open(href, 'win_memo', 'left=100,top=100,width=620,height=500,scrollbars=1'); 306 new_win.focus(); 307} 308 309/** 310 * ìª½ì§ ì°½ 311 **/ 312var check_goto_new = function(href, event) { 313 if( !(typeof g5_is_mobile != "undefined" && g5_is_mobile) ){ 314 if (window.opener && window.opener.document && window.opener.document.getElementById) { 315 event.preventDefault ? event.preventDefault() : (event.returnValue = false); 316 window.open(href); 317 //window.opener.document.location.href = href; 318 } 319 } 320} 321 322/** 323 * ë©ì¼ ì°½ 324 **/ 325var win_email = function(href) { 326 var new_win = window.open(href, 'win_email', 'left=100,top=100,width=600,height=580,scrollbars=1'); 327 new_win.focus(); 328} 329 330/** 331 * ì기ìê° ì°½ 332 **/ 333var win_profile = function(href) { 334 var new_win = window.open(href, 'win_profile', 'left=100,top=100,width=620,height=510,scrollbars=1'); 335 new_win.focus(); 336} 337 338/** 339 * ì¤í¬ë© ì°½ 340 **/ 341var win_scrap = function(href) { 342 var new_win = window.open(href, 'win_scrap', 'left=100,top=100,width=600,height=600,scrollbars=1'); 343 new_win.focus(); 344} 345 346/** 347 * ííì´ì§ ì°½ 348 **/ 349var win_homepage = function(href) { 350 var new_win = window.open(href, 'win_homepage', ''); 351 new_win.focus(); 352} 353 354/** 355 * ì°í¸ë²í¸ ì°½ 356 **/ 357var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) { 358 if(typeof daum === "undefined"){ 359 alert("KAKAO ì°í¸ë²í¸ ìë¹ì¤ postcode.v2.js íì¼ì´ ë¡ëëì§ ìììµëë¤."); 360 return false; 361 } 362 363 // íì¹ ì¤ íì ì ê±° 364 var vContent = "width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10"; 365 $("#meta_viewport").attr("content", vContent + ",user-scalable=no"); 366 367 var zip_case = 1; //0ì´ë©´ ë ì´ì´, 1ì´ë©´ íì´ì§ì ë¼ì ë£ê¸°, 2ì´ë©´ ìì°½ 368 369 var complete_fn = function(data){ 370 // íì ìì ê²ìê²°ê³¼ í목ì í´ë¦íìë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 371 372 // ê° ì£¼ìì ë ¸ì¶ ê·ì¹ì ë°ë¼ 주ì를 ì¡°í©íë¤. 373 // ë´ë ¤ì¤ë ë³ìê° ê°ì´ ìë ê²½ì°ì 공백('')ê°ì ê°ì§ë¯ë¡, ì´ë¥¼ ì°¸ê³ íì¬ ë¶ê¸° íë¤. 374 var fullAddr = ''; // ìµì¢ 주ì ë³ì 375 var extraAddr = ''; // ì¡°í©í 주ì ë³ì 376 377 // ì¬ì©ìê° ì íí 주ì íì ì ë°ë¼ í´ë¹ 주ì ê°ì ê°ì ¸ì¨ë¤. 378 if (data.userSelectedType === 'R') { // ì¬ì©ìê° ëë¡ëª 주ì를 ì ííì ê²½ì° 379 fullAddr = data.roadAddress; 380 381 } else { // ì¬ì©ìê° ì§ë² 주ì를 ì ííì ê²½ì°(J) 382 fullAddr = data.jibunAddress; 383 } 384 385 // ì¬ì©ìê° ì íí 주ìê° ëë¡ëª íì ì¼ë ì¡°í©íë¤. 386 if(data.userSelectedType === 'R'){ 387 //ë²ì ëëª ì´ ìì ê²½ì° ì¶ê°íë¤. 388 if(data.bname !== ''){ 389 extraAddr += data.bname; 390 } 391 // ê±´ë¬¼ëª ì´ ìì ê²½ì° ì¶ê°íë¤. 392 if(data.buildingName !== ''){ 393 extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); 394 } 395 // ì¡°í©í주ìì ì 무ì ë°ë¼ ì쪽ì ê´í¸ë¥¼ ì¶ê°íì¬ ìµì¢ 주ì를 ë§ë ë¤. 396 extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); 397 } 398 399 // ì°í¸ë²í¸ì 주ì ì 보를 í´ë¹ íëì ë£ê³ , 커ì를 ìì¸ì£¼ì íëë¡ ì´ëíë¤. 400 var of = document[frm_name]; 401 402 of[frm_zip].value = data.zonecode; 403 404 of[frm_addr1].value = fullAddr; 405 of[frm_addr3].value = extraAddr; 406 407 if(of[frm_jibeon] !== undefined){ 408 of[frm_jibeon].value = data.userSelectedType; 409 } 410 411 setTimeout(function(){ 412 $("#meta_viewport").attr("content", vContent); 413 of[frm_addr2].focus(); 414 } , 100); 415 }; 416 417 switch(zip_case) { 418 case 1 : //iframeì ì´ì©íì¬ íì´ì§ì ë¼ì ë£ê¸° 419 var daum_pape_id = 'daum_juso_page'+frm_zip, 420 element_wrap = document.getElementById(daum_pape_id), 421 currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop); 422 if (element_wrap == null) { 423 element_wrap = document.createElement("div"); 424 element_wrap.setAttribute("id", daum_pape_id); 425 element_wrap.style.cssText = 'display:none;border:1px solid;left:0;width:100%;height:300px;margin:5px 0;position:relative;-webkit-overflow-scrolling:touch;'; 426 element_wrap.innerHTML = '<img src="//t1.daumcdn.net/
426postcode/resource/images/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-21px;z-index:1" class="close_daum_juso" alt="ì 기 ë²í¼">'; 427 jQuery('form[name="'+frm_name+'"]').find('input[name="'+frm_addr1+'"]').before(element_wrap); 428 jQuery("#"+daum_pape_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ 429 e.preventDefault(); 430 $("#meta_viewport").attr("content", vContent); 431 jQuery(this).parent().hide(); 432 }); 433 } 434 435 new daum.Postcode({ 436 oncomplete: function(data) { 437 complete_fn(data); 438 // iframeì ë£ì element를 ìë³´ì´ê² íë¤. 439 element_wrap.style.display = 'none'; 440 // ì°í¸ë²í¸ 찾기 íë©´ì´ ë³´ì´ê¸° ì´ì ì¼ë¡ scroll ìì¹ë¥¼ ëë린ë¤. 441 document.body.scrollTop = currentScroll; 442 }, 443 // ì°í¸ë²í¸ 찾기 íë©´ í¬ê¸°ê° ì¡°ì ëììë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 444 // iframeì ë£ì elementì ëì´ê°ì ì¡°ì íë¤. 445 onresize : function(size) { 446 element_wrap.style.height = size.height + "px"; 447 }, 448 maxSuggestItems : g5_is_mobile ? 6 : 10, 449 width : '100%', 450 height : '100%' 451 }).embed(element_wrap); 452 453 // iframeì ë£ì element를 ë³´ì´ê² íë¤. 454 element_wrap.style.display = 'block'; 455 break; 456 case 2 : //ìì°½ì¼ë¡ ëì°ê¸° 457 new daum.Postcode({ 458 oncomplete: function(data) { 459 complete_fn(data); 460 } 461 }).open(); 462 break; 463 default : //iframeì ì´ì©íì¬ ë ì´ì´ ëì°ê¸° 464 var rayer_id = 'daum_juso_rayer'+frm_zip, 465 element_layer = document.getElementById(rayer_id); 466 if (element_layer == null) { 467 element_layer = document.createElement("div"); 468 element_layer.setAttribute("id", rayer_id); 469 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'; 470 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="ë«ê¸° ë²í¼">'; 471 document.body.appendChild(element_layer); 472 jQuery("#"+rayer_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ 473 e.preventDefault(); 474 $("#meta_viewport").attr("content", vContent); 475 jQuery(this).parent().hide(); 476 }); 477 } 478 479 new daum.Postcode({ 480 oncomplete: function(data) { 481 complete_fn(data); 482 // iframeì ë£ì element를 ìë³´ì´ê² íë¤. 483 element_layer.style.display = 'none'; 484 }, 485 maxSuggestItems : g5_is_mobile ? 6 : 10, 486 width : '100%', 487 height : '100%' 488 }).embed(element_layer); 489 490 // iframeì ë£ì element를 ë³´ì´ê² íë¤. 491 element_layer.style.display = 'block'; 492 } 493} 494 495/** 496 * ìë¡ì´ ë¹ë°ë²í¸ ë¶ì¤ ì°½ : 101123 497 **/ 498win_password_lost = function(href) 499{ 500 var new_win = window.open(href, 'win_password_lost', 'width=617, height=330, scrollbars=1'); 501 new_win.focus(); 502} 503 504/** 505 * ì¤ë¬¸ì¡°ì¬ ê²°ê³¼ 506 **/ 507var win_poll = function(href) { 508 var new_win = window.open(href, 'win_poll', 'width=616, height=500, scrollbars=1'); 509 new_win.focus(); 510} 511 512/** 513 * ì¿ í° 514 **/ 515var win_coupon = function(href) { 516 var new_win = window.open(href, "win_coupon", "left=100,top=100,width=700, height=600, scrollbars=1"); 517 new_win.focus(); 518} 519 520 521/** 522 * ì¤í¬ë¦°ë¦¬ë 미ì¬ì©ì를 ìí ì¤í¬ë¦½í¸ - ì§ì´ìë¹ 2013-04-22 523 * alt ê°ë§ ê°ë ê·¸ëí½ ë§í¬ì ë§ì°ì¤ì¤ë² ì title ê° ë¶ì¬, ë§ì°ì¤ìì ì title ê° ì ê±° 524 **/ 525$(function() { 526 $('a img').mouseover(function() { 527 $a_img_title = $(this).attr('alt'); 528 $(this).attr('title', $a_img_title); 529 }).mouseout(function() { 530 $(this).attr('title', ''); 531 }); 532}); 533 534/** 535 * í ì¤í¸ 리ì¬ì´ì¦ 536**/ 537function font_resize(id, rmv_class, add_class, othis) 538{ 539 var $el = $("#"+id); 540 541 if((typeof rmv_class !== "undefined" && rmv_class) || (typeof add_class !== "undefined" && add_class)){ 542 $el.removeClass(rmv_class).addClass(add_class); 543 544 set_cookie("ck_font_resize_rmv_class", rmv_class, 1, g5_cookie_domain); 545 set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain); 546 } 547 548 if(typeof othis !== "undefined"){ 549 $(othis).addClass('select').siblings().removeClass('select'); 550 } 551} 552 553/** 554 * ëê¸ ìì í í° 555**/ 556function set_comment_token(f) 557{ 558 if(typeof f.token === "undefined") 559 $(f).prepend('<input type="hidden" name="token" value="">'); 560 561 $.ajax({ 562 url: g5_bbs_url+"/ajax.comment_token.php", 563 type: "GET", 564 dataType: "json", 565 async: false, 566 cache: false, 567 success: function(data, textStatus) { 568 f.token.value = data.token; 569 } 570 }); 571} 572 573$(function(){
574 $(".win_point").click(function() { 575 win_point(this.href); 576 return false; 577 }); 578 579 $(".win_memo").click(function() { 580 win_memo(this.href); 581 return false; 582 }); 583 584 $(".win_email").click(function() { 585 win_email(this.href); 586 return false; 587 }); 588 589 $(".win_scrap").click(function() { 590 win_scrap(this.href); 591 return false; 592 }); 593 594 $(".win_profile").click(function() { 595 win_profile(this.href); 596 return false; 597 }); 598 599 $(".win_homepage").click(function() { 600 win_homepage(this.href); 601 return false; 602 }); 603 604 $(".win_password_lost").click(function() { 605 win_password_lost(this.href); 606 return false; 607 }); 608 609 /* 610 $(".win_poll").click(function() { 611 win_poll(this.href); 612 return false; 613 }); 614 */ 615 616 $(".win_coupon").click(function() { 617 win_coupon(this.href); 618 return false; 619 }); 620 621 // ì¬ì´ëë·° 622 var sv_hide = false; 623 $(".sv_member, .sv_guest").click(function() { 624 $(".sv").removeClass("sv_on"); 625 $(this).closest(".sv_wrap").find(".sv").addClass("sv_on"); 626 }); 627 628 $(".sv, .sv_wrap").hover( 629 function() { 630 sv_hide = false;
631 }, 632 function() { 633 sv_hide = true; 634 } 635 ); 636 637 $(".sv_member, .sv_guest").focusin(function() { 638 sv_hide = false; 639 $(".sv").removeClass("sv_on"); 640 $(this).closest(".sv_wrap").find(".sv").addClass("sv_on"); 641 }); 642 643 $(".sv a").focusin(function() { 644 sv_hide = false; 645 }); 646 647 $(".sv a").focusout(function() { 648 sv_hide = true; 649 }); 650 651 // ì ë í¸ ul 652 var sel_hide = false; 653 $('.sel_btn').click(function() { 654 $('.sel_ul').removeClass('sel_on'); 655 $(this).siblings('.sel_ul').addClass('sel_on'); 656 }); 657 658 $(".sel_wrap").hover( 659 function() { 660 sel_hide = false; 661 }, 662 function() { 663 sel_hide = true; 664 } 665 ); 666 667 $('.sel_a').focusin(function() { 668 sel_hide = false; 669 }); 670 671 $('.sel_a').focusout(function() { 672 sel_hide = true; 673 }); 674 675 $(document).click(function() { 676 if(sv_hide) { // ì¬ì´ëë·° í´ì 677 $(".sv").removeClass("sv_on"); 678 } 679 if (sel_hide) { // ì ë í¸ ul í´ì 680 $('.sel_ul').removeClass('sel_on'); 681 } 682 }); 683 684 $(document).focusin(function() { 685 if(sv_hide) { // ì¬ì´ëë·° í´ì 686 $(".sv").removeClass("sv_on"); 687 } 688 if (sel_hide) { // ì ë í¸ ul í´ì 689 $('.sel_ul').removeClass('sel_on'); 690 } 691 }); 692 693 $(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){ 694 var str = $(this).val(); 695 var mx = parseInt($(this).attr("maxlength")); 696 if (str.length > mx) { 697 $(this).val(str.substr(0, mx)); 698 return false; 699 } 700 }); 701}); 702 703function get_write_token(bo_table) 704{ 705 var token = ""; 706 707 $.ajax({ 708 type: "POST", 709 url: g5_bbs_url+"/write_token.php", 710 data: { bo_table: bo_table }, 711 cache: false, 712 async: false, 713 dataType: "json", 714 success: function(data) { 715 if(data.error) { 716 alert(data.error); 717 if(data.url) 718 document.location.href = data.url; 719 720 return false; 721 } 722 723 token = data.token; 724 } 725 }); 726 727 return token; 728} 729 730$(function() { 731 $(document).on("click", "form[name=fwrite] input:submit, form[name=fwrite] button:submit, form[name=fwrite] input:image", function() { 732 var f = this.form; 733 734 if (typeof(f.bo_table) == "undefined") { 735 return; 736 } 737 738 var bo_table = f.bo_table.value; 739 var token = get_write_token(bo_table); 740 741 if(!token) { 742 alert("í í° ì ë³´ê° ì¬ë°ë¥´ì§ ììµëë¤."); 743 return false; 744 } 745 746 var $f = $(f); 747 748 if(typeof f.token === "undefined") 749 $f.prepend('<input type="hidden" name="token" value="">'); 750 751 $f.find("input[name=token]").val(token); 752 753 return true; 754 }); 755}); 756 757// 견ì ìì² ì¤í¬ë¦½í¸ 758 759function addComma(value){ 760 value = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); 761 return value; 762} 763 764$(document).on("click", ".phase input[type='checkbox']", function() 765{ 766 var _name = $(this).attr("name"); 767 var _target = $("input[name='" + _name + "']"); 768 var _opList = ""; 769 var _price = _totalPrice = _count = 0; 770 771 $.each(_target, function(index, item) 772 { 773 if($(item).is(":checked") === true) 774 { 775 _price = addComma($(this).data("op-price")); 776 _opList += '<li>'; 777 _opList += '<p>' + $(item).data("op-name") + '</p>'; 778 _opList += '<span>' + _price + ' ì</span>'; 779 _opList += '</li>'; 780 781 _count++; 782 783 _totalPrice += parseInt($(this).data("op-price")); 784 } 785 }); 786 787 $(".optionList").empty().append(_opList); 788 789 if(_count > 0) 790 { 791 $(".listBox.chkInput.last").addClass("pb15vh"); 792 $(".hideOption").addClass("active"); 793 } 794 else 795 { 796 $(".listBox.chkInput.last").removeClass("pb15vh"); 797 $(".hideOption").removeClass("active"); 798 } 799 800 $(".optionTotal").html(addComma(_totalPrice) + " ì"); 801 $(".allTotal").html(addComma(_totalPrice + 123123123) + " ì"); 802}); 803 804$(document).on("click", ".expectWrap h4", function() 805{ 806 $(".totalWrap").toggleClass("active"); 807 $(".listBox.chkInput.last").toggleClass("pb55vh"); 808}); 809 810$(document).on("click", ".commentWrap dt", function() 811{ 812 var _target = $(this).parent(".comment"); 813 _target.children("dd").toggleClass("active"); 814}); 815 816// active ê³µíµ ì¬ì©ì ìí function 817$(document).on("click", "[data-active]", function(e) 818{ 819 e.stopPropagation(); 820 821 var $_trigger = $(this); 822 var $_parent = $_trigger.closest("[data-active='parent']"); 823 var $_target = $_parent.find("[data-active='target']"); 824 var $_arrow = $_parent.find("[data-active='arrow']"); 825 826 if($_arrow) 827 { 828 $_arrow.toggleClass("arrow-spin"); 829 } 830 831 $_target.toggleClass("active"); 832}); 833 834function stage_ajax(f) 835{ 836 $.ajax({ 837 url : g5_url + "/ajax/stage.ajax.php", 838 cache : false, 839 type : 'post', 840 data : { 841 'form' : f 842 }, 843 success : function(data) 844 { 845 // console.log(data); 846 if(data === '1') 847 { 848 $("#stageForm").submit(); 849 } 850 }, 851 error : function(request, status, error) 852 { 853 console.log("request : " + request + " <br />status : " + status + " <br />error : " + error); 854 } 855 }); 856} 857 858$(document).on("click", "#header #slideBtn", function(e) 859{ 860 e.preventDefault(); 861 $("#slideMenu, #slideBg").addClass("active"); 862}); 863 864$(document).on("click", "#slideMenu .info .close-anchor", function(e) 865{ 866 e.preventDefault(); 867 $("#slideMenu, #slideBg").removeClass("active"); 868}); 869 870visual = { 871 'init' : function() { 872 this.action(); 873 }, 874 'action' : function() { 875 var $ele = { 876 'main' : $('.mainSlide .roll'), 877 'menu' : $('#slideMenu .banner .roll'), 878 'chart' : $('.mainChart .roll'), 879 'ranking' : $('.mainRanking .roll'), 880 'mypage' : $('.mypageSlide .roll'), 881 'event' : $('.eventVisual .roll'), 882 'montly_rental' : $(".slideWrap .slide-common .roll"), 883 'sibling' : $(".slideWrap .sibling .roll"), 884 } 885 886 var rolling = function() { 887 $ele.main.slick({ 888 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 889 'dots': true, // íì¬ ì¬ë¼ì´ë íì ì 890 'fade': false, // íì´ë íì±í 891 'infinite': true, // 무í 루í 892 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 893 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 894 'arrows': false, // íì´í í기 895 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 896 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 897 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 898 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 899 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 900 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 901 // 'cssEase': 'ease', // css 모ì í¨ì 902 'zIndex' : 80, 903 'customPaging' : function(slider,i){ 904 $('#mainDot #totalDot').text("/ " + slider.slideCount); 905 },
906 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 907 // ë°ìí ì¼ ë ì¬ì© 908 // 'responsive': [{ 909 // 'breakpoint': 1400, 910 // 'settings': { 911 // 'slidesToShow': 3, 912 // 'infinite': true 913 // } 914 // }] 915 }); 916 917 $ele.menu.slick({ 918 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 919 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 920 'fade': false, // íì´ë íì±í 921 'infinite': true, // 무í 루í 922 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 923 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 924 'arrows': false, // íì´í í기 925 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 926 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 927 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 928 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 929 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 930 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 931 // 'cssEase': 'ease', // css 모ì í¨ì 932 'zIndex' : 80, 933 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 934 // ë°ìí ì¼ ë ì¬ì© 935 // 'responsive': [{ 936 // 'breakpoint': 1400, 937 // 'settings': { 938 // 'slidesToShow': 3, 939 // 'infinite': true 940 // } 941 // }] 942 }); 943 944 $ele.chart.slick({ 945 'vertical': true, // ì¬ë¼ì´ë를 ìì§ ë°©í¥ì¼ë¡ ë긴ë¤. 946 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 947 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 948 'fade': false, // íì´ë íì±í 949 'infinite': true, // 무í 루í 950 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 951 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 952 'arrows': false, // íì´í í기 953 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 954 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 955 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 956 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 957 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 958 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 959 // 'cssEase': 'ease', // css 모ì í¨ì 960 'zIndex' : 80, 961 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 962 // ë°ìí ì¼ ë ì¬ì© 963 // 'responsive': [{ 964 // 'breakpoint': 1400, 965 // 'settings': { 966 // 'slidesToShow': 3, 967 // 'infinite': true 968 // } 969 // }] 970 }); 971 972 $ele.ranking.slick({ 973 'vertical': false, // ì¬ë¼ì´ë를 ìì§ ë°©í¥ì¼ë¡ ë긴ë¤. 974 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 975 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 976 'fade': false, // íì´ë íì±í 977 'infinite': true, // 무í 루í 978 'slidesToShow': 3, // íë²ì íìí ì¬ë¼ì´ë ì 979 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 980 'arrows': false, // íì´í í기 981 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 982 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 983 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 984 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 985 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 986 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 987 // 'cssEase': 'ease', // css 모ì í¨ì 988 'zIndex' : 80,
989 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 990 // ë°ìí ì¼ ë ì¬ì© 991 // 'responsive': [{ 992 // 'breakpoint': 1400, 993 // 'settings': { 994 // 'slidesToShow': 3, 995 // 'infinite': true 996 // } 997 // }] 998 }); 999 1000 $ele.mypage.slick({ 1001 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 1002 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 1003 'fade': false, // íì´ë íì±í 1004 'infinite': true, // 무í 루í 1005 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 1006 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 1007 'arrows': false, // íì´í í기 1008 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 1009 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 1010 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 1011 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 1012 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 1013 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 1014 // 'cssEase': 'ease', // css 모ì í¨ì 1015 'zIndex' : 80, 1016 // 'customPaging' : function(slider,i){ 1017 // $('#mainDot #totalDot').text("/ " + slider.slideCount); 1018 // }, 1019 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 1020 // ë°ìí ì¼ ë ì¬ì© 1021 // 'responsive': [{ 1022 // 'breakpoint': 1400, 1023 // 'settings': { 1024 // 'slidesToShow': 3, 1025 // 'infinite': true 1026 // } 1027 // }] 1028 }); 1029 1030 $ele.event.slick({ 1031 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 1032 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 1033 'fade': false, // íì´ë íì±í 1034 'infinite': true, // 무í 루í 1035 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 1036 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 1037 'arrows': false, // íì´í í기 1038 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 1039 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 1040 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 1041 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 1042 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 1043 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 1044 // 'cssEase': 'ease', // css 모ì í¨ì 1045 'zIndex' : 80, 1046 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 1047 // ë°ìí ì¼ ë ì¬ì© 1048 // 'responsive': [{ 1049 // 'breakpoint': 1400, 1050 // 'settings': { 1051 // 'slidesToShow': 3, 1052 // 'infinite': true 1053 // } 1054 // }] 1055 }); 1056 1057 $ele.montly_rental.slick({ 1058 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 1059 'dots': true, // íì¬ ì¬ë¼ì´ë íì ì 1060 'appendDots' : $(".slideWrap .navWrap"), 1061 'customPaging' : function (slider, i) { 1062 var thumb = $(slider.$slides[i]).data(); 1063 if (i == '0') { 1064 i = "<span></span><p>견ì ìì²</p>"; 1065 } else if (i == '1') { 1066 i = "<span></span>
1066<p>ëê¸ íì¸</p>"; 1067 } else if (i == '2') { 1068 i = "<span></span><p>íì´ì¹´ ì ì²</p>"; 1069 } else if (i == '3') { 1070 i = "<span></span><p>ì ì²íí©</p>"; 1071 } 1072 return i; 1073 }, 1074 'fade': false, // íì´ë íì±í 1075 'infinite': true, // 무í 루í 1076 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 1077 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 1078 'arrows': false, // íì´í í기 1079 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 1080 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 1081 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 1082 'autoplaySpeed': 5000, // ìë ì í ìë 1000 = 1ì´ 1083 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 1084 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 1085 'asNavFor' : '.sibling .roll', 1086 // 'cssEase': 'ease', // css 모ì í¨ì 1087 'zIndex' : 80, 1088 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 1089 // ë°ìí ì¼ ë ì¬ì© 1090 // 'responsive': [{ 1091 // 'breakpoint': 1400, 1092 // 'settings': { 1093 // 'slidesToShow': 3, 1094 // 'infinite': true 1095 // } 1096 // }] 1097 }); 1098 1099 $ele.sibling.slick({ 1100 'initialSlide': 0, // ì´ê¸° ì¬ë¼ì´ë 1101 'dots': false, // íì¬ ì¬ë¼ì´ë íì ì 1102 'fade': false, // íì´ë íì±í 1103 'infinite': true, // 무í 루í 1104 'slidesToShow': 1, // íë²ì íìí ì¬ë¼ì´ë ì 1105 'slidesToScroll': 1, // íë²ì ì¤í¬ë¡¤í ì¬ë¼ì´ë ì 1106 'arrows': false, // íì´í í기 1107 'swipe': true, // í°ì¹ ì¬ë¼ì´ë 1108 // 'speed': 3000, // ì í ìë 1000 = 1ì´ 1109 'autoplay': true, // ì¬ë¼ì´ë ìë ì í 1110 'autoplaySpeed': 3000, // ìë ì í ìë 1000 = 1ì´ 1111 'centerMode': false, // ì¤ì 보기 íì±í. íì ë²í¸ì SlidesToShow ê°ìì í¨ê» ì¬ì© 1112 'centerPadding': 0, // ì¤ì 보기 ì¼ ë, 측면 í¨ë© ê° 1113 // 'cssEase': 'ease', // css 모ì í¨ì 1114 'asNavFor' : '.slide-common .roll', 1115 'zIndex' : 80, 1116 'focusOnSelect': false, // click ì í ììì í¬ì»¤ì¤ íì±í 1117 // ë°ìí ì¼ ë ì¬ì© 1118 // 'responsive': [{ 1119 // 'breakpoint': 1400, 1120 // 'settings': { 1121 // 'slidesToShow': 3, 1122 // 'infinite': true 1123 // } 1124 // }] 1125 }); 1126 1127 $ele.main.on('afterChange', function(event, slick, currentSlide, nextSlide) { 1128 var idx = currentSlide + 1; 1129 1130 $('.mainSlide #mainDot #nowDot').text(idx); 1131 }); 1132 } 1133 1134 rolling(); 1135 } 1136} 1137 1138ajaxpop = { 1139 'init' : function(){ 1140 this.action(); 1141 }, 1142 'action' : function(){ 1143 var $ele = { 1144 'btn' : $('*[data-ajaxpop]'), 1145 'pop' : $('<div id="rgpopup"></div>'), 1146 'bg' : $('<div id="popupBG"></div>') 1147 } 1148 //open 1149 $ele.btn.on({ 1150 'click' : function(e){ 1151 e.preventDefault(); 1152 var src = $(this).data('ajaxpop'); 1153 $('body') 1154 .append($ele.bg) 1155 .append($ele.pop); 1156 $('#rgpopup').load(src,function(){ 1157 $('#rgpopup').addClass('on'); 1158 $('#popupBG').addClass('on'); 1159 }); 1160 } 1161 }); 1162 1163 //close 1164 $(document).on('click','#rgpopup .anchor-close, #popupBG',function(e){ 1165 e.preventDefault(); 1166 $('#rgpopup').removeClass('on').remove(); 1167 $('#popupBG').removeClass('on').remove(); 1168 }) 1169 1170 } 1171} 1172 1173$(function(){ 1174 ajaxpop.init(); 1175}) 1176 1177 1178 1179function checkEmail() 1180{ 1181 var regexp = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; 1182 let _parent = $("#email"), 1183 _input = $("#reg_mb_id"); 1184 1185 if(!regexp.test(_input.val())) 1186 { 1187 _parent.find(".notify-fail").html("ì´ë©ì¼ íìì ë§ê²
1187 ì ë ¥í´ì£¼ì¸ì."); 1188 _parent.find(".notify-fail").addClass("active"); 1189 1190 return false; 1191 } 1192 else 1193 { 1194 if(ajaxCall("email", _input.val()) == "ok") 1195 { 1196 _input.addClass("readonly"); 1197 _parent.find(".notify-fail").removeClass("active"); 1198 1199 return true; 1200 } 1201 else 1202 { 1203 _parent.find(".notify-fail").html("ì¤ë³µë ìì´ë ì ëë¤."); 1204 _parent.find(".notify-fail").addClass("active"); 1205 1206 return false; 1207 } 1208 } 1209} 1210 1211function checkPassword() 1212{ 1213 let pwd1 = $("input[name='mb_password']"), 1214 pwd2 = $("input[name='mb_password_re']"); 1215 1216 if(!/^[a-zA-Z0-9!@#$%^&*()?_~]{8,20}$/.test(pwd1.val())) 1217 { 1218 $("#password .first .notify").removeClass("active"); 1219 $("#password .first .notify-fail").addClass("active"); 1220 return false; 1221 } 1222 else if(!/^[a-zA-Z0-9!@#$%^&*()?_~]{8,20}$/.test(pwd2.val())) 1223 { 1224 $("#password .second .notify").removeClass("active"); 1225 $("#password .second .notify-fail").html("8~20ìì ì문, ì«ì, í¹ì문ì를 ëê°ì§ ì´ì ì¡°í©í´ 주ì¸ì."); 1226 $("#password .second .notify-fail").addClass("active"); 1227 return false; 1228 } 1229 else if(pwd1.val() != pwd2.val()) 1230 { 1231 $("#password .second").find(".notify-fail").html("ë¹ë°ë²í¸ê° ë¤ë¦ ëë¤."); 1232 $("#password .second").find(".notify-fail").addClass("active"); 1233 return false; 1234 } 1235 1236 var chk = 0; 1237 if(pwd1.val().search(/[0-9]/g) != -1) chk ++; 1238 if(pwd1.val().search(/[a-z]/ig) != -1) chk ++; 1239 if(pwd1.val().search(/[!@#$%^&*()?_~]/g) != -1) chk ++; 1240 1241 var chk2 = 0; 1242 if(pwd2.val().search(/[0-9]/g) != -1) chk2++; 1243 if(pwd2.val().search(/[a-z]/ig) != -1) chk2++; 1244 if(pwd2.val().search(/[!@#$%^&*()?_~]/g) != -1) chk2++; 1245 1246 if(chk < 2) 1247 { 1248 $("#password .first .notify").removeClass("active"); 1249 $("#password .first .notify-fail").html("8~20ìì ì문, ì«ì, í¹ì문ì를 ëê°ì§ ì´ì ì¡°í©í´ 주ì¸ì."); 1250 $("#password .first .notify-fail").addClass("active"); 1251 1252 return false; 1253 } 1254 else if(chk2 < 2) 1255 { 1256 $("#password .second .notify").removeClass("active"); 1257 $("#password .second .notify-fail").html("8~20ìì ì문, ì«ì, í¹ì문ì를 ëê°ì§ ì´ì ì¡°í©í´ 주ì¸ì."); 1258 $("#password .second .notify-fail").addClass("active"); 1259 1260 return false; 1261 } 1262 else if(pwd1.val() == pwd2.val()) 1263 { 1264 $("#password .first, #password .second").find(".notify-fail").removeClass("active"); 1265 $("input[name='mb_password'], input[name='mb_password_re']").addClass("readonly"); 1266 return true; 1267 } 1268} 1269 1270function checkName() 1271{ 1272 var regexp = /^[ê°-í£]+$/; //íê¸ 1273 let name = $("input[name='mb_name']"); 1274 1275 if(!regexp.test(name.val())) 1276 { 1277 $("#name .notify-fail").html("ì´ë¦ì íê¸ë¡ ì ë ¥í´ì£¼ì¸ì."); 1278 $("#name .notify-fail").addClass("active"); 1279 1280 return false; 1281 } 1282 else 1283 { 1284 $("#name .notify-fail").removeClass("active"); 1285 name.addClass("readonly"); 1286 1287 return true; 1288 } 1289} 1290 1291function checkNickname() 1292{ 1293 var regexp = /^[ê°-í£a-zA-Z0-9]+$/; //íê¸+ì문+ì«ì 1294 let nick = $("input[name='mb_nick']"); 1295 1296 if(!regexp.test(nick.val())) 1297 { 1298 $("#nick .notify-fail").html("íê¸, ì문, ì«ì ì¡°í©ë§ ì¬ì© ê°ë¥í©ëë¤."); 1299 $("#nick .notify-fail").addClass("active"); 1300 1301 return false; 1302 } 1303 else 1304 { 1305 if(ajaxCall("nick", nick.val()) == "ok") 1306 { 1307 nick.addClass("readonly"); 1308 $("#nick .notify-fail").removeClass("active"); 1309 1310 return true; 1311 } 1312 else 1313 { 1314 $("#nick .notify-fail").html("ì¤ë³µë ëë¤ì ì ëë¤."); 1315 $("#nick .notify-fail").addClass("active"); 1316 1317 return false; 1318 } 1319 } 1320} 1321 1322function checkBirth() 1323{ 1324 var regexp = /^[0-9]+$/; //ì«ì 1325 let birth = $("input[name='birth']"), 1326 gender = $("input[name='gender']"); 1327 1328 if(!regexp.test(birth.val()) || !regexp.test(gender.val())) 1329 { 1330 $("#idnum .notify-fail").html("ì«ìë§ ì ë ¥í´ì£¼ì¸ì."); 1331 $("#idnum .notify-fail").addClass("active"); 1332 return false;
1333 } 1334 else 1335 { 1336 birth.addClass("readonly"); 1337 gender.addClass("readonly"); 1338 $("#idnum .notify-fail").removeClass("active"); 1339 1340 return true; 1341 } 1342} 1343 1344function checkPhone() 1345{ 1346 var regexp = /^[ê°-í£a-zA-Z0-9]+$/; //íê¸+ì문+ì«ì 1347 let hp = $("input[name='mb_hp']"), 1348 confirmNum = $("#confirmNum"), 1349 confirm = $("#SMSconfirm").val(); 1350 1351 if(hp.val() == "") 1352 { 1353 $("#phone .first .notify-fail").html("í´ëí° ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì."); 1354 $("#phone .first .notify-fail").addClass("active"); 1355 } 1356 else if(!regexp.test(hp.val())) 1357 { 1358 $("#phone .first .notify-fail").html("ì«ìë§ ì ë ¥í´ì£¼ì¸ì."); 1359 $("#phone .first .notify-fail").addClass("active"); 1360 1361 return false; 1362 } 1363 else if(confirmNum.val() == "") 1364 { 1365 $("#phone .second .notify-fail").html("ì¸ì¦ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì."); 1366 $("#phone .second .notify-fail").addClass("active"); 1367 } 1368 else if(!regexp.test(confirmNum.val())) 1369 { 1370 $("#phone .second .notify-fail").html("ì«ìë§ ì ë ¥í´ì£¼ì¸ì."); 1371 $("#phone .second .notify-fail").addClass("active"); 1372 1373 return false; 1374 } 1375 else if(confirm == 0) 1376 { 1377 $("#phone .first .notify-fail").html("í´ëí°ì ì¸ì¦í´ì£¼ì¸ì."); 1378 $("#phone .first .notify-fail").addClass("active"); 1379 1380 return false; 1381 } 1382 else if(confirm == 1) 1383 { 1384 if(ajaxCall("phone", confirmNum.val(), hp.val()) == "fail") 1385 { 1386 $("#phone .second .notify-fail").html("ì¸ì¦ë²í¸ê° ë¤ë¦ ëë¤."); 1387 $("#phone .second .notify-fail").addClass("active"); 1388 1389 return false; 1390 } 1391 else if(ajaxCall("phone", confirmNum.val(), hp.val()) == "ok") 1392 { 1393 $("#reg_mb_hp, #confirmNum").addClass("readonly"); 1394 $("#phone .second .notify-fail").removeClass("active"); 1395 1396 $("#fregisterform").submit(); 1397 1398 return true; 1399 } 1400 } 1401} 1402 1403function checkCompany() 1404{ 1405 if($("#reg_mb_grade").val() == "") 1406 { 1407 $("#company .wrap .ipnWrap:eq(0) .notify-fail").addClass("active"); 1408 return false; 1409 } 1410 else 1411 { 1412 $("#company .wrap .ipnWrap:eq(0) .notify-fail").removeClass("active"); 1413 } 1414 1415 if($("#reg_mb_brand").val() == "") 1416 { 1417 $("#company .wrap .ipnWrap:eq(1) .notify-fail").addClass("active"); 1418 return false; 1419 } 1420 else 1421 { 1422 $("#company .wrap .ipnWrap:eq(1) .notify-fail").removeClass("active"); 1423 } 1424 1425 $(".basic_grade, .basic_brand").addClass("readonly"); 1426 1427 return true; 1428} 1429 1430function PMT(i, n, p) { 1431 return i * -p * Math.pow((1 + i), n) / (1 - Math.pow((1 + i), n)); 1432} 1433 1434function activeSwitch($this, $parent, $target) 1435{ 1436 var toggleTarget = $($this).closest("." + $parent).find("." + $target); 1437 1438 $($this).toggleClass("active"); 1439 1440 toggleTarget.toggleClass("active"); 1441} 1442 1443 1444// ê´ê³ í´ë¦ insert 1445function insertAD(insertType, Position, Target) 1446{ 1447 $.ajax({ 1448 url: g5_url+"/ajax/clickAD.ajax.php", 1449 type: "GET", 1450 data : { 1451 'insertType' : insertType, 1452 'Position' : Position, 1453 'Target' : Target 1454 }, 1455 async: false, 1456 cache: false, 1457 success: function(data) { 1458 console.log(data); 1459 } 1460 }); 1461}
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.