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 nounload() { window.onunload = null; window.onbeforeunload = null; } 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; v10 = 0; rgstarted = 1; LR_SetCookie('_lr_show_again', "0", 30); if (typeof PostCall0 != "undefined") PostCall0 = setInterval("PostCall1();", 1e4); f8("start"); window.onunload = function () { if (wordscheckstring == null) return; f13(); } window.onbeforeunload = function () { if (pj == "" && c82) { pingjia(); return n1; } else { return n0; } } } var _lrsaf = "0"; var _lr_form_data = null; var _lr_show_time = null; var _lr_form_check_setting = function () { try { if (typeof (c138) && c138.length > 0) { var _lr_form_setting = c138.split("|"); if (_lr_form_setting.length > 0) { if (_lr_form_setting[0] == "0") return; } if (_lr_form_setting.length > 5) { var _lr_form_kind = _lr_form_setting[4].split(","); if (_lr_form_kind[0] == "0") { return; } var _lr_d_n = new Date(); if (_lr_form_kind.length == 3) { var _lr_form_min = _lr_form_kind[1].split(":"); var _lr_form_max = _lr_form_kind[2].split(":"); if (_lr_form_min.length == 3 && _lr_form_max.length == 3) { var _lr_d_s = new Date(_lr_d_n.getFullYear(), _lr_d_n.getMonth(), _lr_d_n.getDate(), parseInt(_lr_form_min[0]), parseInt(_lr_form_min[1]), parseInt(_lr_form_min[2]), 0); var _lr_d_e = new Date(_lr_d_n.getFullYear(), _lr_d_n.getMonth(), _lr_d_n.getDate(), parseInt(_lr_form_max[0]), parseInt(_lr_form_max[1]), parseInt(_lr_form_max[2]), 0); if (_lr_d_e < _lr_d_s) { _lr_d_e.setTime(_lr_d_e.getTime() + 24 * 60 * 60 * 1000); } if (_lr_d_n < _lr_d_s || _lr_d_n > _lr_d_e) return; } } } else { if (_lr_form_setting.length > 1) { var _lr_form_time = _lr_form_setting[1].split(","); var _lr_d_n = new Date(); if (_lr_form_time.length == 2) { var _lr_form_min = _lr_form_time[0].split(":"); var _lr_form_max = _lr_form_time[1].split(":"); if (_lr_form_min.length == 3 && _lr_form_max.length == 3) { var _lr_d_s = new Date(_lr_d_n.getFullYear(), _lr_d_n.getMonth(), _lr_d_n.getDate(), parseInt(_lr_form_min[0]), parseInt(_lr_form_min[1]), parseInt(_lr_form_min[2]), 0); var _lr_d_e = new Date(_lr_d_n.getFullYear(), _lr_d_n.getMonth(), _lr_d_n.getDate(), parseInt(_lr_form_max[0]), parseInt(_lr_form_max[1]), parseInt(_lr_form_max[2]), 0); if (_lr_d_e < _lr_d_s) { _lr_d_e.setTime(_lr_d_e.getTime() + 24 * 60 * 60 * 1000); } if (_lr_d_n < _lr_d_s || _lr_d_n > _lr_d_e) return; } } } } } _lr_form_data = eval('(' + decodeURIComponent(c139).replace(/\+/g, ' ').replace(/\\r\\n/g, '\r\n').replace(/\r\n/g, '').replace(/\"/g, '\"') + ')'); } catch (e) { _lr_form_data = null; } } var LR_GetPara = function (strName) { if (window.location.search.length == 0) return ""; var r; try { r = decodeURIComponent(window.location.search).substr(1).split("&"); } catch (e) { r = window.location.search.substr(1).split("&"); } if (r.length > 0) { for (var i = 0; i < r.length; i++) { if (r[i].split("=")[0] == strName) { return r[i].split("=")[1]; } } } return ""; } function LastFunction() { if (typeof f18_out() == "undefined") { setTimeout("LastFunction();", 50); return; } if (skid != "" && skid != null) { testclick(skid, sk); } showtel(); if (c36) { if (v10) { f20(c10, 3, c85 + " " + GetNowTime(), true); if ($("topclose")) $("topclose").style.display = "none"; f21(c6[0]); return; } if (LR_msg != '') { var _msg = CheckSendFormHis(LR_msg); f20(_msg, 2, "", true); } if (LR_getCookie('_lr_show_again') != "0") { var _url_cid = LR_GetPara("cid"); var _url_sid = LR_GetPara("sid"); _lrsaf = LR_GetPara("_lrsaf"); if (_lrsaf == "1" || (_lrsaf == "" && _url_cid == "" && _url_sid == "")) { if (typeof (c139) == "string" && c139.length > 0) { _lr_form_check_setting(); } if (_lr_form_data != null) { _lr_show_form(_lr_form_data); return; } } } RGStart(); } else { Toffline(); } } function Toffline() { if ($("topclose")) $("topclose").style.display = "none"; f21(c19[22]); f20(c5 + '
' + c19[9] + '

' + offbtn() + '

', 1, "", true); if (c11 == 0) showtel1(); else if (c11 == 1) robot(); else { liuyan(); } } function offbtn() { return (c75 ? '' : '') + '' + (!c36 && c85 != null ? '' : ''); } function robot() { f20(c10, 3, c85 + " " + GetNowTime(), true); f21(c6[0]); } function liuyan(txt) { if (txt == false) { if (Telurl != '') { window.location = Telurl; return; } } else { if (noteurl != '') { window.location = noteurl; return; } } var div = $("modalDiv_Liuyanobj"); LR_m_d = LR_m_e(true, false, false); var mainhtm = '
  • ' + c19[6] + '
  • ' + ((c75 && Telurl == '') ? '
  • ' + c19[10] + '
  • ' : '') + '
' + c12 + '

' + c6[1] + '

' + c6[15] + '

' + c6[13] + '

' + t2 + '
' + c6[15] + '
'; AddmodalDiv("Liuyanobj", mainhtm, 456, 510); if (txt) $('ly_note').value = txt; $('tel1').value = $('tel').value; showtel(1); } 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) { LY_pmt_F1(t3); $('tel1').focus(); return; } if (!isTel(tel)) { LY_pmt_F1(c6[21]); $('tel1').focus(); 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) + '&on=' + escape(c53); LY_pmt_F1(c6[20], 1); LR_hcloopJS(LR_sysurl + 'lr/sendnote160711.aspx', bb); } function LY_check() { var aa = 'ly_name|ly_phone|ly_email|ly_note|ccode|skid'.split('|'); var bb = ''; for (i = 0; i < aa.length; i++) { var obj = $(aa[i]); if (!obj) continue; obj.value = Trim(obj.value); var b = getAttributeValue(obj, 'defaultval'); if (aa[i] == 'ly_email') { if (obj.value != '' && obj.value != b && !is_email(obj.value)) { LY_pmt_F(c6[8]); obj.focus(); return; } } else if (obj.value == b || obj.value == '') { if (aa[i] == 'ccode') { if ($('yzmtr').style.display != '') continue; b = c6[12]; } LY_pmt_F(b); obj.focus(); return; } else if (aa[i] == 'ly_phone') { if (obj.value != '' && obj.value != b && !isTel(obj.value)) { LY_pmt_F(c6[21]); obj.focus(); return; } } bb += aa[i] + '=' + (obj.value == b ? '' : encodeURIComponent(obj.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) + '&on=' + escape(c53); LY_pmt_F(c6[16]); $('ly_btn').disabled = true; LR_hcloopJS(LR_sysurl + 'lr/sendnote160711.aspx', bb); } function updateIMg(a) { if (a) { LY_pmt_F(c6[a]); } $('ly_note_td').style.height = '82px'; $('ly_note').style.height = '64px'; $('yzmtr').style.display = ''; $('ly_btn').disabled = false; $('yzmimg').src = 'CheckCode3.aspx?id=' + LR_siteid + '&sid=' + LR_sid + '&d=' + new Date().getTime(); $('ccode').focus(); } function updateIMg1(a) { if (a) { LY_pmt_F1(c6[a]); } $('teltd').style.height = '50px'; $('yzmtr1').style.display = ''; $('yzmimg1').src = 'CheckCode3.aspx?id=' + LR_siteid + '&sid=' + LR_sid + '&d=' + new Date().getTime(); $('ccode1').focus(); } 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 LY_pmt_F(a) { $('LY_pmt').innerHTML = (a == 0 ? c6[1] : ''); } function showtel1(a) { if (Telurl != '') { window.location = Telurl; return; } if (!$('tel_P')) { liuyan(false); } show(1); hidli(0); if (a) $('tel1').focus(); } function LY_pmt_F1(a, b) { if (b) return; showtel1(); $('tel_P').innerHTML = (a == 0 ? c6[13] : ''); } function LY_end(a, b) { if (a == 1) { b ? LY_pmt_F1(c6[22]) : LY_pmt_F(c6[18]); return; } if (a == 0) { f20(b ? n3 : c6[17], 3, c101 + " " + GetNowTime(), true); } LR_m_f(LR_m_d, true, false, false); if ($("modalDiv_Liuyanobj")) document.body.removeChild($("modalDiv_Liuyanobj")); showtel(); $('tel').value = t3; } function is_email(object_name) { var string; string = new String(object_name); var len = string.length; if (string.indexOf('@', 1) == -1 || string.indexOf('.', 1) == -1 || string.length < 7) { return false; } if (string.charAt(1) == '.' || string.charAt(1) == '@') { return false; } if (string.charAt(len - 1) == '.' || string.charAt(len - 1) == '@') { return false; } return true; } function show(a) { $('li' + a).className = "cur1"; $('d' + a).className = "cur1"; } function hidli(a) { if ($('li' + a)) $('li' + a).className = ""; if ($('d' + a)) $('d' + a).className = ""; } 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 } function hiddenC1(wy, sobj) { sobj.style.backgroundPosition = wy + "px -50px"; } function showC1(wy, sobj) { sobj.style.backgroundPosition = wy + "px -100px"; } 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 == 0) { tar.style.height = "210px"; tar.style.width = "460px"; 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 == 1) { tar.style.height = "210px"; tar.style.width = "460px"; 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 = '

'; } else { if (if_list[i].style.display != "none") { hiddenContent(); return; } if_list[i].style.display = "block"; } hiddenContent(i); } if (i == 2 || i == 3) { if (wordscheckstring == null || wordscheckstring == '|') { hiddenContent(); return; } if (uploading) { alert(c19[17]); hiddenContent(); return; } tar.style.height = "90px"; tar.style.width = "350px"; if (if_list[i] != null && if_list[i].style.display != "none") { hiddenContent(); return; } for (n = 2; n < 4; n++) { if (if_list[n] != null) { tar.removeChild(if_list[n]); if_list[n] = 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 = ''; var up = ""; if (uploadURL && uploadURL.length > 0) { up = '
' + c27 + ":" + c37 + '
' + c41 + ':
' + c42 + ':
'; } else { up = '
' + c27 + ":" + c37 + '
' + c41 + ':
' + c42 + ':
'; } uploadtype = i; var obj = uploadFrame.document; obj.open(); obj.write('' + up + "
Baidu
map
"); obj.close(); hiddenContent(i); if (uploadURL && uploadURL.length > 0) { AddEventListener(); } } } var getimghtml = function (m, t) { if (m.indexOf("filemsg|") != 0) { return (m); } var imgMsg = ""; var mf = m.split("|"); if (mf.length == 2) { var filesrc = decodeURIComponent(mf[1]); var strFileType = ""; var strFileName = ""; var filepara = filesrc.split("&"); for (var i = 0; i < filepara.length; i++) { if (filepara[i].indexOf("filename") == 0) { strFileName = filepara[i].replace("filename=", ""); } else if (filepara[i].indexOf("filetype") == 0) { strFileType = filepara[i].replace("filetype=", ""); } } filesrc = filesrc + "&dt=5"; if (strFileType == "0") { imgMsg = ""; } else { if (t == 3) imgMsg = '
' + strFileName + '
'; else imgMsg = '
' + strFileName + '
'; } } return (imgMsg); } var uploading = false; var strFileName = ""; var AddEventListener = function () { uploadFrame.document.forms['Form1'].addEventListener('submit', function (event) { event.preventDefault(); var input = uploadFrame.document.getElementById("File1"); var fd = new FormData() fd.append('file', input.files[0]) var xhr = new XMLHttpRequest() xhr.open('POST', event.target.action, true) xhr.send(fd) xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { uploading = false; if (xhr.responseText == "1" || xhr.responseText == "2" || xhr.responseText == "3" || xhr.responseText == "4") return; var strfileMsg = "filemsg|" + xhr.responseText; SendMsg(encodeURIComponent(strfileMsg), nSendMsgID); f20(strfileMsg, 2, "", true, nSendMsgID); nSendMsgID++; } } }); } function f29() { var obj = uploadFrame.document.getElementById("File1"); var v = obj.value; if (v == "") { alert(c18); obj.focus(); return false; } var objNote = uploadFrame.document.getElementById("filenote"); var v1 = objNote.value; if (v1 == "") { objNote.value = v.substring(v.lastIndexOf("\\") + 1); } if (uploadURL && uploadURL.length > 0) { if (obj.files.length == 0) { return false; } var strFileSize = obj.files[0].size; strFileName = obj.files[0].name; var strFileType = (uploadtype == 2) ? 0 : 1; uploadFrame.document.getElementById("Form1").action += "&upt=5&filesize=" + strFileSize + "&filename=" + strFileName + "&filetype=" + strFileType + "&userid=" + LR_sid + "&filedescription=" + objNote.value; } hiddenContent(); uploading = true; return true; } function hiddenContent(ii) { for (i = 0; i < if_list.length; i++) { if (if_list[i] != null) if_list[i].style.display = i != ii ? "none" : "block"; } if (typeof ii == "undefined") { $("toolsbar1").style.display = "none"; } } function SetFont1(fontobj1) { var obj = FreeTextBox1_editor.document; if (!fontobj1) return; fontobj = fontobj1; f22(); f7(); } function SelSmile1(smilesrc) { if (smilesrc) { if (f18_out() == c13) { f19("", false); } var ele = document.createElement("img"); ele.src = smilesrc; ele.border = 0; var obj = FreeTextBox1_editor.document.body; var targetEl = obj.lastChild; var parentEl = targetEl != null ? targetEl.parentNode : null; if (parentEl == null) { obj.appendChild(ele); } else if (parentEl.lastChild == targetEl) { parentEl.appendChild(ele); } else { parentEl.insertBefore(ele, targetEl.nextSibling); } f7(); } } function f19(text, add) { var obj = FreeTextBox1_editor.document.body; if (add) { obj.innerHTML += text; } else { if (!obj) return; if (text == c13) { obj.style.color = 'rgb(153, 153, 153)'; } else { obj.style.color = 'black'; } obj.innerHTML = text; } } function ConvertFontsize(size) { if (size == 12) return "9pt"; if (size == 18) return "18pt"; if (size == 24) return "24pt"; if (size == 36) return "36pt"; return "12pt"; } function f22() { var obj = FreeTextBox1_editor.document.body.style; obj.fontFamily = fontobj.fontname; obj.fontWeight = fontobj.isbold ? "bold" : "normal"; obj.fontStyle = fontobj.isitalic ? "italic" : "normal"; obj.fontSize = ConvertFontsize(fontobj.fontsize); obj.textDecoration = fontobj.isunderline ? "underline" : "none"; } function showSendSel() { var o = $("ocSendMsgDiv"); o.style.display = o.style.display == "block" ? "none" : "block"; } var shortcutstring = ""; function send_c_click(o, t) { var es = o.getElementsByTagName("div"); if (es && es[0]) es[0].className = "cur"; var shortcut1 = ""; if (t == 0) { o.nextSibling.getElementsByTagName("div")[0].className = ""; shortcut1 = "Enter"; } else { o.previousSibling.getElementsByTagName("div")[0].className = ""; shortcut1 = "Ctrl + Enter"; } if (shortcut == shortcut1) return; shortcut = shortcut1; shortcutstring = c21 + ":" + shortcut; f10(shortcutstring); f7(); } function send_c_over(o) { o.className = "over"; o.childNodes[0].className = ""; } function send_c_out(o) { o.className = ""; o.childNodes[0].className = "left"; } var lr_read_maxid = 0; var SendRead = function () { if (typeof (c137) != "undefined" && c137) { if (parseInt(MaxID) > parseInt(lr_read_maxid)) { newtext += ",ACT_RD|" + MaxID; lr_read_maxid = parseInt(MaxID) + 1; setTimeout("LR_Check_Read()", 1000); } } }; var LR_Check_Read = function () { if (isFocus) { SendRead(); setTimeout("LR_Check_Read()", 1000); } }; function closeme(end) { if (c8 == null) return; if (end == 1) { if (pj == "" && c82) { pingjia(2); return; } else { if (!confirm(n0)) { return; } } f13(); } else if (end == 2) { if (!confirm(n0)) { return; } f13(); } wordscheckstring = null; if (Intervalid != null) { clearInterval(Intervalid); Intervalid = null; } if (timerID != null) { clearTimeout(timerID); timerID = null; } if (timerID_answermore != null) { clearTimeout(timerID_answermore); timerID_answermore = null; } nounload(); EndCheckNum(); $("msgArea").innerHTML = $("msgArea").innerHTML.replace(/onclick/g, "ronclick"); f21(c0); if (c8 != null) { f20(c8, 1, "", true); c8 = null; f20('' + offbtn(), 1, "", true); if (c50 != "") f20('', 1, "", true); if ($("topclose")) $("topclose").style.display = "none"; } if ($("CapRect1") != null) { $("CapRect1").CleanTemp(); } if ($("userOptiv")) { $("userOptiv").style.display = "none"; $("chatOutput").style.bottom = "0"; } resize(); } function editclick(e) { if (f18_out() == c13) { f19("", false); } } function editfocus() { isFocus = true; flash_title1(); SendRead(); } function editblur() { isFocus = false; if (f18_out() == "" && f18().toLowerCase().indexOf("img") < 0) { f19(c13, false); } } function f20_bak(html, type11, oname11, add, nMsgID) { html = getimghtml(html, type11, oname11); html = f20_1(html, type11, oname11, nMsgID); if (!isFocus) { window.focus(); } if (add) { $("msgArea").innerHTML += html; } else { $("msgArea").innerHTML = html; } $("chatContent").scrollTop = 999999; setTimeout(' $("chatContent").scrollTop = 999999;', 700); } function f20(html, type11, oname11, add, nMsgID) { html = getimghtml(html, type11, oname11); var eDom = f20_d(html, type11, oname11, nMsgID); if (eDom == null) return; if (!isFocus) { flash_title(); window.focus(); } if (add) { $("msgArea").appendChild(eDom); } else { $("msgArea").innerHTML = ""; $("msgArea").appendChild(eDom); } $("chatContent").scrollTop = 999999; setTimeout(' $("chatContent").scrollTop = 999999;', 700); } var s_tpc = 0; var currentimg; function closeimgdiv(id) { LR_m_f(LR_m_d, true, false, false); document.body.removeChild($("modalDiv_" + id)); } function imgclick(n, w, h) { var id = 'tp' + n; currentimg = id; LR_m_d = LR_m_e(true, false, true); if (w + 54 > getw()) w = getw() - 54; if (h + 52 > geth()) h = geth() - 52; AddmodalDiv(id, '
', w + 34, h + 32); } function f20_2_img1(obj) { if (obj.width <= 300) return; s_tpc++; var t = document.createElement("DIV"); var href = '' + c19[20] + '
'; if (obj.parentNode.href) { href += ''; } else { href += ''; } obj.parentElement.replaceChild(t, obj); t.innerHTML = href + ''; } function f20_2_img(strhtml) { var arr, ptn, s, arr1, t; ptn = /).)*>|).)*>/gi; arr = strhtml.match(ptn); if (arr != null) { for (i = 0; i < arr.length; i++) { s = arr[i]; t = s.replace(/"; } else if (pclass == 3) { var strMsgIDHtml = ""; if (nMsgID) { strMsgIDHtml = "id=\"lr_msg" + nMsgID + "\""; } str = '
'; str += '
'; if (v3 != "") str += '
'; str += '
' + (ona ? '
' + ona + "
" : "") + '
'; str += f20_2_img(content); str += "
"; str += "
"; str += "
"; } else { var strMsgIDHtml = ""; var strWithDrawMsgHtml = ""; if (nMsgID) { if (nMsgID < nSendMsgID) { strMsgIDHtml = "id=\"lr_msg" + nMsgID + "\""; } else { strMsgIDHtml = "id=\"sending" + nMsgID + "\""; } if (typeof (c136) != "undefined" && c136) strWithDrawMsgHtml = ""; } str = '
'; str += '
'; if (v4 != "") str += '
'; str += '
'; str += '
'; str += f20_2_img(content); str += "
"; str += "
"; str += strWithDrawMsgHtml; str += "
"; str += "
"; } return str; } var w_sending = "发送中"; var w_arrived = "已送达"; if (lng != "cn") { w_sending = "Sending"; w_arrived = "Arrived"; } function f20_d(content, pclass, ona, nMsgID) { if (content.replace(/[\s\u3000]*/g, "") == "") return null; var eDom = document.createElement("div"); if (pclass == 0) { eDom.id = "welcom1"; eDom.innerHTML = content; } else if (pclass == 1) { eDom.className = "other_msg"; eDom.innerHTML = content; } else if (pclass == 3) { eDom.className = "msg-box"; if (nMsgID) { eDom.id = "lr_msg" + nMsgID; } var strInnerHTML = ""; strInnerHTML += '
'; if (v3 != "") strInnerHTML += '
'; strInnerHTML += '
' + (ona ? '
' + ona + "
" : "") + '
'; strInnerHTML += f20_2_img(content); strInnerHTML += "
"; strInnerHTML += "
"; eDom.innerHTML = strInnerHTML; } else { eDom.className = "msg-box"; var strWithDrawMsgHtml = ""; var strSending = ""; var bsend_his = false; if (nMsgID) { if (nMsgID < nSendMsgID) { eDom.id = "lr_msg" + nMsgID; bsend_his = true; } else { eDom.id = "sending" + nMsgID; } strSending = "send" + nMsgID; if (typeof (c136) != "undefined" && c136) strWithDrawMsgHtml = ""; } var strInnerHTML = ""; strInnerHTML += '
'; if (v4 != "") strInnerHTML += '
'; strInnerHTML += '
'; strInnerHTML += '
'; strInnerHTML += f20_2_img(content); strInnerHTML += "
"; strInnerHTML += '
0 ? ("id=" + strSending) : "") + ' name="send_msg" style="float: right;font-size: 12px !important;transform: scale(0.7);margin-top: 5px;margin-bottom: -7px;margin-right: -10px;color: #6f7383;">' + (bsend_his ? w_arrived : w_sending) + '
'; strInnerHTML += "
"; strInnerHTML += strWithDrawMsgHtml; strInnerHTML += "
"; eDom.innerHTML = strInnerHTML; } return eDom; } function f20_11(html, type11, oname11) { if (type11 == 1) { html = '
' + html + "
"; } else if (type11 == 2) { html = '
' + html + "
"; } else if (type11 == 3) { html = '
' + (oname11 ? '
' + oname11 + "
" : "") + '
' + html + "
"; } else if (type11 == 0) { html = '
' + html + "
"; } return html; } function if_src() { if (/rv:11.0;|SE 2.X MetaSr 1.0/.test(navigator.userAgent)) { return ""; } return 'src="about:blank"'; } function f21(html) { if (!isFocus) { flash_title(); window.focus(); } $("prompttop").innerHTML = " " + html; } var serverkind = 0; var serverkindname = ""; function testclick(n, s) { serverkind = n; serverkindname = unescape(s.replace("+", " ")); if ($("servicekindlist") != null) $("servicekindlist").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 submitChatpre(ex, on, skid1, sk1, un, ud) { _BeforeWinExit = 0; LR_m_f(LR_m_d, true, false, true); var div = $("modalDiv_Chatpreobj"); div.style.display = "none"; if (ex) LR_ex = ex; if (on != "") c53 = on; if (un) LR_un = un; if (ud) LR_ud = ud; if (skid1 != "") skid = skid1; if (sk1 != "") sk = sk1; LR_LS("&send=1"); } var timerID_title; var step_title = 0; function flash_title() { if (isFocus) { flash_title1(); return; } clearTimeout(timerID_title); step_title++; switch (step_title) { case 4: document.title = title1; step_title = 0; break; case 1: document.title = "*" + title1; break; case 2: document.title = "**" + title1; break; case 3: document.title = "***" + title1; break; } timerID_title = setTimeout("flash_title()", 200); } function flash_title1() { if (timerID_title != null) { clearTimeout(timerID_title); timerID_title = null; document.title = title0; } } 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(); } 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; } Toffline(); _BeforeWinExit = 1; alert(o[1]); if (o[4] == "close") { window.close(); return; } 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]); f20(_msg, 2, "", true, o[3]); c134 = 0; 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(); _oname = o[5]; owordscount++; 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"); nounload(); 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": nounload(); 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": _oname = o[1]; c93 = 0; start2(o); isstart = 1; break; case "restart": f8("start"); return; case "end": closeme(); return; case "print": f21(o[1]); break; case "direct": 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?jid=" + js_pm, 348, 230); } function Freecall1(guestname, tel) { GuestTel = encodeURIComponent(guestname) + "|" + encodeURIComponent(tel); } function f10(text) { if (text == "") { $("swtlogo").innerHTML = c15; return; } // if (c44) text = 'SSL 128 bit ' + 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("
"); rng.move("character ", 1); rng.select(); rng.collapse(true); } else { sel = doc.getSelection(); rng = sel.getRangeAt(0); var br = doc.createElement("br"); var nrng = doc.createRange(); w = doc.createTextNode("​"); rng.insertNode(w); rng.insertNode(br); nrng.selectNode(w); sel.removeAllRanges(); sel.addRange(nrng); sel.collapse(w, 1); } } function f11(evt) { if (f18_out() == c13) { f19("", false); } evt = evt || window.event; var keyCode = evt.keyCode; var ctrlKey = evt.ctrlKey; var altKey = evt.altKey; if (altKey && evt.keyCode == 37) { evt.cancelBubble = true; evt.returnValue = false; return; } if (keyCode == 13 && shortcut == "Enter" && ctrlKey) { AddLine(); return false; } if (keyCode == 13 && shortcut == "Enter") { clearhtml = User_Send(evt); evt.cancelBubble = true; evt.returnValue = false; if (evt.preventDefault && evt.stopPropagation) { evt.preventDefault(); evt.stopPropagation(); } return false; } if (ctrlKey && keyCode == 13 && shortcut == "Ctrl + Enter") { clearhtml = User_Send(evt); evt.cancelBubble = true; evt.returnValue = false; if (evt.preventDefault && evt.stopPropagation) { evt.preventDefault(); evt.stopPropagation(); } return false; } return true; } function excludeE(strhtml) { var arr, ptn, s, t; ptn = /<.*?onresize.*?>/gi; arr = strhtml.match(ptn); if (arr == null) return strhtml; for (i = 0; i < arr.length; i++) { s = arr[i]; t = s.replace(/onresize/gi, "onresize" + i); strhtml = strhtml.replace(s, t); } return strhtml; } function f18() { var obj = FreeTextBox1_editor.document.body; return obj ? '
' + excludeE(obj.innerHTML) + "
" : ""; } function f18_out() { var obj = FreeTextBox1_editor.document.body; return obj ? obj.outerText : ""; } var c74 = 0; var nSendMsgID = 10000; function PostCallNew(url, poststr, callbackmethod) { if (LR_xmlHttp != null) { trypost++; if (trypost > 20) { getReady('err2'); LR_xmlHttp = null; return; } Ajax_timerID = setTimeout("PostCallNew('" + url + "','" + poststr + "'," + callbackmethod + ")", 1000); return; } trypost = 0; try { LR_XmlHttp = GetXmlHttpObject(callbackmethod); if (typeof (LR_XmlHttp.setrequestheader) != 'undefined') { LR_XmlHttp.open('POST', url, true); LR_XmlHttp.setrequestheader('content-length', poststr.length); LR_XmlHttp.setrequestheader('content-type', 'application/x-www-form-urlencoded'); LR_XmlHttp.send(poststr); } else if (typeof (LR_XmlHttp.setRequestHeader) != 'undefined') { LR_XmlHttp.open('POST', url, true); LR_XmlHttp.setRequestHeader('content-type', 'application/x-www-form-urlencoded'); LR_XmlHttp.send(poststr); } else { LR_XmlHttp.open('GET', url + (url.indexOf('?') == -1 ? '?' : '&') + poststr, true); LR_XmlHttp.send(null); } } catch (e) { LR_XmlHttp = null; } } function Dictionary() { this.add = add; this.datastore = new Array(); this.find = find; this.remove = remove; } function add(key, value) { this.datastore[key] = value; } function find(key) { return this.datastore[key]; } function remove(key) { delete this.datastore[key]; } var _lr_push_msg = new Dictionary(); //发送消息 function SendMsg(strMsg, strMsgID, strPushMsg) { if (strMsg.length == 0) return; // if (strPushMsg) // _lr_push_msg.add(strMsgID, strPushMsg); if (strMsg) _lr_push_msg.add(strMsgID, strMsg); var url = LR_sysurl + "NR/c_send.aspx?sid1=" + LR_sid + "&siteid1=" + LR_websiteid.substr(3, 8) + "&type=5"; var poststr = "id=" + LR_websiteid.substr(3, 8) + "&sid=" + LR_sid + "&msgid=" + strMsgID + "&_text=" + escape(strMsg) + "&lng=" + lng + "&pp=" + LRppid; PostCallNew(url, poststr, SendMsgCallback); } //发送消息回执 function SendMsgCallback() { if (LR_XmlHttp == null) { return; } if (LR_XmlHttp.readyState == 4 || LR_XmlHttp.readyState == 'complete') { if (LR_XmlHttp.status == 200) { var responseText = LR_XmlHttp.responseText; LR_XmlHttp = null; if (responseText && responseText.length > 0) { var strIDs = responseText.split("|"); if (strIDs.length == 2) { var eMsg = document.getElementById("sending" + strIDs[1]); var _lr_push_item = _lr_push_msg.find(strIDs[1]); if (_lr_push_item) { if (LRppid) { if (typeof (XstSendmsg) != 'undefined') { XstSendmsg(_lr_push_item); } else if (typeof (SoGouSendmsg) != 'undefined') { SoGouSendmsg(_lr_push_item); } else if (typeof (ALiOcpcSendmsg) != 'undefined') { ALiOcpcSendmsg(_lr_push_item); } else if (typeof (Ocpc360SyncDataFunc) != 'undefined') { Ocpc360SyncDataFunc(1, _lr_push_item); } } _lr_push_msg.remove(strIDs[1]); } if (eMsg) { eMsg.id = "lr_msg" + strIDs[0]; } var eSendMsg = document.getElementById("send" + strIDs[1]); if (eSendMsg) eSendMsg.innerHTML = w_arrived; } } } } } var w_msg = "消息已撤回"; if (lng != "cn") w_msg = "Message was withdrawn"; //撤回 var WithDrawMsg = function (obj) { if (typeof (c136) != "undefined" && c136) { var eMsg = obj.parentElement.parentElement; if (eMsg) { if (eMsg.id) { var strMsgID = eMsg.id.replace("lr_msg", ""); RemoveMsg(strMsgID); } eMsg.querySelector(".text").innerHTML = "
【" + w_msg + "】
"; obj.style.display = "none"; } } } var DeleteMsg = function (strMsgID) { if (typeof (c136) != "undefined" && c136) { var eMsg = document.getElementById("lr_msg" + strMsgID); if (eMsg) { eMsg.querySelector(".text").innerHTML = "
【" + w_msg + "】
"; if (eMsg.querySelector(".chehui")) eMsg.querySelector(".chehui").style.display = "none"; } } }; var RemoveMsg = function (strMsgID) { var url = LR_sysurl + "NR/c_cancel.aspx?sid1=" + LR_sid; var poststr = "id=" + LR_websiteid.substr(3, 8) + "&sid=" + LR_sid + "&msgid=" + strMsgID + "&lng=" + lng + "&pp=" + LRppid; PostCall(url, poststr, SendMsgCallback); }; function User_Send(e) { if (LRppid.length == 0 && LR_getCookie('_lr_show_again') != "0") { RGStart(); clearTimeout(_lr_show_time); _lr_show_time = null; _lr_hide_form(); var _lr_form_send_timer = setInterval(function () { if (LRppid.length > 0) { clearInterval(_lr_form_send_timer); _lr_form_send_timer = null; return (User_Send(e)); } }, 200); } var tempouttext = Trim(f18_out().replace(/\\n/g, "")); var temphtml = f15(f18()); if ((tempouttext == c13 || tempouttext == "") && temphtml.toLowerCase().indexOf("img") == -1) { f10(c4); f7(); return false; } var ml = 8e3; if (kindget == 1) ml = 2e3; temphtml = temphtml.replace(/position:.*?(absolute|fixed|relative)/gi, ""); var imgStr = temphtml.replace(/<\s?img.+?src=[\""]data:image\/png;base64,[^>]*>/gi, ""); if (escape(imgStr).length > ml) { f10(c120.replace("{0}", imgStr.length.toString())); return false; } if (v10) { f20(temphtml, 2, "", true); var bb = 'id=' + escape(LR_siteid) + '&sid=' + escape(LR_sid) + '&lng=' + escape(lng) + '&_text=' + encodeURIComponent(temphtml); LR_hcloopJS(LR_sysurl + 'lr/RobotCheck160728.aspx', bb); f19("", false); return; } if ((wordscheckstring == null || !c36) && c85 == null) { var txt = temphtml.replace(/
/g, '\r\n'); f19(txt, false); if (noteurl == '') liuyan(Trim(f18_out())); f19("", false); return; } if (wordscheckstring == null) return false; f19("", false); f7(); // if (LRppid) // { // if (typeof (XstSendmsg) != 'undefined') { XstSendmsg(tempouttext); } else if (typeof (SoGouSendmsg) != 'undefined') { SoGouSendmsg(tempouttext); }else if (typeof (ALiOcpcSendmsg) != 'undefined'){ALiOcpcSendmsg(tempouttext);} // } //if (newtext != "") { // newtext += "," + encodeURIComponent(temphtml); //} else { // presendtext += "," + encodeURIComponent(temphtml); //} //if (MaxID != 0) f20(temphtml, 2, "", true); SendMsg(encodeURIComponent(temphtml), nSendMsgID, tempouttext); f20(temphtml, 2, "", true, nSendMsgID); nSendMsgID++; if (c73 > -1 && pj == "") { c74++; if (c74 >= c73) pingjia(); } if (c93 == -1) autoanswer3_time = new Date().getTime(); clearTimeout(timerID_answermore); timerID_answermore = null; if (c134 > 0) { setTimeout('addnewtext(",ACT_AR|" + escape(c135));f20(c135, 3, _oname==null?c101:_oname + " " + GetNowTime(), true);', c134 * 1000); c134 = 0; } return true; } function HidePingjiaobj(end) { LR_m_f(LR_m_d, true, false, false); var div = $("modalDiv_Pingjiaobj"); div.style.display = "none"; if (end == 2) closeme(2); } var pj = ""; function pingjia(end) { if (wordscheckstring == null) return; var div = $("modalDiv_Pingjiaobj"); if (div != null && div.style.display != "none") return; LR_m_d = LR_m_e(true, false, false); if (div == null) { var mainhtm = '
' + 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 + '
'; } AddmodalDiv("Pingjiaobj", mainhtm); $("note").focus(); } function pingjia1(end) { var note = $("note").value; var pj0 = ""; var pj_rr = c72.split("|"); for (w = 0; w < pj_rr.length; w++) { if (pj_rr[w] == "") { continue; } if ($("pj" + w.toString()).checked) { pj0 += $("pj" + w.toString()).value; } } f20(c119, 1, "", true); pj = encodeURIComponent(pj0) + "|" + encodeURIComponent(note); HidePingjiaobj(); if (end == 2) closeme(2); } var CaptureCount = 0; function Capture() { if (!confirm(c19[19])) { return; } var testObj = null; try { testObj = new ActiveXObject("CaptureScreen.CapRect.2"); } catch (e) { } if (testObj) { delete testObj; } else { var winactivex = window.open("activex_" + lng + ".htm", "activex", ""); winactivex.moveTo(0, 0); winactivex.focus(); return; } CaptureCount++; var HideWindow; HideWindow = true; var CapObject = document.createElement("OBJECT"); CapObject.width = "390px"; CapObject.height = "226px"; CapObject.style.margin = "5px 8px"; CapObject.id = "CapRect" + CaptureCount; CapObject.classid = "clsid:D9CBC5C0-A9B4-441A-B888-8181D5439CC9"; CapObject.HideWindow = HideWindow; CapObject.TipBitmap = "jp_" + (lng == "kr" ? "en" : lng) + ".bmp"; if (CapObject.Capture()) { if (CapObject.SetPostURL(LR_sysurl + "lr/CaptureUpload1.aspx?uId=" + new Date().getTime() + "" + Math.floor(1e3 * Math.random()))) { CapObject.AddInput("sid", LR_sid); CapObject.AddInput("siteid", LR_websiteid); CapObject.AddInput("lng", lng); CapObject.Send("PngFile"); } else { f20(c67, 1, "", true); } } else { delete CapObject; } } function fake_click(obj) { var ev = document.createEvent("MouseEvents"); ev.initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); obj.dispatchEvent(ev); } function export_raw(htm) { var urlObject = window.URL || window.webkitURL || window; var export_blob = new Blob([htm]); var save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a"); save_link.href = urlObject.createObjectURL(export_blob); save_link.download = "chat.html"; fake_click(save_link); } function savechat(test) { var htm; if (!test) htm = '' + $("msgArea").outerHTML + '
Baidu
map
'; // if (/Chrome|Firefox/.test(navigator.userAgent)) { if (!test) export_raw(htm); } else if (isIe()) { if (!test) saveie(htm); } else { return false; } return true; } function saveie(htm) { var d = document.createElement("DIV"); with (d.style) { width = "0"; height = "0"; display = "none"; } document.body.appendChild(d); d.innerHTML = ''; var obj = saFrame.document; obj.open(); obj.write(htm); obj.close(); obj.execCommand("SaveAs", false, "chat.html"); document.body.removeChild(d); } var t_c_n = null; var a_num = new Array; var s_num = new Array; var CheckNumber = function () { var temptext = Trim(f18_out().replace(c13, '')); var isMob = /(1[0-9]{10})/g; try { var data_num = temptext.match(isMob); if (data_num.length > 0) { for (var i = 0; i < data_num.length; i++) { var i_num = data_num[i]; if (a_num.indexOf(i_num) == -1) { a_num.push(i_num); s_num.push(i_num); } } } return; } catch (e) { return; } }; var GetNewNum = function () { var r_v = ""; for (var i = 0; i < s_num.length; i++) { r_v += s_num[i] + "|"; } s_num = new Array; if (r_v.length > 0) r_v = r_v.substring(0, r_v.length-1); return (Trim(r_v)); }; var StartCheckNum = function () { t_c_n = setInterval(function () { CheckNumber(); }, 500); }; var EndCheckNum = function () { clearInterval(t_c_n); t_c_n = null; }; function f8(acttype) { var poststr; if (acttype == 'check') { if (sending) { return; } sending = 1; if (sendingtext == '') { var temptext = newtext.length > 200 ? '' : ',ACT_TEMP|' + (isFocus ? '1' : '0') + '|' + encodeURIComponent(Trim(f18_out().replace(c13, '')).substring(0, 100)); var strNum = GetNewNum(); if (strNum.length > 0) { temptext += ',ACT_CL|num_' + encodeURIComponent(strNum); } if (parseInt(c109) > 0 && parseInt(autoanswer0_time) > 0 && (new Date().getTime() - parseInt(autoanswer0_time)) > parseInt(c109) * 1000) { c109 = 0; temptext += ',ACT_r0'; } if (parseInt(c110) > 0 && parseInt(autoanswer3_time) > 0 && (new Date().getTime() - parseInt(autoanswer3_time)) > parseInt(c110) * 1000) { autoanswer3_time = 0; temptext += ',ACT_r1'; } if (sendedtemptext != temptext) { newtext += temptext; sendedtemptext = temptext; } poststr = 'id=' + LR_siteid + '&sid=' + LR_sid + '&maxid=' + MaxID + '&_text=' + escape((newtext + newtext1 + presendtext).replace(/\\+/g, '%2b')) + '&lng=' + lng; sendingtext = newtext + presendtext; newtext = newtext1 = presendtext = ''; } else { poststr = 'id=' + LR_siteid + '&sid=' + LR_sid + '&maxid=' + MaxID + '&_text=' + escape(sendingtext.replace(/\\+/g, '%2b')) + '&lng=' + lng; } if (LRppid != '') poststr += '&pp=' + LRppid; PostCall(LR_sysurl + 'LR/CdCheck.aspx?sid1=' + LR_sid, poststr); } else if (acttype == 'start') { poststr = 'websiteid=' + LR_websiteid + '&p=' + escape(c50) + '&oname=' + c53 + '&sid=' + LR_sid + '&cid=' + LR_cid + '&ex=' + LR_ex + '&lng=' + lng + '&un=' + LR_un + '&ud=' + LR_ud + '&skid=' + skid + '&sk=' + escape(sk); PostCall(LR_sysurl + 'LR/CdStart.aspx?sid1=' + LR_sid, poststr + '&d=' + new Date().getTime()); } else if (acttype == 'end') { poststr = 'id=' + LR_siteid + '&sid=' + LR_sid + '&lng=' + lng; if (pj != '' && pj != '1') poststr += '&pj=' + pj; if (typeof (reservecontent) != 'undefined' && reservecontent != '' && reservecontent != '1') poststr += '&yuyue=' + reservecontent; PostCall(LR_sysurl + 'LR/CdEnd.aspx?sid1=' + LR_sid, poststr); } else if (acttype == 'end1') { poststr = 'id=' + LR_siteid + '&sid=' + LR_sid + '&lng=' + lng + '&k=1'; PostCall(LR_sysurl + 'LR/CdEnd.aspx?sid1=' + LR_sid, poststr); } } function isIe() { return (!!window.ActiveXObject || "ActiveXObject" in window) ? true : false; } if (!isIe()) { document.write(''); } else { document.write(''); } function play() { if (!isIe()) { if ($('sound1') != null) $("sound1").play(); } else { $("sound").src = "sounds/sound.wav"; } } window.$ = function (id) { return document.getElementById(id); }; function LR_GetObj(id) { return document.getElementById(id); }; function filter0(sobj) { sobj.style.backgroundColor = "#45c01a"; } function filter1(sobj) { sobj.style.backgroundColor = v2; } function resize(tv) { resizeChatWin(); AddmodalDiv("Chatpreobj", 1); AddmodalDiv("Pingjiaobj", 1); AddmodalDiv("Liuyanobj", 1); AddmodalDiv(currentimg, 1); if (LR_m_d != null) { with (LR_m_d.style) { width = '100%'; height = '100%'; } } $("chatContent").scrollTop = 999999; } function init() { window.ondragover = function (e) { e.preventDefault(); return false; }; window.ondrop = function (e) { e.preventDefault(); return false; }; init1(); f22(); window.focus(); f7(); resize(); } function geth() { var sclh = document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : window.innerHeight != null ? window.innerHeight : document.body != null ? document.body.clientHeight : 0; return sclh; } function getw() { var sclh = document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : window.innerWidth != null ? window.innerWidth : document.body != null ? document.body.clientWidth : 0; return sclh; } window.onresize = resize; function AddmodalDiv(_id, _html, _width, _height, _left, _top) { var div = $("modalDiv_" + _id); if (_html != 1) { if (div == null) { div = document.createElement("DIV"); div.id = "modalDiv_" + _id; with (div.style) { zIndex = 999999; width = (!_width ? 380 : _width) + "px"; if (_height) height = (!_height ? 240 : _height) + "px"; position = "absolute"; display = "none"; border = "none"; margin = padding = 0; document.body.insertBefore(div, document.body.firstChild); div.innerHTML = _html.indexOf('' + _html + ''; } } div.style.display = ""; } if (div != null) { div.style.left = (!_left ? (getw() - div.clientWidth) / 2 : _left) + "px"; div.style.top = (!_top ? (geth() - div.clientHeight) / 2 : _top) + "px"; } } function f7() { var obj = $("input1"); if (obj == null) obj = $("ccode"); if (obj != null) { try { obj.focus(); return; } catch (e) { } } window.setTimeout(function () { FreeTextBox1_editor.focus(); }, 0); } function SetLogo(logosrc1, logolink1, kind) { var sysurl = LR_imgurl.replace("/lr/", "/"); if (logosrc1 == "") { return ""; } logosrc1 = logosrc1.toLowerCase(); if (logosrc1.indexOf("http") != 0) logosrc1 = sysurl + logosrc1; else { logosrc1 = c44 ? logosrc1.replace("http://", "https://") : logosrc1.replace("https://", "http://"); } var w = kind == "left" ? "170" : "125"; var h = kind == "logo" ? "130" : "125"; if (logosrc1.lastIndexOf(".gif") == logosrc1.length - 4 || logosrc1.lastIndexOf(".jpg") == logosrc1.length - 4 || logosrc1.lastIndexOf(".png") == logosrc1.length - 4) { logosrc1 = '"; if (logolink1 != "") { return '' + logosrc1 + ""; } } if (logosrc1.lastIndexOf(".swf") == logosrc1.length - 4) { return ' '; } if (logosrc1.lastIndexOf(".js") != logosrc1.length - 3) { return ''; } return ""; } function RB1(a) { return '
' + c19[24] + ' ' + ((a && c36) ? '' + c19[25] + '' : '') + ' ' + (c75 ? '' + c19[10] + '' : '') + ' ' + c19[6] + ''; } function RB(txt) { if (txt == 'reload') { window.location.reload(); return; } f20(txt + RB1(1), 3, c85 + " " + GetNowTime(), true); } var timerID_title; var step_title = 0; function flash_title() { if (isFocus) { flash_title1(); return; } clearTimeout(timerID_title); step_title++; switch (step_title) { case 4: document.title = title1; step_title = 0; break; case 1: document.title = '*' + title1; break; case 2: document.title = '**' + title1; break; case 3: document.title = '***' + title1; break; } timerID_title = setTimeout('flash_title()', 200); } function flash_title1() { if (timerID_title != null) { clearTimeout(timerID_title); timerID_title = null; document.title = title0; } } var LR_m_d = null; function LR_m_e(p1, p2, p3) { if (LR_m_d != null) return null; var div = document.createElement('DIV'); div.id = 'LR_m_h_' + new Date().getTime(); with (div.style) { zIndex = 8998; top = '0px'; left = '0px'; width = '100%'; height = '100%'; border = 'none'; margin = padding = 0; position = 'absolute'; backgroundColor = '#000'; opacity = '0.2'; filter = 'alpha(opacity=20)'; duration = 1000; } document.body.insertBefore(div, document.body.firstChild); if (!p3) LR_m_a('SELECT'); if (!p2) LR_m_a('OBJECT'); if (!p1) LR_m_a('IFRAME'); LR_m_c(div); return div; } function LR_m_c(obj) { obj.style.width = '100%'; obj.style.height = '100%'; var bodyCW = 0, bodyCH = 0; if (document.documentElement && document.documentElement.clientWidth) { bodyCW = document.documentElement.clientWidth; } else if (window.innerWidth) { bodyCW = window.innerWidth; } else if (document.body) { bodyCW = document.body.clientWidth; } if (window.innerHeight) bodyCH = window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) bodyCH = document.documentElement.clientHeight; else if (document.body) bodyCH = document.body.clientHeight; setTimeout(function () { bodyCW = Math.max(document.body.scrollWidth, bodyCW); bodyCH = Math.max(document.body.scrollHeight, bodyCH); obj.style.width = bodyCW + 'px'; obj.style.height = bodyCH + 'px'; }, 1); } function LR_m_b(TagName) { var s = document.getElementsByTagName(TagName); for (var i = 0, n = s.length; i < n; i++) { if (s[i].id == 'LR_Flash') continue; s[i].style.visibility = s[i].getAttribute('LR_m_g'); s[i].removeAttribute('LR_m_g'); } }; function LR_m_a(TagName) { var s = document.getElementsByTagName(TagName); for (var i = 0, n = s.length; i < n; i++) { if (s[i].id == 'LR_Flash') continue; s[i].setAttribute('LR_m_g', s[i].style.visibility, 0); s[i].style.visibility = 'hidden'; } }; function LR_m_f(obj, p1, p2, p3) { if (LR_m_d == null) return; try { if (obj) { document.body.removeChild(obj); LR_m_d = null; if (!p3) LR_m_b('SELECT'); if (!p2) LR_m_b('OBJECT'); if (!p1) LR_m_b('IFRAME'); } } catch (e) { } }; function f3(e) { if (e && (e.keyCode == 8 || (e.altKey && e.keyCode == 37))) { var tg = (e.target || e.srcElement); if (tg.type == 'text' || tg.type == 'textarea') { e.returnValue = true; return; } if (window.event) { e.cancelBubble = true; } else { e.preventDefault(); } e.returnValue = false; } } var clearhtml = false; function AddLine() { var doc = frames["FreeTextBox1_editor"].document, sel = doc.selection, rng; if (sel) { rng = sel.createRange(); rng.pasteHTML('
'); rng.move("character", 1); rng.select(); rng.collapse(true); } else { sel = doc.getSelection(); rng = sel.getRangeAt(0); var br = doc.createElement('br'); var nrng = doc.createRange(); w = doc.createTextNode('\u200B'); rng.insertNode(w); rng.insertNode(br); nrng.selectNode(w); sel.removeAllRanges(); sel.addRange(nrng); sel.collapse(w, 1); } } function f11(evt) { if (f18_out() == c13) { f19('', false); } evt = evt || window.event; var keyCode = evt.keyCode; var ctrlKey = evt.ctrlKey; var altKey = evt.altKey; if (altKey && evt.keyCode == 37) { evt.cancelBubble = true; evt.returnValue = false; return; } if ((keyCode == 13) && shortcut == 'Enter' && ctrlKey) { AddLine(); return false; } if ((keyCode == 13) && shortcut == 'Enter') { clearhtml = User_Send(); return false; } if (ctrlKey && (keyCode == 13) && shortcut == 'Ctrl + Enter') { clearhtml = User_Send(); return false; } if (altKey && (keyCode == 83) && shortcut == 'ALT + S') { clearhtml = User_Send(); return false; } return true; } function f12(evt) { if (clearhtml) { f19('', false); f22(); clearhtml = false; return false; } } function f13() { f8('end') } function convertIMG(str) { var arr, arr1, re, s; re = /{img:.*?}/g; arr = str.match(re); if (arr == null) return str; for (i = 0; i < arr.length; i++) { arr1 = arr[i].match(re); if (arr1 == null) return str; if (arr1.length == 1) { s = arr1[0].substring(arr1[0].indexOf(':') + 1, arr1[0].indexOf('}')); str = str.replace(arr1, ''); } } return str; } function convertToHtml(str) { return convertIMG(str.replace(/ /g, ' ').replace(/>/g, '>').replace(/').replace(/\n/g, '
').replace(/\"/g, '"').replace(/\'/g, ''')); } function f15(html) { html = html.replace(/<\/?SPAN[^>]*>/gi, ""); html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); html = html.replace(/<\\?\?xml[^>]*>/gi, ""); html = html.replace(/<\/?\w+:[^>]*>/gi, ""); html = html.replace(/ /, " "); html = html.replace(/