function Remember_Srch_Keyword(save_txt) { if (Stop_Smart_Srch == 1) { swal({ title: "", text: '°Ë»öµÈ °á°ú°¡ ¾ø½À´Ï´Ù.', timer: 2000, showConfirmButton: false, allowOutsideClick: true }); event.stopImmediatePropagation(); return false; } var srch_txt = $("#s_srch_frm input[name=search_txt]").val().trim(); var smart_srch_lat = ''; var smart_srch_lng = ''; var smart_srch_tmd = ''; var tmd_info = ''; // smart °Ë»ö¾î ÀúÀåÇÏÁö ¾ÊÀ½. if (save_txt == 0) { } // ÀÚµ¿¿Ï¼º¿¡¼ ¼±ÅÃÇÑ ¸ñ·Ï¾øÀÌ smart °Ë»öÇÒ¶§, °Ë»ö¾î¿Í °°Àº ¼ÒÀçÁöÀÇ ÀÚµ¿¿Ï¼º ¸ñ·ÏÀÌ ÀÖÀ» °æ¿ì ÁÂÇ¥ ÀúÀå else if ($("#s_srch_frm input[name=lat]").val() == '' || $("#s_srch_frm input[name=lng]").val() == '' ) { var auto_comp_A = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC_4_CALLBACK_FUNC; if (typeof auto_comp_A != 'undefined' && auto_comp_A.length > 0) { for (var tac_iii = 0; tac_iii < auto_comp_A.length; tac_iii++) { if (srch_txt == auto_comp_A[tac_iii].address_full || srch_txt == auto_comp_A[tac_iii].address_full_org || (tmp_auto_comp_list.Psed_Arr.sido == auto_comp_A[tac_iii].sido && tmp_auto_comp_list.Psed_Arr.sgg == auto_comp_A[tac_iii].sgg && tmp_auto_comp_list.Psed_Arr.umd == auto_comp_A[tac_iii].umd && tmp_auto_comp_list.Psed_Arr.li == auto_comp_A[tac_iii].li && tmp_auto_comp_list.Psed_Arr.san == auto_comp_A[tac_iii].san && tmp_auto_comp_list.Psed_Arr.bon == auto_comp_A[tac_iii].bon && tmp_auto_comp_list.Psed_Arr.bu == auto_comp_A[tac_iii].bu ) || (tmp_auto_comp_list.Psed_Arr.sido == auto_comp_A[tac_iii].sido && tmp_auto_comp_list.Psed_Arr.sgg == auto_comp_A[tac_iii].sgg && tmp_auto_comp_list.Psed_Arr.st_nm == auto_comp_A[tac_iii].st_nm && tmp_auto_comp_list.Psed_Arr.b_bon == auto_comp_A[tac_iii].b_bon && tmp_auto_comp_list.Psed_Arr.b_bu == auto_comp_A[tac_iii].b_bu ) ) { smart_srch_lat = auto_comp_A[tac_iii].lat; smart_srch_lng = auto_comp_A[tac_iii].lng; smart_srch_tmd = auto_comp_A[tac_iii].li_cate + '_' + auto_comp_A[tac_iii].idx07 + '_' + auto_comp_A[tac_iii].cc + '_' + auto_comp_A[tac_iii].sn + '_' + auto_comp_A[tac_iii].rn; break; } } } // --- if ($("#frm_bg_log input[name=tk_pid]").val() == 'map_srch' && smart_srch_lat == '' && smart_srch_lng == '' && typeof tmp_auto_comp_list.DATA_4_CALLBACK_FUNC != 'undefined' && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC.length > 0 && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat != 'NF' && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat > 0 && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng > 0 ) { smart_srch_lat = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat; smart_srch_lng = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng; smart_srch_tmd = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].idx07 + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].cc + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].rn; } } else { // ÀÚµ¿¿Ï¼º ¸ñ·Ï¿¡¼ ¼±ÅÃÇÑ °Ë»ö¾îÀÇ ÁÂÇ¥¸¦ ÄíÅ°¿¡ ÀúÀå if ($("#s_srch_frm input[name=lat]").val()) smart_srch_lat = $("#s_srch_frm input[name=lat]").val(); if ($("#s_srch_frm input[name=lng]").val()) smart_srch_lng = $("#s_srch_frm input[name=lng]").val(); } // smart °Ë»öâ¿¡ ÀÔ·ÂÇÑ °Ë»ö¾î¸¦ ÄíÅ°¿¡ ÀúÀå ÀúÀå // °Ë»ö¾î ¹× ÁÂÇ¥ ÀúÀå // -------------------------------------------------- var exist_word = 0; var tmp_latlng = getStorage('smt_srch_latlng'); ex_latlng = tmp_latlng.split('!_!'); var tmp_srch_txt = getStorage('search_txt'); ex_srch_txt = tmp_srch_txt.split('!_!'); var tmp_srch_tmd = getStorage('smt_srch_tmd'); ex_srch_tmd = tmp_srch_tmd.split('!_!'); if (ex_srch_txt.length > 0) for (var s_iii = 0; s_iii < ex_srch_txt.length; s_iii++) { // ÀÌÀü¿¡ °Ë»öÇß´ø history ÀÏ °æ¿ì Ãß°¡·Î ÀúÀåÇÏÁö ¾ÊÀ½, ÀúÀåµÈ ÁÂÇ¥°¡ ¾ø´Ù¸é ÁÂÇ¥ ÀúÀå if (srch_txt == ex_srch_txt[s_iii].trim()) { exist_word = 1; if (smart_srch_lat && smart_srch_lng && ex_latlng[s_iii] == '') ex_latlng[s_iii] = smart_srch_lat + ',' + smart_srch_lng; break; } } // ÀÌÀü¿¡ °Ë»öÇغ» smart °Ë»ö¾î¶ó¸é °Ë»ö¾î, ÁÂÇ¥ refresh if (exist_word == 1) { if (ex_srch_txt.length > 0) setStorage('search_txt', ex_srch_txt.join('!_!')); if (ex_latlng.length > 0) setStorage('smt_srch_latlng', ex_latlng.join('!_!')); if (ex_srch_tmd.length > 0) setStorage('smt_srch_tmd', ex_latlng.join('!_!')); } // óÀ½ °Ë»öÇÏ´Â smart °Ë»ö¾îÀ϶§ °Ë»ö¾î¿Í, ÁÂÇ¥¸¦ Ãß°¡·Î ÀúÀå else if (exist_word == 0) { tmp_srch_txt += '!_!' + srch_txt; setStorage('search_txt', tmp_srch_txt); // --- tmp_latlng += '!_!' + smart_srch_lat + ',' + smart_srch_lng; setStorage('smt_srch_latlng', tmp_latlng); // --- tmp_srch_tmd += '!_!' + smart_srch_tmd; setStorage('smt_srch_tmd', tmp_srch_tmd); } // --- // Áöµµ°Ë»öÀ϶§ Áöµµ¿¡¼ smart °Ë»öÀ¸·Î ãÀº ÀÚµ¿¿Ï¼º¸ñ·ÏÀÇ ÁÂÇ¥·Î À̵¿ if ($("#frm_bg_log input[name=tk_pid]").val() == 'map_srch') { if (save_txt == 4) return false; if (typeof tmp_auto_comp_list.DATA_4_CALLBACK_FUNC != 'undefined' && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC.length > 0 && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat != 'NF' && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat > 0 && tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng > 0 ) { if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'kyg' || tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'pre' || tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'gng' || tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'bun' ) { //if(tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].idx07 == 'tmd') // tmd_info = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate+'_'+tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].idx07+'_'+tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].cc+'_'+tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn+'_'+tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].rn; //else // tmd_info = ''; tmd_info = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].idx07 + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].cc + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn + '_' + tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].rn; changeMapCenter(tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat, tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng, 1, tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate, tmd_info); } else changeMapCenter(tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat, tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng, 1, '', ''); } else if ($("#s_srch_frm input[name=lat]").val() != 'NF' && $("#s_srch_frm input[name=lat]").val() > 0 && $("#s_srch_frm input[name=lng]").val() > 0) changeMapCenter($("#s_srch_frm input[name=lat]").val(), $("#s_srch_frm input[name=lng]").val(), 1, '', ''); else if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lat == '' || tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].lng == '' ) { var dvw_cc = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].cc; var dvw_sn = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn; var dvw_rn = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].rn; var dvw_sn_1 = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn_1; var dvw_sn_2 = tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].sn_2; // --- if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'kyg') Detail_View('°æ¸Å', dvw_cc, dvw_sn, dvw_rn, dvw_sn_1, dvw_sn_2); else if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'pre') Detail_View('¿¹Á¤', dvw_cc, dvw_sn, dvw_rn, dvw_sn_1, dvw_sn_2); else if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'gng') Detail_View('°ø¸Å', dvw_cc, dvw_sn, dvw_rn, dvw_sn_1, dvw_sn_2); else if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'gen') Detail_View('¸Å¹°', dvw_cc, dvw_sn, dvw_rn, dvw_sn_1, dvw_sn_2); else if (tmp_auto_comp_list.DATA_4_CALLBACK_FUNC[0].li_cate == 'bun') Detail_View('ºÐ¾ç', dvw_cc, dvw_sn, dvw_rn, dvw_sn_1, dvw_sn_2); } $("#s_srch_frm input[name=lat]").val(''); $("#s_srch_frm input[name=lng]").val(''); return false; } else if (ac_kyg == 0 && ac_pre == 0 && ac_gen == 0 && ac_gng == 0 && ac_bun == 0 ) { if (save_txt == 3 && (ac_lat == '' || ac_lat == 'NF' || ac_lng == '')) { return true; } else if ($("#detail_srch_frm [name=srch_rst_tp]").val() == 'map') { changeMapCenter(ac_lat, ac_lng, 1, '', ''); } else { history.go(-1); location.href = "/wdir/¹°°Ç/°Ë»ö/ÅëÇÕÁöµµ/_?center_lat=" + ac_lat + "¢er_lng=" + ac_lng; } // --- return false; } else if (save_txt == 1) { } else history.go(-1); } function chk_smart_srch_word(frm_nm, el_nm) { if ($("#" + frm_nm + " input[name=" + el_nm + "]").val() == '') fill_word_list(); } function input_cursor(act_tp) { //if(act_tp == 'on') //{ // d_sty = ''; // setTimeout(function(){ $("#smart_srch_cursor").css('display', 'none'); }, 3000); //} //else d_sty = 'none'; //$("#smart_srch_cursor").css('display', d_sty); } function use_this_word(srch_word, lat, lng) { $(".ui-autocomplete").css('display', 'none'); $("#s_srch_frm input[name=search_txt]").val(srch_word); if ($("#frm_bg_log input[name=tk_pid]").val() == 'map_srch') { $("#s_srch_frm input[name=lat]").val(lat); $("#s_srch_frm input[name=lng]").val(lng); } history.go(-1); } // ----------------------------------- function fill_word_list() { var tk_pid_han = $("#track_frm input[name=tk_pid_han]").val(); if ($("#s_srch_frm input[name=search_txt]").val() != '') return false; // --- var object = new Object(); //var tmp_srch_txt = test_getCookie('search_txt'); // ex_srch_txt = tmp_srch_txt.split('!_!'); //var tmp_latlng = test_getCookie('smt_srch_latlng'); // ex_tmp_latlng = tmp_latlng.split('!_!'); var tmp_srch_txt = getStorage('search_txt'); ex_srch_txt = tmp_srch_txt.split('!_!'); var tmp_latlng = getStorage('smt_srch_latlng'); ex_tmp_latlng = tmp_latlng.split('!_!'); var tmp_tmd = getStorage('smt_srch_tmd'); ex_tmp_tmd = tmp_tmd.split('!_!'); $(".ui-autocomplete").html(''); if (ex_srch_txt.length > 0) { ex_srch_txt.reverse(); ex_tmp_latlng.reverse(); ex_tmp_tmd.reverse(); for (var s_iii = 0; s_iii < ex_srch_txt.length; s_iii++) { if (ex_srch_txt[s_iii] == '') continue; var e_html = ""; e_html += "