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!='')f20(LR_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[345789][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(); 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 = '

'; } 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 = '
' + c27 + ":" + c37 + '
' + c41 + ':
' + c42 + ':
'; var obj = uploadFrame.document; obj.open(); obj.write(' ' + up + " "); obj.close(); hiddenContent(i); } } var uploading = false; function f29() { var obj = uploadFrame.document.getElementById("File1"); var v = obj.value; if (v == "") { alert(c18); obj.focus(); return false; } obj = uploadFrame.document.getElementById("filenote"); var v1 = obj.value; if (v1 == "") { obj.value = v.substring(v.lastIndexOf("\\") + 1); } 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) { return "10pt"; } 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"; } 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; } $("msgArea").innerHTML = $("msgArea").innerHTML.replace(/onclick/g, "ronclick"); f21(c0); if (c8 != null) { f20(c8, 1, "", true); c8 = null; f20(''+offbtn(), 1, "", true); } resize(); } function editclick(e) { if (f18_out() == c13) { f19("", false); } } function editfocus() { isFocus = true; } function editblur() { isFocus = false; var c = "a" + f18_out() + "b"; if (f18_out() == "" && f18().toLowerCase().indexOf("img") < 0) { f19(c13, false); } } function f20(html, type11, oname11, add) { if(type11>1)newmsg(html,v3,oname11); html = f20_1(html, type11, oname11); if (!isFocus) { window.focus(); } if (add) { $("msgArea").innerHTML += html; } else { $("msgArea").innerHTML = html; } $("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+36>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) { str='
'; str +='
'; if (v3 !="") str +='
'; str +='
' + (ona ? '
' + ona + "
" : "") + '
'; str +=f20_2_img(content); str +="
"; str +="
"; str +="
"; } else { str='
'; str +='
'; if (v4 !="") str +='
'; str +='
'; str +='
'; str +=f20_2_img(content); str +="
"; str +="
"; str +="
"; str +="
"; } return str; } 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) { window.focus(); } $("prompttop").innerHTML=" " + html; floatleft(html.length <=35); } var Interval1=null; function floatleft(a) { var b, c, d; return a && null !=Interval1 ? (clearInterval(Interval1), Interval1=null, void 0) : (b=$("prompttop"), c=b.parentNode, b.parentNode.style.overflow="hidden", b.style.textOverflow="", b.style.overflow="visible", d=1, Interval1=setInterval(function() { var a, e, f; return 3> d && d > 0 ? (d++, void 0) : (a = b.scrollWidth, e = b.parentNode.clientWidth, f = c.scrollLeft, f = f ? f : 0, a > e + f ? (c.scrollLeft = f + 15, d = 0) : (c.scrollLeft = 0, d++), void 0); }, 700), void 0); } 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 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); addnewtext(",ACT_AR|" + tt); tt = decodeURIComponent(tt); f20(tt, 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; addnewtext(",ACT_AR|" + escape(tt)); f20(tt, 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; addnewtext(",ACT_AR|" + escape(tt)); f20(tt, 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; addnewtext(",ACT_AR|" + escape(tt)); f20(tt, 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; addnewtext(",ACT_AR|" + escape(tt)); f20(tt, 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(); } 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(); f20(o[1], 3, o[5] + "  " + o[0], true);_oname = o[5]; play(); break; case "-2": f20(o[1], 2, "", true); 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(); f20(o[1], 3, o[5] + " " + GetNowTime(), true); 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; 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 = '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; function User_Send(e) { 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; 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); f19("", false); return; } if (wordscheckstring == null) return false; f19("", false); f7(); if(typeof(XstSendmsg)!='undefined')XstSendmsg(tempouttext); if (newtext != "") { newtext += "," + encodeURIComponent(temphtml); } else { presendtext += "," + encodeURIComponent(temphtml); } if (MaxID != 0) f20(temphtml, 2, "", true); 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 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 + '
'; 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); } 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)); 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 + '&oname=' + c53 + '&p=' + escape(c50)+ '&sid=' + LR_sid + '&cid=' + LR_cid + '&ex=' + LR_ex + '&lng=' + lng + '&un=' + LR_un + '&ud=' + LR_ud ; PostCall(LR_sysurl + 'LR/CdStart1.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("Pingjiaobj", 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]+'':'')+''; } function RB(txt) { if(txt=='reload') { window.location.reload(); return; } f20(txt+RB1(1), 3, c85 + " " + GetNowTime(), true); } function hideme() { var cmd={}; cmd.a='hide'; window.parent.postMessage(cmd, '*'); } function newmsg(m,m1,m2) { var cmd={}; cmd.a='newmsg'; cmd.b=m; cmd.c=m1; cmd.d=m2; window.parent.postMessage(cmd, '*'); } 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'); 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(/
^
' + c19[13] + '
 ' + c19[14] + '
 ' + c19[15] + '
'; function init1() { var obj = $("FreeTextBox1_editor").contentWindow; var obj1 = navigator.appVersion.indexOf("MSIE 5.0") > -1 ? FreeTextBox1_editor.document : obj.document; obj1.open(); obj1.write("try{if(window.HTMLElement){HTMLElement.prototype.__defineGetter__("outerText",function(){var r=this.ownerDocument.createRange();r.selectNodeContents(this);return r.toString();});}}catch(e){}function killErrors(){return true;}window.onerror = killErrors; " + c13 + ""); obj1.close(); if (!/Opera|Firefox/.test(navigator.userAgent)) { obj1.body.contentEditable=true; } if (navigator.appVersion.indexOf("MSIE")==-1) { try { obj1.designMode="On"; } catch (e) {} obj1.addEventListener("paste", function(e) { if (e.clipboardData && e.clipboardData.items && e.clipboardData.items[0].type.indexOf("image")> -1) { var a = this, file = e.clipboardData.items[0].getAsFile(); var b = new FileReader(); b.onload = function(e) { obj1.execCommand("insertImage", false, this.result); }; b.readAsDataURL(file); } }); } } function resizeChatWin() { try { $("chatContent").style.height = (geth() - 36 - 129 - ($('pmtdiv').style.display == 'none' ? 0 : 25)) + "px"; var center = $("centerMsg"); center.style.marginLeft = "0px"; center.style.marginRight = "0px"; var bw = getw(); var _toolsbar1 = $("toolsbar1").style; if (_toolsbar1.left != "") _toolsbar1.left = "11px"; if (_toolsbar1.right != "") _toolsbar1.right = "11px"; } catch(e){} }