if (/Chrome|Firefox|rv:11\.0/.test(navigator.userAgent)) c13 = c19[18];
c3 = c3.replace(/%p%/g, c50);
if (v3 != '') v3 = addhttp(v3);
if (v4 != '') v4 = addhttp(v4);
function addhttp(a) {
if (a.indexOf("://") == -1) a = LR_imgurl + a;
return a;
}
if (!savechat(1)) c38 = 0;
if (navigator.appVersion.indexOf("MSIE") == -1) c69 = 0;
var isFocus = false;
var shortcut = "Enter";
var fontobj = new Object();
if (lng == 'en') fontname = 'Tahoma';
fontobj.fontname = fontname;
fontobj.isbold = false;
fontobj.isitalic = false;
fontobj.isunderline = false;
fontobj.fontsize = 14;
var MaxID = 0;
var wordscheckstring = "|";
var timerID = null;
var newtext = "";
var newtext1 = "";
var sendingtext = "";
var presendtext = "";
var sendedtemptext = "";
var sending = 0;
var autoanswer0_time = 0;
var autoanswer1_time = 0;
var autoanswer2_time = 0;
var autoanswer3_time = 0;
var chatendcheck = 1;
var Intervalid = null;
var owordscount = 0;
function showtel(a) {
var obj = $("telephone").style;
if (a) { obj.display = 'none'; return; }
if (c75 && Telurl == '') obj.display = "block";
}
var rgstarted = 0;
function RGStart() {
if (rgstarted) return;
rgstarted = 1;
if (typeof PostCall0 != "undefined") PostCall0 = setInterval("PostCall1();", 1e4);
f8("start");
}
function LastFunction() {
setTimeout("resizeChatWin();", 500);
if (typeof f18_out() == "undefined") {
setTimeout("LastFunction();", 50);
return;
}
showtel();
if (c36) {
if (v10) {
f20(c10, 3, c85 + " " + GetNowTime(), true);
f21(c6[0]);
return;
}
if (LR_msg != '') {
var _msg = CheckSendFormHis(LR_msg);
f20(_msg, 2, "", true);
}
RGStart();
} else {
f21(c19[22]);
f20(c5 + '
' + c19[9] + '
' + offbtn() + '
', 1, "", true); if (c11 == 1) robot(); } } function LY_end(a, b) { if (a == 0) { f20(b ? n3 : c6[17], 3, c101 + " " + GetNowTime(), true); } $('tel').value = t3; } function offbtn() { return ''; } function robot() { f20(c10, 3, c85 + " " + GetNowTime(), true); f21(c6[0]); } function Trim(a) { return a.replace(/(^\s*)|(\s*$)/g, ''); } function isTel(a) { if (lng != 'cn' && lng != 'big5') return true; var isPhone = /^0([0-9]{2,3}-|[1-9]{2,3})?[0-9]{7,8}$/; var isMob = /^((\+?86)|(\(\+86\)))?(1[3456789][0123456789][0-9]{8})$/; var isHKPhone = /^([\\+]852\s*[69]|(852)\s*[69]|[69])\d{3}\s*\d{4}$/; var isTWPhone = /^(09)\d{8}$/; var isTWTel = /^0([0-9]{1,2})([\\-]|\s*)\d{6,8}$/; var isTGPhone = /^(0[89])([\\-]|\s*)\d{4}([\\-]|\s*)\d{4}$/; var isTGTel = /^(0[23])([\\-]|\s*)\d{3}([\\-]|\s*)\d{4}$/; var isYNPhone = /^0(9([\\-]|\s*)|1([\\-]|\s*)[0-9]{1})\d{8}$/; var isYNTel = /^(04)([\\-]|\s*)\d{3}([\\-]|\s*)\d{4}$/; return (isMob.test(a) || isPhone.test(a) || isHKPhone.test(a) || isTWPhone.test(a) || isTWTel.test(a) || isTGPhone.test(a) || isTGTel.test(a) || isYNPhone.test(a) || isYNTel.test(a)); } function LY_check1(obj) { var tel = Trim(obj.value); if (tel == t3) { return; } if (!isTel(tel)) { return; } GuestTel = '|' + encodeURIComponent(tel); var bb = 'tel=' + escape(tel); if ($('ccode1')) bb += '&ccode=' + escape(Trim($('ccode1').value)); bb += '&id=' + escape(LR_websiteid) + '&sid=' + escape(LR_sid) + '&cid=' + escape(LR_cid) + '&lng=' + escape(lng) + '&p=' + escape(c50) + '&e=' + escape(LR_ex) + '&un=' + escape(LR_un) + '&ud=' + escape(LR_ud); LR_hcloopJS(LR_sysurl + 'lr/sendnote160711.aspx', bb); } function updateIMg1() { $('telephone').style.display = 'none'; } function inputfocus(obj, a) { if (obj.value == getAttributeValue(obj, 'defaultval')) obj.value = ""; obj.style.color = 'black'; if (!a) obj.style.border = "2px solid #82C6ED"; } function inputblur(obj, a) { if (obj.value == '') { obj.value = getAttributeValue(obj, 'defaultval'); obj.style.color = 'rgb(153, 153, 153)'; } if (!a) obj.style.border = "1px solid #D5D5D5"; if ($('LY_pmt')) $('LY_pmt').innerHTML = c6[1]; if ($('tel_P')) $('tel_P').innerHTML = c6[13]; } function hiddenC1(wy, sobj) { sobj.style.backgroundPosition = wy + "px -50px"; } function showC1(wy, sobj) { sobj.style.backgroundPosition = wy + "px -100px"; } function getAttributeValue(o, a) { if (!o.attributes) { return null } var b = o.attributes; for (var i = 0; i < b.length; i++) { if (a.toLowerCase() == b[i].name.toLowerCase()) { return b[i].value } } return null } var if_list = new Array(); var uploadtype = 0; function showContent(i) { var tar = $("toolsbar1"); tar.style.display = "block"; tar.style.right = ""; tar.style.left = "181px"; resizeChatWin(); if (i == 1) { tar.style.height = "210px"; tar.style.width = "360px"; if (if_list[i] == null) { if_list[i] = document.createElement("DIV"); with (if_list[i].style) { width = "100%"; height = "100%"; overflow = "hidden"; } tar.appendChild(if_list[i]); if_list[i].innerHTML = ''; } else { if (if_list[i].style.display != "none") { hiddenContent(); return; } if_list[i].style.display = "block"; } hiddenContent(i); } if (i == 5) { tar.style.left = ""; tar.style.right = "136px"; resizeChatWin(); tar.style.height = t0 + "px"; tar.style.width = t1 + "px"; if (if_list[i] == null) { if_list[i] = document.createElement("DIV"); with (if_list[i].style) { width = "100%"; height = "100%"; overflow = "hidden"; } tar.appendChild(if_list[i]); if_list[i].innerHTML = t2; } else { if_list[i].style.display = "block"; } hiddenContent(i); } if (i == 4) { if ($("weixin_img") == null) { tar.style.height = "210px"; tar.style.width = "300px"; } else { tar.style.height = $("weixin_img").height + 35 + "px"; tar.style.width = $("weixin_img").width + 20 + "px"; } if (if_list[i] == null) { if_list[i] = document.createElement("DIV"); with (if_list[i].style) { width = "100%"; height = "100%"; overflow = "hidden"; } tar.appendChild(if_list[i]); if_list[i].innerHTML = '"; f21(c2.replace("%s1%", serverkindname)); } function showChatpre() { LR_m_d = LR_m_e(true, false, true); AddmodalDiv("Chatpreobj", chatpre_show_content, 450); f7(); } function closechat() { _BeforeWinExit = 1; window.location = "closeandcheckinvite.aspx?id=" + LR_siteid + "&sid=" + LR_sid + "&lng=" + lng + "&d=" + new Date().getTime(); } function f2(n) { if (n < 10) { return "0" + n; } else { return n.toString(); } } function GetNowTime() { var d = new Date(); return f2(d.getHours()) + ":" + f2(d.getMinutes()) + ":" + f2(d.getSeconds()); } function f14() { if (isstarted == 0) { f8("start"); return; } if (serverkindname != "") { newtext += ",ACT_SERVERKIND|" + serverkind + "|" + encodeURIComponent(serverkindname); serverkindname = ""; } if (GuestTel != "") { newtext += ",ACT_TEL|" + GuestTel; GuestTel = ""; } if (pj != "" && pj != "1") { newtext += ",ACT_PJ|" + pj; pj = "1"; } if (typeof reservecontent != "undefined" && reservecontent != "" && reservecontent != "1") { newtext += ",ACT_YY|" + reservecontent; reservecontent = "1"; } f8("check"); } var LRppid = ""; function showTime() { obj = $("pmtdiv"); if (obj.style.display == "none") { obj.style.display = ""; resize(); c113 = unescape(c113.replace(/\\+/g, "%20")); } $("pmtdiv1").innerHTML = c113.replace("%s%", c112.toString()); if (c112 == 0) { if (Intervalid != null) { clearInterval(Intervalid); Intervalid = null; } f8("end1"); } c112--; } var timerID_answermore = null; var _oname = null; var chated_own = 0; function autoanswermore() { if (c118 == "" || wordscheckstring == null) { if (timerID_answermore != null) { clearTimeout(timerID_answermore); timerID_answermore = null; } return; } if (c130 == 1) { if (LR_getCookie('chated') == '1') { if (chated_own == 0) return; } else { LR_SetCookie('chated', '1', 60); chated_own = 1; } } if (autoanswer0_time == 0) { timerID_answermore = setTimeout("autoanswermore()", 1e3); return; } var ntime = new Date().getTime(); var n = c118.indexOf(","); if (n > 0) { var s = c118.substring(0, n); var wtime = ntime - autoanswer0_time; var wtime1 = parseInt(s) * 1e3; if (wtime >= wtime1) { c118 = c118.substring(n + 1, c118.length); n = c118.indexOf("|"); var tt = c118.substring(0, n).replace(/\+/g, "%20"); c118 = c118.substring(n + 1, c118.length); var ka = tt.split("%7B%23%23%7D"); var kat = tt; if (ka.length > 1) { if (typeof (LR_skey) == "string" && LR_skey.length > 0) { if (ka[1].length > 0) kat = ka[1].replace(/%7Bkeyword%7D/g, LR_skey); else kat = ka[0]; } else { kat = ka[0]; } } addnewtext(",ACT_AR|" + kat); kat = decodeURIComponent(kat); f20(kat, 3, '', true); } } timerID_answermore = setTimeout("autoanswermore()", 1e3); } function addnewtext(_text0) { if (newtext1.indexOf(_text0) == -1) newtext1 += _text0; } function autoanswer() { if (parseInt(c93) > 0 && parseInt(autoanswer0_time) > 0 && new Date().getTime() - parseInt(autoanswer0_time) > parseInt(c93) * 1e3) { c93 = 0; var tt = c94; var ka = tt.split("{##}"); var kat = tt; if (ka.length > 1) { if (typeof (LR_skey) == "string" && LR_skey.length > 0) { if (ka[1].length > 0) kat = ka[1].replace(/{keyword}/g, decodeURIComponent(LR_skey)); else kat = ka[0]; } else { kat = ka[0]; } } addnewtext(",ACT_AR|" + escape(kat)); f20(kat, 3, c101 + " " + GetNowTime(), true); } if (parseInt(c95) > 0 && parseInt(autoanswer1_time) > 0 && new Date().getTime() - parseInt(autoanswer1_time) > parseInt(c95) * 1e3 * 60) { autoanswer1_time = 0; var tt = c96; var ka = tt.split("{##}"); var kat = tt; if (ka.length > 1) { if (typeof (LR_skey) == "string" && LR_skey.length > 0) { if (ka[1].length > 0) kat = ka[1].replace(/{keyword}/g, decodeURIComponent(LR_skey)); else kat = ka[0]; } else { kat = ka[0]; } } addnewtext(",ACT_AR|" + escape(kat)); f20(kat, 3, c101 + " " + GetNowTime(), true); } if (parseInt(c97) > 0 && parseInt(autoanswer2_time) > 0 && new Date().getTime() - parseInt(autoanswer2_time) > parseInt(c97) * 1e3 * 60) { autoanswer2_time = 0; var tt = c98; var ka = tt.split("{##}"); var kat = tt; if (ka.length > 1) { if (typeof (LR_skey) == "string" && LR_skey.length > 0) { if (ka[1].length > 0) kat = ka[1].replace(/{keyword}/g, decodeURIComponent(LR_skey)); else kat = ka[0]; } else { kat = ka[0]; } } addnewtext(",ACT_AR|" + escape(kat)); f20(kat, 3, c101 + " " + GetNowTime(), true); } if (parseInt(c99) > 0 && parseInt(autoanswer3_time) > 0 && new Date().getTime() - parseInt(autoanswer3_time) > parseInt(c99) * 1e3) { autoanswer3_time = 0; var tt = c100; var ka = tt.split("{##}"); var kat = tt; if (ka.length > 1) { if (typeof (LR_skey) == "string" && LR_skey.length > 0) { if (ka[1].length > 0) kat = ka[1].replace(/{keyword}/g, decodeURIComponent(LR_skey)); else kat = ka[0]; } else { kat = ka[0]; } } addnewtext(",ACT_AR|" + escape(kat)); f20(kat, 3, c101 + " " + GetNowTime(), true); } } var lurl = ""; var isstarted = 0; function start2(o) { autoanswer0_time = new Date().getTime(); LRppid = o[5]; LRppid = Hwd8F9(LRppid); if (o[0] != "1") timerID_answermore = setTimeout("autoanswermore()", 1e3); if (typeof (Xststartchat) != 'undefined') { Xststartchat(); } else if (typeof (SogouStartchat) != 'undefined') { SogouStartchat(); } else if (typeof (ALiOcpcStartchat) != 'undefined') { ALiOcpcStartchat(); } else if (typeof (OcpcTecentStartchat) != 'undefined') { OcpcTecentStartchat(); } StartCheckNum(); } function getReady(returnvalue) { sending = 0; var isstart = 0; if (returnvalue == "r") { if (sendingtext != "") sendingtext = ""; if (wordscheckstring != null) { clearTimeout(timerID); timerID = null; timerID = setTimeout("f14()", 2e3); } autoanswer(); return; } if (returnvalue == "" || returnvalue == null || returnvalue.indexOf("err") == 0) { if (returnvalue.indexOf("err4") == 0 && sendingtext.length > 20000) sendingtext = ""; if (wordscheckstring != null) { clearTimeout(timerID); timerID = null; timerID = setTimeout("f14()", 2e3); } autoanswer(); return; } isstarted = 1; var rr = returnvalue.split(","); for (w = 0; w < rr.length; w++) { if (rr[w] == "") { continue; } if (rr[w] == "noinput") { f10(shortcutstring == "" ? c15 : shortcutstring); continue; } var o = rr[w].split("|"); if (o.length > 1 && o[0] == "inputting") { f10(c86.replace("{0}", unescape(o[1].replace(/\+/g, "%20")))); continue; } if (o.length > 1 && o[0] == "upload") { if (o[1] == "ReceivingData") { continue; } uploading = false; return; } if (o.length != 6) continue; if (sendingtext != "") sendingtext = ""; o[1] = o[1].replace(/\+/g, "%20"); o[5] = o[5].replace(/\+/g, "%20"); o[1] = f15(unescape(o[1])); o[4] = o[4].replace(/\+/g, "%20"); o[4] = unescape(o[4]); o[5] = unescape(o[5]); if (o[0] == "-1") { if (timerID != null) { clearTimeout(timerID); timerID = null; } getReady("r"); _BeforeWinExit = 1; f21(o[1]); return; } if (o[3] != "") { if (o[4].indexOf("start") != 0) { if (wordscheckstring != null && wordscheckstring.indexOf("|" + o[3] + "|") != -1) { continue; } wordscheckstring += o[3] + "|"; MaxID = o[3]; } switch (o[2]) { case "1": if (o[1].toString().indexOf("%name%") > -1) { o[1] = o[1].toString().replace("%name%", "" + o[5] + ""); } f21(o[1]); break; case "17": uploading = false; f20(o[1], 2, "", true); break; case "16": uploading = false; o[1] = o[1].toString().replace("%c%", "" + c23 + ""); f20(o[1], 1, "", true); break; case "18": o[1] = o[1].toString().replace("%c%", "" + c23 + ""); f20(o[1], 2, "", true); break; case "43": pingjia(); break; case "37": var ooo = o[1].split("|"); for (ww = 0; ww < ooo.length; ww++) { ooo[ww] = ooo[ww].replace(/\+/g, "%20"); ooo[ww] = unescape(ooo[ww]); } if (ooo.length < 6) break; if (ooo[0].length > 0) title0 = window.document.title = ooo[0]; if (ooo[1].length > 0 && $("rightDiv1")) $("rightDiv1").innerHTML = SetLogo(ooo[1], ooo[2], "right"); if (ooo[3].length > 0) { l1 = ooo[3]; $("tbut2").style.display = ""; } if (ooo[4].length > 0) { l2 = ooo[4]; $("tbut3h").href = 'tencent://message/?uin=' + l2 + '&Site=&Menu=yes'; $("tbut3").style.display = ""; } if (ooo[5].length > 0) { v3 = ooo[5]; if ($("topimg")) $("topimg").src = v3; } break; case "46": LR_oname0530 = o[5]; YuYue(); break; case "50": IFrameOpen(o[1]); break; case "-3": c93 = -1; autoanswer3_time = 0; autoanswer2_time = autoanswer1_time = new Date().getTime(); o[5] = o[5].replace("HTTP/1.1 100 Continue", ""); if (o[5] == c85) o[1] = o[1] + RB1(); var _msg = CheckSendFormHis(o[1]); f20(_msg, 3, o[5] + " " + o[0], true, o[3]); _oname = o[5]; play(); break; case "-2": var _msg = CheckSendFormHis(o[1]); try { if (o[3] != '') { if (parseInt(o[3]) > nSendMsgID) nSendMsgID = parseInt(o[3]) + 1; } } catch (e) { } f20(_msg, 2, "", true, o[3]); break; case "3": if (o[5] == "") break; if (chatendcheck && c112 > 0) { chatendcheck = 0; Intervalid = window.setInterval("showTime()", 1e3); } c93 = -1; autoanswer3_time = 0; autoanswer2_time = autoanswer1_time = new Date().getTime(); o[5] = o[5].replace("HTTP/1.1 100 Continue", ""); if (o[5] == c85) o[1] = o[1] + RB1(); var _msg = CheckSendForm(o[1]); f20(_msg, 3, o[5] + " " + GetNowTime(), true, o[3]); LR_Check_Read(); owordscount++; _oname = o[5]; play(); break; case "20": autoanswer3_time = 0; autoanswer2_time = autoanswer1_time = new Date().getTime(); f20(o[1], 0, "", true); break; case "4": autoanswer3_time = 0; autoanswer2_time = autoanswer1_time = new Date().getTime(); var oooo = o[1].split("|"); if (oooo.length == 2) { if (oooo[0] != "") { alert(unescape(oooo[0].replace(/\\+/g, "%20"))); } f8("end"); lurl = unescape(oooo[1]); if (lurl.substring(0, 9) == "transfer:") { lurl = lurl.substring(9, lurl.length); } else { lurl = "custom_url.aspx?url=" + unescape(oooo[1]); } setTimeout("window.location=lurl;", 1500); } else if (oooo.length == 1) { window.open(o[1], o[3], ""); } break; case "22": window.location = o[1]; break; case "-5": DeleteMsg(o[1]); break; case "-4": DeleteMsg(o[1]); break; default: break; } } switch (o[4]) { case "start": start2(o); isstart = 1; break; case "start1": c93 = 0; _oname = o[1]; start2(o); isstart = 1; break; case "restart": f8("start"); return; case "end": closeme(); return; case "print": f21(o[1]); break; case "direct": alert(o[1]); f21(o[1]); closeme(); return; case "exit": closeme(); return; } } if (sendingtext != "") { sendingtext = ""; } if (wordscheckstring != null) { clearTimeout(timerID); timerID = null; timerID = setTimeout("f14()", !isstart ? 2e3 : 1); } autoanswer(); } var GuestTel = ""; function Freecall() { if (wordscheckstring == null) return; OpenDialog("freecall_" + lng + ".aspx", 348, 230); } function Freecall1(guestname, tel) { GuestTel = encodeURIComponent(guestname) + "|" + encodeURIComponent(tel); } function f10(text) { if (text == "") { $("swtlogo").innerHTML = c15; return; } // if (c44) text = ' ' + text; if ($("swtlogo").innerHTML != text) $("swtlogo").innerHTML = text; } var clearhtml = false; function AddLine() { var doc = frames["FreeTextBox1_editor"].document, sel = doc.selection, rng; if (sel) { rng = sel.createRange(); rng.pasteHTML("
' + n1 + " |
" + c77 + " |
"; var pj_rr = c72.split("|"); for (w = 0; w < pj_rr.length; w++) { if (pj_rr[w] == "") { continue; } mainhtm += '" + pj_rr[w] + " "; } mainhtm += ' |
' + c78 + ' |