1 // ì¸ê¸°ê²ìì´, ë´ê°ì°¾ì ê²ìì´ 2function doKeyword(query) { 3 4 var searchForm = document.searchTop; 5 searchForm.query.value = query; 6 //searchForm.collection.value = "ALL"; 7 //searchForm.sort.value = "RANK"; 8 doSearchTop(); 9} 10 11// ì¿ í¤ê° ì¡°í 12function getCookie(c_name) { 13 var i,x,y,cookies=document.cookie.split(";"); 14 for (i=0;i<cookies.length;i++) { 15 x=cookies[i].substr(0,cookies[i].indexOf("=")); 16 y=cookies[i].substr(cookies[i].indexOf("=")+1); 17 x=x.replace(/^\s+|\s+$/g,""); 18 19 if (x==c_name) { 20 return unescape(y); 21 } 22 } 23} 24 25// ì¿ í¤ê° ì¤ì 26function setCookie(c_name,value,exdays) { 27 var exdate=new Date(); 28 exdate.setDate(exdate.getDate() + exdays); 29 var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); 30 document.cookie=c_name + "=" + c_value; 31} 32 33// ë´ê° ì°¾ì ê²ìì´ ì¡°í 34function getMyKeyword(keyword, totCount) { 35 var MYKEYWORD_COUNT = 6; //ë´ê° ì°¾ì ê²ìì´ ê°¯ì + 1 36 var myKeyword = getCookie("mykeyword"); 37 if( myKeyword== null) { 38 myKeyword = ""; 39 } 40 41 var myKeywords = myKeyword.split("^%"); 42 43 if( totCount > 0 ) { 44 var existsKeyword = false; 45 for( var i = 0; i < myKeywords.length; i++) { 46 if( myKeywords[i] == keyword) { 47 existsKeyword = true; 48 break; 49 } 50 } 51 52 if( !existsKeyword ) { 53 myKeywords.push(keyword); 54 if( myKeywords.length == MYKEYWORD_COUNT) { 55 myKeywords = myKeywords.slice(1,MYKEYWORD_COUNT); 56 } 57 } 58 setCookie("mykeyword", myKeywords.join("^%"), 365); 59 } 60 61 showMyKeyword(myKeywords.reverse()); 62} 63 64 65// ë´ê° ì°¾ì ê²ìì´ ìì 66function removeMyKeyword(keyword) { 67 var myKeyword = getCookie("mykeyword"); 68 if( myKeyword == null) { 69 myKeyword = ""; 70 } 71 72 var myKeywords = myKeyword.split("^%"); 73 74 var i = 0; 75 while (i < myKeywords.length) { 76 if (myKeywords[i] == keyword) { 77 myKeywords.splice(i, 1); 78 } else { 79 i++; 80 } 81 } 82 83 setCookie("mykeyword", myKeywords.join("^%"), 365); 84 85 showMyKeyword(myKeywords); 86} 87 88// ë´ê° ì°¾ì ê²ìì´ 89function showMyKeyword(myKeywords) { 90 var str = "<li class=\"tit\"><img src=\"images/tit_mykeyword.gif\" alt=\"ë´ê° ì°¾ì ê²ìì´\" /></li>"; 91 92 for( var i = 0; i < myKeywords.length; i++) { 93 if( myKeywords[i] == "") continue; 94 95 str += "<li class=\"searchkey\"><a href=\"#none\" onClick=\"javascript:doKeyword('"+myKeywords[i]+"');\">"+myKeywords[i]+"</a> <img src=\"images/ico_del.gif\" onClick=\"removeMyKeyword('"+myKeywords[i]+"');\"/></li>"; 96 } 97 98 $("#mykeyword").html(str); 99} 100 101// ì¤í ì¡°í 102function getSpell(query) { 103 $.ajax({ 104 type: "POST", 105 url: "./popword/popword.jsp?target=spell&charset=", 106 dataType: "xml", 107 data: {"query" : query}, 108 success: function(xml) { 109 if(parseInt($(xml).find("Return").text()) > 0) { 110 var str = "<div class=\"resultall\">"; 111 112 $(xml).find("Data").each(function(){ 113 if ($(xml).find("Word").text() != "0" && $(xml).find("Word").text() != query) { 114 str += "<span>ì´ê²ì ì°¾ì¼ì ¨ëì? </span><a href=\"#none\" onClick=\"javascript:doKeyword('"+$(xml).find("Word").text()+"');\">" + $(xml).find("Word").text() + "</a>"; 115 } 116 }); 117 118 str += "</div>"; 119 120 $("#spell").html(str); 121 } 122 } 123 }); 124 125 return true; 126} 127 128/*// ê¸°ê° ì¤ì 129function setDate(range) { 130 var startDate = ""; 131 var endDate = ""; 132 133 var currentDate = new Date(); 134 var year = currentDate.getFullYear(); 135 var month = currentDate.getMonth() +1; 136 var day = currentDate.getDate(); 137 138 if (parseInt(month) < 10) { 139 month = "0" + month; 140 } 141 142 if (parseInt(day) < 10) { 143 day = "0" + day; 144 } 145 146 var toDate = year + "." + month + "." + day; 147 148 // ê¸°ê° ë²í¼ ì´ë¯¸ì§ ì´ê¸°í 149 for (i = 1;i < 5 ;i++) { 150 $("#range"+i).attr ("src", "images/btn_term" + i + ".gif"); 151 } 152 153 // ê¸°ê° ë²í¼ ì´ë¯¸ì§ ì í 154 if (range == "D") { 155 startDate = getAddDay(currentDate, -0); 156 $("#range2").attr ("src", "images/btn_term22.gif"); 157 } else if (range == "W") { 158 startDate = getAddDay(currentDate, -6); 159 $("#range3").attr ("src", "images/btn_term32.gif"); 160 } else if (range == "M") { 161 startDate = getAddDay(currentDate, -29); 162 $("#range4").attr ("src", "images/btn_term42.gif"); 163 } else { 164 startDate = "1970.01.01"; 165 endDate = toDate;
166 $("#range1").attr ("src", "images/btn_term12.gif"); 167 } 168 169 if (range != "A" && startDate != "") { 170 year = startDate.getFullYear(); 171 month = startDate.getMonth()+1; 172 day = startDate.getDate(); 173 174 if (parseInt(month) < 10) { 175 month = "0" + month; 176 } 177 178 if (parseInt(day) < 10) { 179 day = "0" + day; 180 } 181 182 startDate = year + "." + month + "." + day; 183 endDate = toDate; 184 } 185 186 $("#range").val(range); 187 $("#startDate").val(startDate); 188 $("#endDate").val(endDate); 189} 190 191// ë ì§ ê³ì° 192function getAddDay ( targetDate, dayPrefix ) 193{ 194 var newDate = new Date( ); 195 var processTime = targetDate.getTime ( ) + ( parseInt ( dayPrefix ) * 24 * 60 * 60 * 1000 ); 196 newDate.setTime ( processTime ); 197 return newDate; 198}*/ 199//í ë§ì ë ¬ 200function doThemaSorting(sort) { 201 var searchForm = document.sFrm; 202 searchForm.sort.value = sort; 203 searchForm.submit(); 204} 205//í ë§ê²ì 206function doThemaSearch() { 207 var searchForm = document.sFrm; 208 var searchQuery =searchForm.searchKeyword.value.trim(); 209 if (searchQuery == "") { 210 alert("ê²ìì´ë¥¼ ì ë ¥íì¸ì."); 211 searchForm.searchKeyword.focus(); 212 return false; 213 }else if ("ì¤ìêµ" == searchQuery || "ì ììí" == searchQuery || "리í¼ê°ì " == searchQuery || "리í¼ë¸ë§¤ì¥" == searchQuery 214 || "ì¤ê³ ê°ì " == searchQuery || "리í¼ì í" == searchQuery || "리í¼" == searchQuery || "ì ì" == searchQuery 215 ){ 216 location.href='http://www.etlandmall.co.kr/pc/themecategory/ojakgyoMain.do;'; 217 } else { 218 xtractorUpdateCookie('xtr_innerkw',searchForm.searchKeyword.value); 219 searchForm.submit(); 220 } 221} 222 223 224// ì°í¸ë²í¸ê²ì 225function doSearch() { 226 var searchForm = document.searchForm; 227 searchForm.submit(); 228} 229//ìë¨ íµí©ê²ì 230function doSearchTop() { 231 var searchForm = document.searchTop; 232 var searchQuery =searchForm.query.value; 233 234 //ë©ì¸ ê²ì 235 var searchQuery = encodeURIComponent($('#inp_sh').val());// 2025-02-24 ê°ë°ìì²ì¼ë¡ ìì ì ë°ì´í¸ 236 var tempQuery = $('#tempQuery').val(); 237 var queryUrl = $('#queryUrl').val(); 238 239 // ê²°ê³¼ ë´ ì¬ê²ì ì¬ë¶ ê° ì í 240 if($('#reSearch').prop('checked')) { 241 $('#reSearchYn').val('Y'); 242 } else { 243 $('#reSearchYn').val('N'); 244 } 245 246 //ì½ë§ì¤ 20200526 ê²ì 247// cca('event', 'search', searchQuery); 248 249 if (searchForm.query.value.trim() == "") { 250 alert("ê²ìì´ë¥¼ ì ë ¥íì¸ì."); 251 searchForm.query.focus(); 252 return false; 253 }else if ("ì¤ìêµ" == searchQuery || "ì ììí" == searchQuery || "리í¼ê°ì " == searchQuery || "리í¼ë¸ë§¤ì¥" == searchQuery 254 || "ì¤ê³ ê°ì " == searchQuery || "리í¼ì í" == searchQuery || "리í¼" == searchQuery || "ì ì" == searchQuery 255 ){ location.href='https://www.etlandmall.co.kr/pc/themecategory/ojakgyoMain.do;'; 256 } else { 257// xtractorUpdateCookie('xtr_innerkw',searchForm.query.value); 258 259 if(tempQuery == searchQuery){ 260 location.href=queryUrl; 261 } else { 262 //2025-01-10 ìì ìì²(ê°ë°) 263 //searchForm.submit(); 264 location.href = '/pc/search/search.do?firstSearch=Y&query=' + searchQuery; 265 } 266 } 267} 268// ìë¨ ë¸ëë ë°°ë í´ë¦ì ê²ìíì´ì§ 269function doBrandSearchTop(searchWord){ 270 var searchForm = document.searchTop; 271 searchForm.query.value = searchWord; 272 xtractorUpdateCookie('xtr_innerkw',searchForm.query.value); 273 searchForm.submit(); 274} 275// 컬ë ì ë³ ê²ì 276function doCollection(coll) { 277 var searchForm = document.search; 278 searchForm.collection.value = coll; 279 searchForm.reQuery.value = "2"; 280 searchForm.submit(); 281} 282//ìí° ì²´í¬ 283function pressCheck() { 284 if (event.keyCode == 13) { 285 return doreSearch(); 286 }else{ 287 return false; 288 } 289} 290//ìí° Top 291function pressCheckSearch(event) { 292 if (event.keyCode == 13) { 293 doSearchTop(); 294 } 295} 296 297/*function pressCheckTop() { 298 var searchForm = document.searchTop; 299 if (event.keyCode == 13) { 300 searchForm.query.focus(); 301 return false; 302 } else { 303 xtractorUpdateCookie('xtr_innerkw',searchForm.query.value); 304 searchForm.submit(); 305 } 306}*/ 307var temp_query = ""; 308 309//ê²°ê³¼ë´ ì¬ê²ì 310function checkReSearch() { 311 var searchForm = document.search; 312 var reQuery = searchForm.reQuery; 313 reQuery.value="1"; 314 return doreSearch(); 315} 316//ê²°ê³¼ë´ ì¬ê²ì 317function doreSearch() { 318 var searchForm = document.search; 319 searchForm.reQuery.value="1"; 320 if (searchForm.reSearch.value.trim() == "") { 321 alert("ê²ìì´ë¥¼ ì ë ¥íì¸ì."); 322 searchForm.reSearch.focus(); 323 return; 324 } else {
325 xtractorUpdateCookie('xtr_innerkw',searchForm.reSearch.value); 326 searchForm.collection.value = "ALL"; 327 searchForm.contCheck.value=0; 328 searchForm.startCount.value = 0; 329 searchForm.startCount_product.value = 0; 330 searchForm.startCount_emagazine.value = 0; 331 searchForm.startCount_exhibitions.value = 0; 332 searchForm.startCount_review.value = 0; 333 searchForm.searchField.value = "ALL"; 334 searchForm.sort.value = "RANK"; 335 searchForm.submit(); 336 } 337} 338//ì¹´í ê³ ë¦¬ ëì¤ ì íì 339function doCategory1(category, depth) { 340 var searchForm = document.search; 341 var searchTop = document.searchTop; 342 $('#search').attr('action', '#sh_cateList'); 343 searchForm.category.value = category; 344 searchForm.category_name.value = category; 345 searchForm.depth.value = depth; 346 //searchForm.realQuery.value = query; 347 searchTop.query.value = searchForm.realQuery.value; 348 searchForm.startCount_product.value = 0; 349 searchForm.searchField.value = "ALL"; 350 searchForm.collection.value = "ALL"; 351 searchForm.sort.value = "RANK"; 352 searchForm.submit(); 353} 354 355//ì¹´í ê³ ë¦¬ ëì¤ ì´ê¸°í 356function doCategoryInit() { 357 var searchForm = document.search; 358 $('#search').attr('action', '#sh_cateList'); 359 searchForm.category.value = ""; 360 searchForm.depth.value = 1; 361 searchForm.cate_depth.value = 0; 362 searchForm.startCount_product.value = 0; 363 searchForm.searchField.value = "ALL"; 364 searchForm.collection.value = "ALL"; 365 searchForm.sort.value = "RANK"; 366 searchForm.submit(); 367} 368//íì´ì§ 369function doPaging(count) { 370 var searchForm = document.search; 371 searchForm.startCount.value = count; 372 searchForm.reQuery.value = "2"; 373 searchForm.submit(); 374} 375 376//ì°í¸ë²í¸íì´ì§ 377function doPostPaging(count) { 378 var searchForm = document.searchForm; 379 searchForm.startCount.value = count; 380 searchForm.submitYn.value="Y"; 381 searchForm.submit(); 382} 383// ê¸°ê° ì ì© 384function doRange() { 385 var searchForm = document.search; 386 387 if($("#startDate").val() != "" || $("#endDate").val() != "") { 388 if($("#startDate").val() == "") { 389 alert("ììì¼ì ì ë ¥íì¸ì."); 390 $("#startDate").focus(); 391 return; 392 } 393 394 if($("#endDate").val() == "") { 395 alert("ì¢ ë£ì¼ì ì ë ¥íì¸ì."); 396 $("#endDate").focus(); 397 return; 398 } 399 400 if(!compareStringNum($("#startDate").val(), $("#endDate").val(), ".")) { 401 alert("기ê°ì´ ì¬ë°ë¥´ì§ ììµëë¤. ììì¼ì´ ì¢ ë£ì¼ë³´ë¤ ìê±°ë ê°ëë¡ íì¸ì."); 402 $("#startDate").focus(); 403 return; 404 } 405 } 406 407 searchForm.startDate.value = $("#startDate").val(); 408 searchForm.endDate.value = $("#endDate").val(); 409 searchForm.range.value = $("#range").val(); 410 searchForm.reQuery.value = "2"; 411 searchForm.submit(); 412} 413// ìì 414function doSearchField(field) { 415 var searchForm = document.search; 416 searchForm.searchField.value = field; 417 searchForm.reQuery.value = "2"; 418 searchForm.submit(); 419} 420// 문ìì´ ì«ì ë¹êµ 421function compareStringNum(str1, str2, repStr) { 422 var num1 = parseInt(replaceAll(str1, repStr, "")); 423 var num2 = parseInt(replaceAll(str2, repStr, "")); 424 425 if (num1 > num2) { 426 return false; 427 } else { 428 return true; 429 } 430} 431// Replace All 432function replaceAll(str, orgStr, repStr) { 433 return str.split(orgStr).join(repStr); 434} 435// 공백 ì ê±° 436function trim(str) { 437 return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); 438} 439//ì¸ê¸°ê²ìì´ 440function getPopkeyword() { 441 var target = "popword"; 442 var range = "W"; 443 var collection = "pc"; 444 var datatype = "json"; 445 $.ajax({ 446 type: "POST", 447 url: "/pc/search/popword/popword.do", 448// dataType: "xml", 449 data: { "target" : target, "range" : range, "collection" : collection , "datatype" : datatype }, 450 success: function(xml) { 451 var str = ""; 452 $(xml).find("Query").each(function(){ 453 var dspPopword = ""; 454 dspPopword = $(this).text(); 455 if (dspPopword.length > 10) { 456 dspPopword = dspPopword.substring(0, 9) + ".."; 457 } 458 var popcount = $(this).attr("count"); 459 if(popcount == -1){ 460 popcount = ''; 461 }else{ 462 popcount = $(this).attr("count"); 463 } 464 //var img_main = "<c:out value='${frontDomain}'/>"; 465 var tmp_updown = ""; 466 var updown = $(this).attr("updown"); 467 if(updown == "C"){ 468 tmp_updown = "<i class=\"best_ico none\">-</i>"; 469 }else if(updown == "U"){ 470 tmp_updown = "<i class=\"best_ico co_red\">â² <span>" + popcount + "</span></i>"; 471 }else if(updown== "D"){ 472 tmp_updown = "<i class=\"best_ico co_blue\">â¼ <span>" + popcount + "</span></i>"; 473 }else if(updown== "N"){ 474 tmp_updown = "<i class=\"best_ico best_ico_new\"><img src=\"https://www.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_new2.gif\" alt=\"New\"></i>"; 475 }else{ 476 tmp_updown = ""; 477 } 478 479 var imgCount = $(this).attr("id"); 480 481 482 483 if(imgCount == 1){ 484 str += "<li class=\"f\"><a href=\"javascript:void(0)\" onclick=\"javascript:doKeyword('" + $(this).text() + "');\"><em><img src=\"https://www.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_num1.gif\" alt=\"1\"></em><span>" + $(this).text() + "</span></a>" + tmp_updown + "</li>"; 485 }else if(imgCount == 10){ 486 str += "<li class=\"l\"><a href=\"javascript:void(0)\" onclick=\"javascript:doKeyword('" + $(this).text() + "');\"><em><img src=\"https://www.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_num10.gif\" alt=\"10\"></em><span>" + $(this).text() + "</span></a>" + tmp_updown + "</li>"; 487 }else{ 488 str += "<li><a href=\"javascript:void(0)\" onclick=\"javascript:doKeyword('" + $(this).text() + "');\"><em><img src=\"https://www.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_num"+imgCount+".gif\" alt=\"" + imgCount + "\"></em><span>" + $(this).text() + "</span></a>" + tmp_updown + "</li>"; 489 } 490 491 }); 492 493 $("#popword").html(str); 494 } 495 }); 496 497} 498//롤ë§ì¸ê¸°ê²ìì´ 499function getRollingPopkeyword() { 500 501 var target = "popword"; 502 var range = "W"; 503 var collection = "pc"; 504 var datatype = "xml"; 505 $.ajax({
506 type: "POST", 507 url: "/pc/search/popword/popword.do", 508 dataType: "xml", 509 data: { "target" : target, "range" : range, "collection" : collection , "datatype" : datatype }, 510 success: function(xml) { 511 var str = ""; 512 $(xml).find("Query").each(function(){ 513 var dspPopword = ""; 514 dspPopword = $(this).text(); 515 if (dspPopword.length > 10) { 516 dspPopword = dspPopword.substring(0, 9) + ".."; 517 } 518 519 var popcount = $(this).attr("count"); 520 if(popcount == -1){ 521 popcount = ''; 522 }else{ 523 popcount = $(this).attr("count"); 524 } 525 //var img_main = "<c:out value='${frontDomain}'/>"; 526 var tmp_updown = ""; 527 var updown = $(this).attr("updown"); 528 if(updown == "C"){ 529 tmp_updown = "<i class=\"best_ico none\">-</i>"; 530 }else if(updown == "U"){ 531 tmp_updown = "<i class=\"best_ico co_red\">â² <span>" + popcount + "</span></i>"; 532 }else if(updown== "D"){ 533 tmp_updown = "<i class=\"best_ico co_blue\">â¼ <span>" + popcount + "</span></i>"; 534 }else if(updown== "N"){ 535 //tmp_updown = "<i class=\"best_ico best_ico_new\"><img src=\"http://image.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_new2.gif\" alt=\"New\" ></i>"; 536 tmp_updown = "<i class=\"best_ico best_ico_new\"><img src=\"https://www.etlandmall.co.kr/nas/cdn/pc/img/ico/ico_new2.gif\" alt=\"New\" ></i>"; 537 }else{ 538 tmp_updown = ""; 539 } 540 541 var imgCount = $(this).attr("id"); 542 543 544 str += "<li><a href=\"#\" onclick=\"javascript:doKeyword('" + $(this).text() + "');\" class=\"tx_link\"><span><Strong>" + $(this).attr("id") + " </Strong>" + $(this).text() + "</span> " + tmp_updown + "</a></li>"; 545 546 }); 547 548 $("#rollingPopword").html(str); 549 } 550 }); 551 552} 553 554//ì°ê´ê²ìì´(ì¶ì²ê²ìì´) 555function getRecommend(query) { 556 557 var target = "recommend"; 558 559 var label = "_ALL_"; 560 561 var charset = "UTF-8"; 562 563 564 $.ajax({ 565 566 type: "POST", 567 568 url: "/pc/search/popword/popword.do", 569 570 dataType: "xml", 571 572 data: {"target":target,"query" : query , "label": label , "charset" : charset}, 573 574 success: function(xml) { 575 576 var str = "<li class=\"tit\">"; 577 578 //str += "<div class=\"timg\">ì¶ì²ê²ìì´</div>"; 579 580 str += "</li>"; 581 582 $(xml).find("Word").each(function(){ 583 584 str += "<a href=\"#\" onclick=\"javascript:doKeyword('" + $(this).text() + "');\"><span>" + $(this).text() + "</span></a>"; 585 586 }); 587 588 $("#recommendword").html(str); 589 590 } 591 592 }); 593 594} 595 596//ê²ì ì ë ¥ì°½ í¬ì»¤ì¤ ìì ë ê²½ì° ë«ìì¤ 597function closeAutoSearch() { 598 setTimeout(function() { 599 $('#ark_content_list').hide(); 600 }, 100); 601}
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.