try { var g_afd = "autotimes2_web"; var doc_char = document.charset; var dom; var CLink; var base_url; var script_url; var obj_kl_js; var obj_clscript; var is_exist_repl; if (g_afd == "seoul2_web" || g_afd == "seoulm2_web" || g_afd =='boomseoul2_web') { document.domain = "seoul.co.kr"; dom = parent.document; base_url = escape(""); } else { dom = document; base_url = document.location; base_url = cl_toSafeEscape(base_url); } CLink = dom.getElementById("CLink"); if (g_afd == "ttalk2_web") { var interval_process2 = setInterval("StartClkComplete();",200); } else { var script_url = "http://script.keywordlink.co.kr/script/klink_script2.php?afd="+g_afd+"&base_url="+base_url+"&doc_char="+doc_char; obj_clscript = dom.createElement("script"); obj_clscript.setAttribute("src", script_url); CLink.appendChild(obj_clscript); } } catch(e) { ; } function StartClkComplete() { try { var dom_ready = document.readyState; if (dom_ready == "complete") { clearInterval(interval_process2); is_exist_repl = get_repl(); var script_url = "http://script.keywordlink.co.kr/script/klink_script2.php?afd="+g_afd+"&base_url="+base_url+"&doc_char="+doc_char+"&is_exist_repl="+is_exist_repl; obj_clscript = dom.createElement("script"); obj_clscript.setAttribute("src", script_url); CLink.appendChild(obj_clscript); } } catch(e) { kl_process_log("StartKLinkComplete",e.message,"001"); } } function get_repl() { if (!document.getElementsByClassName) { document.getElementsByClassName = function (cn) { var rx = new RegExp("\b" + cn + "\b"), allT = document.getElementsByTagName("*"), allCN = [], i = 0, a; while (a = allT[i++]) { if (a.className && a.className.indexOf(cn) + 1) { if(a.className===cn){ allCN[allCN.length] = a; continue; } rx.test(a.className) ? (allCN[allCN.length] = a) : 0; } } return allCN; } } replText = document.getElementsByClassName('replText'); if(replText[0] != null) { return "yes"; } else { return "no"; } } function cl_toSafeString(obj) { var ret = ""; var undef; try { if (obj == undef) return ""; ret = obj.toString(); } catch (e) { ret = ""; } return ret; } function cl_toSafeEscape(obj) { var ret = cl_toSafeString(obj); try { ret = encodeURIComponent(ret); } catch(e) { ret = escape(ret); } return ret; }