1$(document).ready(function(){ 2 $("body").on("click", ".remove-btn", function(e){ 3 $(this).parent().remove(); 4 }); 5 6 $("body").on("change", ".file-box input[type='file']", function(e){ 7 var idx = $(".file-box input[type='file']").index($(this)); 8 var tit = $(this).val(); 9 $(".upload-name").eq(idx).val(tit) 10 }); 11 12 $('.amount .plus').click(function(){ 13 var n = $('.amount .plus').index(this); 14 var qty = $(".amount .qty:eq("+n+")").val(); 15 qty = $(".amount .qty:eq("+n+")").val(qty*1+1); 16 $(".amount .qty:eq("+n+")").change(); 17 }); 18 $('.amount .minus').click(function(){ 19 var n = $('.amount .minus').index(this); 20 var qty = $(".amount .qty:eq("+n+")").val(); 21 if (qty == 1) { 22 $(".amount .qty:eq("+n+")").val("1"); 23 } else { 24 qty = $(".amount .qty:eq("+n+")").val(qty*1-1); 25 } 26 $(".amount .qty:eq("+n+")").change(); 27 }); 28 29 $(document).on("change",".fileField",function(){ 30 $(this).parent().find(".fileFieldChk").prop("checked",true); 31 }); 32 33 $(document).on("change",".bbsFileField",function(){ 34 $(this).parent().parent().parent().find(".bbsFileFieldChk").prop("checked",true); 35 }); 36 37 $(document).on("change keyup input",".onlyNumber",function(){ 38 var x = $(this).val(); 39 x =x.replace(/[^0-9]/gi,""); 40 var restr = x.toString(); 41 $(this).val(restr) 42 }); 43 44 $(document).on("change keyup input",".onlyPer",function(){ 45 var str= "" + $(this).val().replace(/,/gi,''); // ì½¤ë§ ì ê±° 46 str = str.replace(/[^0-9-.]/gi,""); 47 var regx = new RegExp(/(-?\d+)(\d{3})/); 48 var bExists = str.indexOf(".",0); 49 var strArr = str.split('.'); 50 51 if (bExists > -1){ 52 $(this).val(strArr[0] + "." + strArr[1]); 53 }else{ 54 $(this).val(strArr[0]); 55 } 56 }); 57 58 $(document).on("change keyup input",".onlyPrice",function(){ 59 var str= "" + $(this).val().replace(/,/gi,''); // ì½¤ë§ ì ê±° 60 str = str.replace(/[^0-9-.]/gi,""); 61 var regx = new RegExp(/(-?\d+)(\d{3})/); 62 var bExists = str.indexOf(".",0); 63 var strArr = str.split('.'); 64 while(regx.test(strArr[0])){ 65 strArr[0] = strArr[0].replace(regx,"$1,$2"); 66 } 67 if (bExists > -1){ 68 $(this).val(strArr[0] + "." + strArr[1]); 69 }else{ 70 $(this).val(strArr[0]); 71 } 72 }); 73 74 $("body").on("change", ".file_wrap>input[type=file]", function(){ 75 var idx = $(".file_wrap>input[type=file]").index($(this)); 76 var val = this.value; 77 $(".file_route").eq(idx).html(val); 78 }); 79 80 $("body").on("click", ".file_route", function(){ 81 var idx = $(".file_route").index($(this)); 82 var val = ""; 83 $(".file_wrap>input[type=file]").eq(idx).val(""); 84 $(".file_route").eq(idx).html(val); 85 }); 86 87 $("#HKeditorContent img").each(function(){ 88 $(this).css("max-width","100%") 89 }); 90 91 $(document).on("change",".eDomailSelector",function(e){ 92 var val = $(this).val(); 93 var obj = $(this).parents().find(".eDomain"); 94 if (val==""){ 95 obj.val(""); 96 obj.focus(); 97 }else{ 98 obj.val(val); 99 } 100 }); 101}); 102 103/*ë¹ë기 기본 ì í */ 104$.ajaxSetup({ 105 type: "POST", 106 async: true, 107 dataType:"html", 108 beforeSend : function(){ 109 popupLoadingOpen(); 110 }, 111 success:function() { 112 layerModalClose(); 113 }, 114 error:function(request,status,error) { 115 alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 116 //alert("ë°ì´í° ì²ë¦¬ì¤ ì¤ë¥ê° ë°ìíìµëë¤.\në¤ì ìëí´ ì£¼ì¸ì."); 117 layerModalClose(); 118 } 119}); 120 121function pagePrint(){ 122 var bodyCon = $("#printArea").html(); 123 var W = 600; 124 var H = 500; 125 126 var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width="
126+ W + ",height=" + H + ",left=0,top=0"; 127 var PrintPage = window.open("/board/printContent.asp","print",features); 128} 129 130/* ì¬íëª¨ë¬ ìì */ 131function layerModalOpen(data){ 132 var obj = null; 133 134 if (typeof(data) == "string") { 135 if (!document.getElementById("simplemodal_div")) { 136 $("<div>", {"id": "simplemodal_div"}) 137 .html("<span id='simplemodal_span'></span>") 138 .appendTo(document.body) 139 .hide(); 140 } 141 142 obj = $("#simplemodal_div").find("#simplemodal_span").html(data); 143 } else { 144 obj = data; 145 } 146 $(obj).modal({ 147 zIndex: 20000, 148 overlayId: "simplemodal-overlay", 149 containerId: "simplemodal-container", 150 overlayClose:false, 151 autoResize:true, 152 escClose: false, 153 autoPosition:true, 154 close : false 155 }); 156} 157 158/* íì ë¡ë© */ 159function popupLoadingOpen(){ 160 layerModalOpen("<div class=\"loading\"><img src=\"/images/loading.gif\" alt=\"Loading\"></div>"); 161 $("#simplemodal-overlay").css("background","none"); 162} 163 164/* ì¬íëª¨ë¬ ë«ê¸° */ 165function layerModalClose() { 166 $("#simplemodal_div, #loading_div").remove(); 167 $.modal.close(); 168} 169 170/* ë ì´ì´ íì ëì°ê¸° */ 171function fnLayerPopupOpen(data){ 172 if (!document.getElementById("layerPopupWrap")) { 173 $("<div>", {"id": "layerPopupWrap"}).appendTo(document.body); 174 } 175 $("#layerPopupWrap").html(data).hide(); 176 177 var $layerWrap = $(".popWrap"); 178 var winW = $(document).width(); 179 var winH = $(document).height(); 180 181 $layerWrap.prepend('<div class="dimmed"></div>'); 182 $(".dimmed").css({"width": winW, "height": winH}); 183 184 $("#layerPopupWrap").show(); 185 if ( $layerWrap.is(":visible") ) { 186 var popH= ($('.popCon').height()+42)/2; 187 var popW= $('.popCon').width()/2; 188 $(".popCon").css({ 189 "top": '50%', 190 "left" : '50%', 191 "margin-top":-popH, 192 "margin-left":-popW 193 }); 194 } 195 $layerWrap.find(".btnClose, .btnClose2").on('click', function(e) { 196 e.preventDefault(); 197 fnLayerPopupClose(); 198 }); 199 layerModalClose(); 200} 201 202/* ë ì´ì´ íì ë«ê¸° */ 203function fnLayerPopupClose(){ 204 $(".popWrap").hide(); 205 $("#layerPopupWrap").remove(); 206} 207 208function isValidEmail( string1, string2 ) { 209 var message = ""; 210 211 if( string1 == "" || string2 == "" ) { 212 message = "ì´ë©ì¼ì ì ë ¥í´ ì£¼ì기 ë°ëëë¤."; 213 return message; 214 } 215 if( isSpace( string1 + string2 ) ) { 216 messages = "ì´ë©ì¼ 주ì를 ë¹ê³µê°ìì´ ë£ì´ì£¼ì기 ë°ëëë¤."; 217 return message; 218 } 219 if( -1 == string2.indexOf('.') ) { 220 message = "ì´ë©ì¼ íìì´ ì못 ëììµëë¤."; 221 return message; 222 } 223 var isEmail = /^[a-zA-Z0-9_+.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$/; 224 if( !isEmail.test(string1 + '@' + string2) ) { 225 message = "ì´ë©ì¼ íìì´ ì못 ëììµëë¤."; 226 return message; 227 } 228 return message; 229} 230 231function isValidEmailOnce(string) { 232 var message = ""; 233 234 if( string == "" ) { 235 message = "ì´ë©ì¼ì ì ë ¥í´ ì£¼ì기 ë°ëëë¤."; 236 return message; 237 } 238 if( isSpace( string ) ) { 239 messages = "ì´ë©ì¼ 주ì를 ë¹ê³µê°ìì´ ë£ì´ì£¼ì기 ë°ëëë¤."; 240 return message; 241 } 242 if( -1 == string.indexOf('.') ) { 243 message = "ì´ë©ì¼ íìì´ ì못 ëììµëë¤."; 244 return message; 245 } 246 var isEmail = /^[a-zA-Z0-9_+.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$/; 247 if( !isEmail.test(string) ) { 248 message = "ì´ë©ì¼ íìì´ ì못 ëììµëë¤."; 249 return message; 250 } 251 return message; 252} 253 254function uemailListChange(emailDomain){ 255 if (emailDomain != "") { 256 $('#email2').val(emailDomain); 257 $('#email2').attr('readonly', true); 258 } else { 259 $('#email2').attr('readonly', false); 260 $('#email2').val(''); 261 } 262} 263 264function isSpace( string ) { 265 if(string.search(/\s/) != -1) { 266 return true; 267 } else { 268 return false; 269 } 270} 271 272/* ì«ìí¤ë§ ì ë ¥ ë°ìì ìê² ì¤ì */ 273function onlyNumber(){ 274 $(":input").filter(".onlyNumber") 275 276 .bind("cut copy paste", function(e){ 277 e.preventDefault(); 278 }).keypress(function(event){ 279 if (event.which && (event.which < 48 || event.which > 57)) { 280 //alert("ì«ìë§ ì ë ¥ ê°ë¥í©ëë¤."); 281 event.preventDefault(); 282 } 283 }).css("imeMode", "disabled") 284} 285 286function openVideo(vodurl){ 287 params="vodurl="+vodurl; 288 jQuery.ajax({type:"POST", url:'/sub/ajax_VideoView.asp',data:params,dataType:"html", 289 success:function(msg){ 290 document.getElementById("layerVideoDiv").style.display="inline"; 291 document.getElementById("listDiv").innerHTML=msg; 292 } 293 }); 294} 295function closeVideo(){ 296 document.getElementById("layerVideoDiv").style.display="none"; 297} 298 299function getSubCate(sort,val){ 300 var params = "sort="+sort+"&catecode="+val; 301 $.ajax({type:"POST", url:"/_lib/subCateList.asp",data:params,dataType:"script" 302 }).done(function(data){ 303 304 }); 305} 306function goProductDetail(){ 307 var proidx = $("#sercate3").val() 308 if (proidx==""){ 309 alert("3ì°¨ ë¶ë¥ê¹ì§ ì íí´ì£¼ì¸ì."); 310 return; 311 } 312 313 location.href="/product/product_view.asp?idx="+proidx; 314} 315function MainItemSearchGo(frm){ 316 if ( frm.itemsearchStr.value.length==0 || frm.itemsearchStr.value.length<1 ){
317 318 if (langCode=="kor"){ 319 alert("ê²ìì´ë¥¼ ì ë ¥í´ì£¼ì¸ì."); 320 }else{ 321 alert("Please enter your search term."); 322 } 323 frm.itemsearchStr.focus(); 324 return ; 325 } 326 frm.submit(); 327} 328 329function viewTempPopup(actDiv,temCode,idx){ 330 var params = "idx="+idx; 331 332 if(temCode==1){ 333 pageName="/library/popskin/pop1.asp" 334 }else if(temCode==2){ 335 pageName="/library/popskin/pop2.asp" 336 }else if(temCode==3){ 337 pageName="/library/popskin/pop3.asp" 338 }else if(temCode==4){ 339 pageName="/library/popskin/pop4.asp" 340 }else if(temCode==5){ 341 pageName="/library/popskin/pop5.asp" 342 }else if(temCode==6){ 343 pageName="/library/popskin/pop6.asp" 344 }else if(temCode==7){ 345 pageName="/library/popskin/pop7.asp" 346 }else if(temCode==8){ 347 pageName="/library/popskin/pop8.asp" 348 }else if(temCode==9){ 349 pageName="/library/popskin/pop9.asp" 350 }else if(temCode==10){ 351 pageName="/library/popskin/pop10.asp" 352 } 353 354 $.ajax({type:"POST", url:pageName,data:params,dataType:"html", 355 success:function(msg){ 356 document.getElementById(actDiv).innerHTML=msg; 357 } 358 }); 359} 360 361function numOnMask(me){ 362 if (event.keyCode<48||event.keyCode>57){//ì«ìì¸ê¸ì§ 363 event.returnValue=false; 364 } 365 var tmpH 366 if(me.charAt(0)=="-"){//ììê° ë¤ì´ììë '-'를 ë¹¼ê³ ì ì©ëê².. 367 tmpH=me.substring(0,1); 368 me=me.substring(1,me.length); 369 } //me.indexOf('-') 370 if(me.length > 3){ 371 var c=0; 372 var myArray=new Array(); 373 for(var i=me.length;i>0;i=i-3){ 374 myArray[c++]=me.substring(i-3,i); 375 } 376 myArray.reverse(); 377 me=myArray.join(","); 378 } 379 if(tmpH){ 380 me=tmpH+me; 381 } 382 return me; 383} 384function numOffMask(me){ 385 var tmp=me.split(","); 386 tmp=tmp.join(""); 387 388 return tmp; 389} 390function check_value(me){ 391 if(me.value!="-"){ 392 var myStr=numOffMask(me.value); 393 394 if (isNaN(myStr)) { 395 //alert("ì«ìë§ ì ë ¥í ì ììµëë¤."); 396 me.value=''; 397 }else{ 398 me.value=numOnMask(myStr); 399 } 400 } 401 //me.focus(); 402} 403 404function autotab(field){ 405 if (field.getAttribute&&field.value.length==field.getAttribute("maxlength")) { 406 var i; 407 for (i = 0; i < field.form.elements.length; i++) 408 if (field == field.form.elements[i]) 409 break; 410 i = (i + 1) % field.form.elements.length; 411 field.form.elements[i].focus(); 412 return false; 413 } 414 else 415 return true; 416} 417 418function jumin_check(userNo1,userNo2){ 419 a = Array(6); 420 b = Array(7); 421 var f=document.pageForm; 422 var num1, num2, total, tot; 423 424 if(userNo1.length==6 && userNo2.length==7){ 425 num1=userNo1; 426 num2=userNo2; 427 428 for(var i=0; i<6; i++){ 429 a[i]=parseInt(num1.charAt(i)); 430 } 431 432 for(var j=0; j<7; j++){ 433 b[j]=parseInt(num2.charAt(j)); 434 } 435 436 total = (a[0]*2) + (a[1]*3) + (a[2]*4) + (a[3]*5) + (a[4]*6) + (a[5]*7) + (b[0]*8) + (b[1]*9) + (b[2]*2) + (b[3]*3) + (b[4]*4) + (b[5]*5); 437 tot = 11 - (total % 11); 438 if(tot==11){ 439 tot = 1; 440 }else if(tot==10){ 441 tot = 0; 442 } 443 444 if(b[6]!=tot){ 445 alert("주민ë²í¸ê° ì¬ë°ë¥´ì§ììµëë¤."); 446 return(false); 447 }return(true); 448 }else{ 449 alert("주민ë±ë¡ë²í¸ë¥¼ ì¬ë°ë¡ ì ë ¥íì¸ì."); 450 return(false); 451 } 452} 453 454function closeLayer(obj){ 455 obj.style.visibility='hidden'; 456} 457function closetoLayer(obj){ 458 setCookie( obj, "done" , 1 ); 459 document.all[obj].style.visibility = "hidden"; 460} 461 462function openLayer(obj){ 463 obj.style.visibility='visible'; 464} 465function opentoLayer(obj){ 466 setCookie( obj, "done" , 1 ); 467 document.all[obj].style.visibility = "visible"; 468} 469 470function setCookie( name, value, expiredays ) { 471 var todayDate = new Date(); 472 todayDate = new Date(parseInt(todayDate.getTime() / 86400000) * 86400000 + 54000000); 473 if ( todayDate > new Date() ){ 474 expiredays = expiredays - 1; 475 } 476 todayDate.setDate( todayDate.getDate() + expiredays ); 477 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 478} 479 480function getCookie( name ){ 481 var nameOfCookie = name + "="; 482 var x = 0; 483 while ( x <= document.cookie.length ) { 484 var y = (x+nameOfCookie.length); 485 if ( document.cookie.substring( x, y ) == nameOfCookie ) { 486 if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; 487 return unescape( document.cookie.substring( y, endOfCookie ) ); 488 } 489 x = document.cookie.indexOf( " ", x ) + 1; 490 if ( x == 0 ) break; 491 } 492 return ""; 493} 494 495function getFileExtension( filePath ){ 496 var extension = ""; 497 var lastIndex = -1; 498 lastIndex = filePath.lastIndexOf('.'); 499 500 if ( lastIndex != -1 ){ 501 extension = filePath.substring( lastIndex+1, filePath.len ); 502 } else{ 503 extension = ""; 504 } 505 return extension; 506} 507 508function uploadImg_check( value,msg,sort ){ 509 var src = getFileExtension(value); 510 511 if(sort==1 && value==""){return true;} 512 if ( src == ""){ 513 alert(msg); 514 return false; 515 } else if ( !((src.toLowerCase() == "gif") || (src.toLowerCase() == "jpg") || (src.toLowerCase() == "jpeg") || (src.toLowerCase() == "png")) ) { 516 alert('gif,jpg,png íì¼ë§ ì ë¡ë íì¤ ì ììµëë¤.'); 517 return false; 518 }else{return true;} 519} 520 521function uploadImg_check_JPG( value,msg,sort ){ 522 var src = getFileExtension(value); 523 524 if(sort==1 && value==""){return true;} 525 if ( src == ""){ 526 alert(msg); 527 return false; 528 } else if ( !((src.toLowerCase() == "jpg") || (src.toLowerCase() == "jpeg")) ) { 529 alert('jpg íì¼ë§ ì ë¡ë íì¤ ì ììµëë¤.'); 530 return false; 531 }else{return true;} 532} 533 534function uploadFlvImg_check( value,msg,sort ){ 535 var src = getFileExtension(value); 536 537 if(sort==1 && value==""){return true;} 538 if ( src == ""){ 539 alert(msg); 540 return false; 541 } else if ( !((src.toLowerCase() == "flv")) ) { 542 alert('íëì¬ëìì íì¼ë§ ì ë¡ë íì¤ ì ììµëë¤.'); 543 return false; 544 }else{return true;} 545} 546 547function popOpen(Width,Height,idx,sTop,sLeft,langsort) { 548 if( getCookie( "pop"+idx ) != "done" ){
549 var Option="left="+sLeft+",top="+sTop+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+Width+", height="+parseInt(Height+21); 550 window.open("/popup.asp?idx="+idx,"pop"+idx,Option); 551 } 552} 553 554function mainLoginSend(form) { 555 if(form.userid.value=="") { 556 alert("ìì´ë를 ì ë ¥í´ ì£¼ììì¤."); 557 form.userid.focus(); 558 return; 559 } 560 if(form.passwd.value=="") { 561 alert("í¨ì¤ìë를 ì ë ¥í´ ì£¼ììì¤."); 562 form.passwd.focus(); 563 return; 564 } 565 form.submit(); 566} 567 568function mainLoginInputSendit(form) { 569 if(event.keyCode==13) { 570 mainLoginSend(form); 571 } 572} 573 574function zipcodeck(zip,addr1,addr2) { 575 new daum.Postcode({ 576 oncomplete: function(data) { 577 // íì ìì ê²ìê²°ê³¼ í목ì í´ë¦íìë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 578 579 // ê° ì£¼ìì ë ¸ì¶ ê·ì¹ì ë°ë¼ 주ì를 ì¡°í©íë¤. 580 // ë´ë ¤ì¤ë ë³ìê° ê°ì´ ìë ê²½ì°ì 공백('')ê°ì ê°ì§ë¯ë¡, ì´ë¥¼ ì°¸ê³ íì¬ ë¶ê¸° íë¤. 581 var fullAddr = ''; // ìµì¢ 주ì ë³ì 582 var extraAddr = ''; // ì¡°í©í 주ì ë³ì 583 584 // ì¬ì©ìê° ì íí 주ì íì ì ë°ë¼ í´ë¹ 주ì ê°ì ê°ì ¸ì¨ë¤. 585 if (data.userSelectedType === 'R') { // ì¬ì©ìê° ëë¡ëª 주ì를 ì ííì ê²½ì° 586 fullAddr = data.roadAddress; 587 588 } else { // ì¬ì©ìê° ì§ë² 주ì를 ì ííì ê²½ì°(J) 589 fullAddr = data.jibunAddress; 590 } 591 592 // ì¬ì©ìê° ì íí 주ìê° ëë¡ëª íì ì¼ë ì¡°í©íë¤. 593 if(data.userSelectedType === 'R'){ 594 //ë²ì ëëª ì´ ìì ê²½ì° ì¶ê°íë¤. 595 if(data.bname !== ''){
596 extraAddr += data.bname; 597 } 598 // ê±´ë¬¼ëª ì´ ìì ê²½ì° ì¶ê°íë¤. 599 if(data.buildingName !== ''){ 600 extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); 601 } 602 // ì¡°í©í주ìì ì 무ì ë°ë¼ ì쪽ì ê´í¸ë¥¼ ì¶ê°íì¬ ìµì¢ 주ì를 ë§ë ë¤. 603 fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); 604 } 605 606 // ì°í¸ë²í¸ì 주ì ì 보를 í´ë¹ íëì ë£ëë¤. 607 document.getElementById(zip).value = data.zonecode; //5ì리 ìì°í¸ë²í¸ ì¬ì© 608 document.getElementById(addr1).value = fullAddr; 609 610 // 커ì를 ìì¸ì£¼ì íëë¡ ì´ëíë¤. 611 document.getElementById(addr2).focus(); 612 } 613 }).open(); 614} 615 616function zipcodeck_getLat(zip,addr1,addr2,jibunaddr1) { 617 new daum.Postcode({ 618 oncomplete: function(data) { 619 var fullAddr = ''; 620 var fullAddrJiBun = ''; 621 var extraAddr = ''; 622 623 fullAddr = data.roadAddress; 624 fullAddrJiBun = data.jibunAddress; 625 626 if(data.userSelectedType === 'R'){ 627 if(data.bname !== ''){
628 extraAddr += data.bname; 629 } 630 if(data.buildingName !== ''){ 631 extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); 632 } 633 //fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); 634 } 635 636 //ì¢í GET//////////////// 637 var geocoder = new daum.maps.services.Geocoder(); // 주ì-ì¢í ë³í ê°ì²´ë¥¼ ìì±í©ëë¤ 638 639 geocoder.addressSearch(fullAddr, function(result, status) { // 주ìë¡ ì¢í를 ê²ìí©ëë¤ 640 if (status === daum.maps.services.Status.OK) { 641 //var coords = new daum.maps.LatLng(result[0].y, result[0].x); 642 $("#ncoord_x").val(result[0].y); 643 $("#ncoord_y").val(result[0].x); 644 }else{ 645 alert("ì/ê²½ë ë³íì ì¤í¨íìµëë¤.\nì/ê²½ëê° ì ë ¥ëì§ ìì¼ë©´ 주문 ë° ë§¤ì¥ ê²ìì´ ëì§ ììµëë¤.") 646 } 647 }); 648 //ì¢í GET//////////////// 649 650 document.getElementById(zip).value = data.zonecode; //5ì리 ìì°í¸ë²í¸ ì¬ì© 651 document.getElementById(addr1).value = fullAddr; 652 document.getElementById(addr2).focus(); 653 //document.getElementById(jibunaddr1).value = fullAddrJiBun; 654 } 655 }).open(); 656} 657 658function itemsearch(){ 659 if(document.itemshform.searchstr.value==""){ 660 alert("ê²ìíì¤ ì í ë¨ì´ë¥¼ ì ë ¥íì¸ì."); 661 document.itemshform.searchstr.focus(); 662 return; 663 }document.itemshform.submit(); 664} 665 666function openModal(width,height,fileUrl,scroll){ 667 var OpenFile=fileUrl; 668 var ReturnValue=window.showModalDialog(OpenFile,'','scroll:'+scroll+'; help:no; center:yes; status:no; dialogWidth:'+width+'px; dialogHeight:'+height+'px'); 669 if(ReturnValue==1){ 670 return true; 671 } 672} 673 674function openWindow(Width,Height,Url,winname,scroll) { 675 var winPosLeft = (screen.width - Width) / 2; // ìì°½ Y ì¢í 676 var winPosTop = (screen.height - Height) / 2; // ìì°½ X ì¢í 677 678 var Option="top="+winPosTop+",left="+winPosLeft+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scroll+", resizable=no,width="+Width+", height="+Height; 679 obj = window.open(Url,winname,Option); 680 obj.focus(); 681} 682 683function login(rUrl){ 684 val = confirm("íìì ì© ì»¨í ì¸ ì ëë¤.\në¡ê·¸ì¸ íì´ì§ë¡ ì´ëíìê² ìµëê¹?") 685 if (val){ 686 location.href="../member/login.asp?returnURL="+rUrl 687 } 688} 689 690function loginConfirm(msg, rUrl){ 691 val = confirm(msg) 692 if (val){ 693 location.href="../member/login.asp?returnURL="+rUrl 694 } 695} 696 697function downChk(){ 698 alert("ë¤ì´ë¡ë ê¶íì´ ììµëë¤.\níì¸í ë¤ììëí´ì£¼ì¸ì."); 699 return; 700} 701 702function inputSendit(thisform) { 703 if(event.keyCode==13) { 704 thisform.submit(); 705 } 706} 707 708function formatNumber(v1,v2){ 709 var str=new Array(); //콤ë§ì¤í¸ë§ì ì¡°í©í ë°°ì´ 710 v1=String(v1); //ì«ì를 ì¤í¸ë§ì¼ë¡ ë³í 711 for(var i=1;i<=v1.length;i++){ //ì«ìì 길ì´ë§í¼ ë°ë³µ 712 if(i%v2) str[v1.length-i]=v1.charAt(v1.length-i); //ì리ìê° ìëë©´ ì«ìë§ì½ì 713 else str[v1.length-i]=','+v1.charAt(v1.length-i); //ì리ì ì´ë©´ 콤ë§ê¹ì§ ì½ì 714 } 715 return str.join('').replace(/^,/,''); //ì¤í¸ë§ì ì¡°í©íì¬ ë°í 716} 717 718function regularExp(Str,Patten){ 719 var chk 720 if(Patten=="hangle"){chk=/[^ ã±-í£]/;} // íê¸,공백 íì© 721 else if(Patten=="charcode"){chk=/[^ \wã±-í£]/} // íì문ì,ì«ì,공백,_ íì© 722 else if(Patten=="intcode"){chk=/[^\d-]/;} // ì«ì,- íì© 723 else{chk=Patten} 724 return chk.test(Str); 725} 726 727function OpenWin_Upload() { 728 window.open("../TextEditor/fileupload.asp","FileUpload","scrollbars=yes,height=470,width=720,top=20,left=50"); 729} 730 731function setCookie( name, value, expiredays ){ 732 var endDate = new Date(); 733 endDate.setDate( endDate.getDate()+ expiredays ); 734 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + endDate.toGMTString() + ";" 735} 736 737function get_Cookie( name ){ 738 var nameOfCookie = name + "="; 739 var x = 0; 740 while ( x <= document.cookie.length ){ 741 var y = (x+nameOfCookie.length); 742 if ( document.cookie.substring( x, y ) == nameOfCookie ){ 743 if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 744 endOfCookie = document.cookie.length; 745 return unescape( document.cookie.substring( y, endOfCookie ) ); 746 } 747 x = document.cookie.indexOf( " ", x ) + 1; 748 if ( x == 0 ) break; 749 } 750 return ""; 751} 752 753function getCookie( name ){ 754 var nameOfCookie = name + "="; 755 var x = 0; 756 while ( x <= document.cookie.length ) { 757 var y = (x+nameOfCookie.length); 758 if ( document.cookie.substring( x, y ) == nameOfCookie ) { 759 if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; 760 return unescape( document.cookie.substring( y, endOfCookie ) ); 761 } 762 x = document.cookie.indexOf( " ", x ) + 1; 763 if ( x == 0 ) break; 764 } 765 return ""; 766} 767 768function changeMenu(index){ 769 if(index==0){ 770 document.all.MenuTable1.style.display='block'; 771 document.all.MenuTable2.style.display='none'; 772 setCookie( "menuSort", 0 , 1); 773 }else{ 774 document.all.MenuTable1.style.display='none'; 775 document.all.MenuTable2.style.display='block'; 776 setCookie( "menuSort", 1 , 1); 777 } 778} 779 780function vodView(title,url){ 781 var Option="top=0, left=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scroll+", resizable=no,width=400, height=300"; 782 window.open('/player/player.asp?title='+title+'&ViewFileUrl='+url,'player',Option); 783} 784 785function addRowFront() { 786 var html=""; 787 788 var cnt = $("input[name=files]").length+1; 789 790 html = html + "<div style='padding-top:3px;'>" 791 html = html + " <span class=\"file_wrap\">" 792 html = html + " <input type=\"file\" name='files' onchange=\"javascript:document.getElementById('file_route"+cnt+"').value=this.value\" />" 793 html = html + " </span>" 794 html = html + " <input type=\"text\" id=\"file_route"+cnt+"\" style=\"width:50%;\" readonly=\"readonly\" disabled=\"disabled\" title=\"첨ë¶ë íì¼ê²½ë¡\" />" 795 html = html + " <input type='hidden' name='filedel_idx' value='0'>" 796 html = html + "</div>" 797 798 $("#attFiles").append(html); 799} 800function addRow_Front() { 801 var fileAddTag = ""; 802 803 boxLength = $("#fileArea .file-box").length 804 805 fileAddTag = fileAddTag + "<div class=\"file-box\">" 806 fileAddTag = fileAddTag + " <a href=\"javascript:;\" class=\"remove-btn\">-</a>" 807 //fileAddTag = fileAddTag + " <input class=\"upload-name\" placeholder=\"ìµë 4MB ì²¨ë¶ ê°ë¥\" disabled=\"disabled\">" 808 fileAddTag = fileAddTag + " <input class=\"upload-name\" disabled=\"disabled\">" 809 fileAddTag = fileAddTag + " <label for=\"ex_filename"+boxLength+"\">íì¼ì°¾ê¸°</label>" 810 fileAddTag = fileAddTag + " <input type=\"file\" id=\"ex_filename"+boxLength+"\" class=\"upload-hidden\">" 811 fileAddTag = fileAddTag + "</div>" 812 813 var fileAllowCnt = 5 ; 814 if ($("#fileArea .file-box").length>=fileAllowCnt){ 815 alert("ëì´ì ì¶ê°í ì ììµëë¤."); 816 }else{ 817 $("#fileArea").append(fileAddTag); 818 } 819} 820 821function addRow() { 822 var tbl = document.getElementById("inRow").getElementsByTagName("TBODY")[0]; 823 var html1 = "<input name='files' type='file' class='input' style='width:350px'><input type='hidden' name='filedel_idx' value='0'><input type='hidden' name='filesort' value='0'>"; 824 var row = document.createElement("tr"); 825 var col1 = document.createElement("td"); 826 col1.className="HK_noBoarder"; 827 row.appendChild(col1); 828 col1.innerHTML = html1; 829 tbl.appendChild(row);
830} 831function changeFilech(cnt,val){ 832 var delchk = document.getElementsByName('delchk'); 833 var filedel_idx = document.getElementsByName('filedel_idx'); 834 835 if(delchk[cnt].checked){filedel_idx[cnt].value=val} 836 else{filedel_idx[cnt].value=""} 837} 838 839function changeFileArea(){ 840 if(document.getElementById("fileArea").style.display=="none"){ 841 document.getElementById("fileArea").style.display="inline"; 842 }else{ 843 document.getElementById("fileArea").style.display="none"; 844 } 845} 846 847var Drag={ 848 "obj":null, 849 850 "init":function(a, aRoot, ee){ 851 if (!ee) { 852 a.onmousedown=Drag.start; 853 } 854 a.root = aRoot; 855 if(isNaN(parseInt(a.root.style.left))) { a.root.style.left="0px"; } 856 if(isNaN(parseInt(a.root.style.top))) { a.root.style.top="0px"; } 857 a.root.onDragStart = new Function(); 858 a.root.onDragEnd = new Function(); 859 a.root.onDrag = new Function(); 860 861 if (!!ee) { 862 var b = Drag.obj = a; 863 ee = Drag.fixE(ee); 864 var c = parseInt(b.root.style.top); 865 var d = parseInt(b.root.style.left); 866 b.root.onDragStart(d,c,ee.clientX,ee.clientY); 867 b.lastMouseX = ee.clientX; 868 b.lastMouseY = ee.clientY; 869 document.onmousemove = Drag.Drag; 870 document.onmouseup = Drag.end; 871 } 872 873 }, 874 875 "start":function(a){ 876 877 var b=Drag.obj=this; 878 a=Drag.fixE(a); 879 880 var c = parseInt(b.root.style.top); 881 var d = parseInt(b.root.style.left); 882 883 b.root.onDragStart(d,c,a.clientX,a.clientY); 884 885 b.lastMouseX = a.clientX; 886 b.lastMouseY = a.clientY; 887 888 document.onmousemove = Drag.Drag; 889 document.onmouseup = Drag.end; 890 return false; 891 }, 892 893 "Drag":function(a){ 894 a = Drag.fixE(a); 895 var b = Drag.obj; 896 var c = a.clientY; 897 var d = a.clientX; 898 var e = parseInt(b.root.style.top); 899 var f = parseInt(b.root.style.left); 900 var h,g; 901 h = f + d - b.lastMouseX; 902 g = e + c - b.lastMouseY; 903 b.root.style.left = h + "px"; 904 b.root.style.top = g + "px"; 905 b.lastMouseX = d; 906 b.lastMouseY = c; 907 b.root.onDrag(h, g, a.clientX, a.clientY); 908 return false; 909 }, 910 911 "end":function(){ 912 document.onmousemove = null; 913 document.onmouseup = null; 914 Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style.left),parseInt(Drag.obj.root.style.top)); 915 Drag.obj = null; 916 }, 917 918 919 "fixE":function(a){ 920 if(typeof a == "undefined") { a=window.event; } 921 if(typeof a.layerX == "undefined") { a.layerX=a.offsetX; } 922 if(typeof a.layerY == "undefined") { a.layerY=a.offsetY; } 923 return a; 924 } 925}; 926 927function hangul_chk(word) { 928 var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-"; 929 930 for (i=0; i< word.length; i++){ 931 idcheck = word.charAt(i); 932 933 for ( j = 0 ; j < str.length ; j++){ 934 if (idcheck == str.charAt(j)) break; 935 936 if (j+1 == str.length){ 937 return false; 938 } 939 } 940 } 941 return true; 942} 943 944function emailDomainSet() { 945 if ($("#domainSelect").val()==""){ 946 $("#emailDomain").val(''); 947 $("#emailDomain").focus(); 948 }else{ 949 $("#emailDomain").val( $("#domainSelect").val() ); 950 } 951} 952function demailDomainSet() { 953 if ($("#ddomainSelect").val()==""){ 954 $("#demailDomain").val(''); 955 $("#demailDomain").focus(); 956 }else{ 957 $("#demailDomain").val( $("#ddomainSelect").val() ); 958 } 959} 960 961//ì ë ¥í ê¸ìì를 ì²´í¬ 962function chkByte(obj_name, max_len, span_name, isFirst) { 963 var ls_str = obj_name.value; // ì´ë²¤í¸ê° ì¼ì´ë 컨í¸ë¡¤ì value ê° 964 var pattern = "/\r\n/gm"; 965 ls_str = ls_str.replace(pattern,'\n'); 966 var li_str_len = ls_str.length; // ì ì²´ê¸¸ì´ 967 968 // ë³ìì´ê¸°í 969 var li_max = max_len; // ì íí ê¸ìì í¬ê¸° 970 var i = 0; // for문ì ì¬ì© 971 var li_byte = 0; // íê¸ì¼ê²½ì°ë 2 ê·¸ë°ìë 1ì ëí¨ 972 var isHan = true; 973 var li_len = 0; // substringí기 ìí´ì ì¬ì© 974 var ls_one_char = ""; // íê¸ìì© ê²ì¬íë¤ 975 var ls_str2 = ""; // ê¸ìì를 ì´ê³¼íë©´ ì íí ì ê¸ìì ê¹ì§ë§ ë³´ì¬ì¤ë¤. 976 977 try { 978 //var objSpan = document.getElementById(span_name); 979 980 for( i = 0; i < li_str_len; i++ ) { 981 // íê¸ìì¶ì¶ 982 ls_one_char = ls_str.charAt(i); 983 984 if ( escape(ls_one_char).length > 4 ) { // íê¸ì´ë©´ 2를 ëíë¤. 985 li_byte += 1; 986 isHan = true; 987 } else if (ls_one_char == '\n') { // ì¤ë°ê¿ì¼ê²½ì° 988 /* if (li_str_len.charAt(i-1) != '\r') { // íì§ë§ ë°ë ¤ì ì¤ì´ ë°ëê²½ì°ê° ìëë 989 li_byte += 1; 990 isHan = false; 991 }*/ 992 } else if (ls_one_char == ' ') { // 공백ì¼ê²½ì° 993 994 } else { // ê·¸ë°ì ê²½ì°ë 1ì ëíë¤. 995 li_byte++; 996 isHan = false; 997 } 998 999 // ì ì²´ í¬ê¸°ê° li_max를 ëì§ìì¼ë©´ 1000 if( li_byte <= li_max ) { 1001 li_len = i + 1; 1002 } else { 1003 break; 1004 } 1005 } 1006 1007 // ì 체길ì´ë¥¼ ì´ê³¼íë©´ 1008 if ( li_byte > li_max ) { 1009 alert( li_max + "ì를 ì´ê³¼ ì ë ¥í ì ììµëë¤.\nì´ê³¼ë ë´ì©ì ìëì¼ë¡ ìì ë©ëë¤. "); 1010 ls_str2 = ls_str.substr(0, li_len); 1011 obj_name.value = ls_str2; 1012 1013 if ( isHan ) li_byte -= 1;
1014 else li_byte--; 1015 } 1016 if ( isFirst != 'N') { 1017 obj_name.focus(); 1018 } 1019 //objSpan.innerHTML = li_byte+"/"+max_len+"ì"; 1020 } catch(e) {} 1021} 1022 1023// SMS CHECK Function ============================================================== 1024function str_limit_check( obj,obj1, max_len ){ 1025 content_length = obj.value.length; 1026 tmp_content = ""; 1027 cbyte = 0; 1028 if( !max_len ){ max_len = 80; } 1029 for( i = 0; i < content_length; i++ ){ 1030 tmp_char = obj.value.charAt( i ); 1031 if( escape( tmp_char ).length > 4){ 1032 cbyte += 2; 1033 } 1034 else{ cbyte++; } 1035 if( typeof( document.all[obj1] ) == "object" ){ 1036 document.all[obj1].innerHTML = cbyte; 1037 } 1038 if( cbyte <= max_len ){ 1039 tmp_content += tmp_char; 1040 } 1041 else{ 1042 msg = 'ë©ìì§ë ' + max_len + ' Byte ì´íë¡ ì ë ¥í´ì£¼ì¸ì.'; 1043 alert( msg ); 1044 obj.value = tmp_content; 1045 1046 if( typeof( document.all[obj1] ) == "object" ){ 1047 document.all[obj1].innerHTML = cbyte - ( cbyte - max_len ); 1048 } 1049 break; 1050 } 1051 } 1052} 1053//================================================================================== 1054 1055function changeareaData(str1,str2){ 1056 var params = "areaidx="+str1+"&lccode="+str2+"&objname1=selAreaidx&objname2=areadetailidx"; 1057 1058 $.ajax({type:"POST", url:'/_lib/selAreaDetail.asp',data:params,dataType:"script", 1059 }).done(function(msg){ 1060 }); 1061}
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.