/*
 * Compressed by JSA(www.xidea.org)
 */
luguoUI=new Object();luguoUI.HTMLMODEL={sysinfor:"<DIV class=logitem><DIV class=statuslog>#mess#</DIV></DIV>",guestinfor:"<DIV class=logitem><DIV class=strangermsg><SPAN class=msgsource>"+FaqeeLang.stranger+"#dm#\uff1a</SPAN> #mess#</DIV></DIV>",privateinfor:"<DIV class=logitem><DIV class=strangermsg><SPAN class=msgsource>\u964c\u751f\u4eba\u6084\u6084\u5730\u8bf4\uff1a</SPAN> #mess#</DIV></DIV>",youinfor:"<DIV class=logitem><DIV class=youmsg><SPAN class=msgsource>"+FaqeeLang.me+"\uff1a</SPAN> #mess#</DIV></DIV>",overinfor:"<DIV class=logitem><DIV><a href='#' onclick='luguoUI.newChat()'>"+FaqeeLang.newchat+"</a> "+FaqeeLang.or+" <a href='#' onclick='luguoUI.inviteLuguo()'>"+FaqeeLang.fingerwho+"</a> "+FaqeeLang.or+" <A href=\"javascript:luguoUI.sendEmail(this)\">"+FaqeeLang.sendemail+"</A>&nbsp;<img src='new.gif'/>&nbsp; "+FaqeeLang.or+" <A href=\"javascript:luguoUI.downloadMessages()\">"+FaqeeLang.saveLog+"</A> .</DIV></DIV>",glistinfor:"<div class='fex_row'><a href='#'>"+FaqeeLang.stranger+"</a><br/><div class='fex_tail'><small>"+FaqeeLang.formwhat+" [#addr#] </small></div></div>"};luguoUI.args={messList:new Array(),CURPAGE:1};luguoUI.url={refreshGuest:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=getonlinenum&jid=admin@nb.faqee.com",getstat:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=getstatinfor&jid=admin@nb.faqee.com",getguestdetail:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=getguest&jid=admin@nb.faqee.com",getrandg:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=getrandguest&jid=admin@nb.faqee.com",setguest:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=setguest&jid=admin@nb.faqee.com",guestlist:"http://nb.faqee.com:9090/plugins/online/online?type=user&cmd=guestlist&topn=50&jid=admin@nb.faqee.com",sendemail:"http://www.faqee.com/crm/g_email.action"};luguoUI.init=function(){luguoUI.refreshStat();window.setInterval(function(){luguoUI.refreshGuest()},10000)};luguoUI.formatJID=function($){$=$.split("@")[0];return $.replace(/@/g,"_at_").replace(/\//g,"_xx_").replace(/\./g,"_dt_").replace(" ","_b_").replace(/\s/g,"_b_")};luguoUI.formatRoomNick=function($){$=$.split("/")[1];return $};luguoUI.transFace=function($){for(var _=1;_<=22;_++){reg="`face"+_+"`";$=$.replace(new RegExp(reg,"g"),"<img src='http://www.faqee.com/crm/interface/kf/images/msn/"+_+".gif' />")}$=this.ubb($);return $};luguoUI.getDisplayName=function($){return $.split("@")[0]};luguoUI.msgReplace=function(B,A,_){var $="";if(typeof(A)!="undefined"&&A)$=this.HTMLMODEL.youinfor+"";else $=this.HTMLMODEL.guestinfor+"";$=$.replace(/#mess#/g,B);if((_!="")&&(_.length!=8))$=$.replace(/#dm#/g,"("+_+")");else $=$.replace(/#dm#/g,"");return $};luguoUI.sendMessage=function(A,_){GCONFIG.dotyping=false;this.appendMessage(_,true,"");if(GCONFIG.transEnglish)_=luguoUI.trans(_);else webim.sendGroupMessage(GCONFIG.roomid,_);$("#whotyping").hide()};luguoUI.showEnabled=function(_){$(".disconnectbtn").attr("disabled",_);$(".chatmsg").attr("disabled",_);$(".sendbtn").attr("disabled",_)};luguoUI.randID=function(){var B="luguo_";for(i=0;i<10;i++){var E=Math.ceil(Math.random()*9),A=String.fromCharCode(Math.ceil(25*Math.random()+65)),_=String.fromCharCode(Math.ceil(25*Math.random()+97)),C="",$="",D=Math.round(Math.random());D==0?$=A:$=_;b=E+$;B+=""+b}return B};luguoUI.appendMessage=function(_,B,A){var C=_;C=this.transFace(C);C=this.msgReplace(C,B,A);C=C.replace(/autoreply`/g,"");$(".logbox").append(C);this.scrollDown()};luguoUI.refreshOnlineNum=function(){$("#onlinenum").text($(".myonline").size())};luguoUI.addOnlineUser=function(A){var _=this.constant.userinHTML;if(A==webim.status.nickname)_=this.constant.selfinHTML;_=_.replace(/#who#/g,A);$("#onlineUsers").append(_);this.refreshOnlineNum()};luguoUI.formatStr=function($){var _="";if($<10)_="0"+$;else _=$;return _};luguoUI.leaveRoomMessage=function(){webim.leaveRoom(GCONFIG.roomid);var $=luguoUI.HTMLMODEL.overinfor;sysMessage($,false);webim.status.ischat=false;webim.status.isDelayChat=false;this.showEnabled(true);this.scrollDown()};luguoUI.scrollDown=function(){$(".logwrapper").attr("scrollTop","100000000");$(".logbox").attr("scrollTop","100000000")};luguoUI.switchLang=function(_){$("body").changeLang({lang:_,file:"lang/lang.xml"});if(_=="zh")$("#langjs").attr("src","lang/zh.js");else $("#langjs").attr("src","lang/en.js")};luguoUI.resvMessage=function(_){if(typeof(this.formatRoomNick(_.from))=="undefined")return;if((_.body+"").indexOf("typing`")==0){var A=_.body.split("`")[1];if(A!=webim.status.myname){$("#whotyping").text(FaqeeLang.inputing+"...");$("#whotyping").animate({opacity:"show"},1000).animate({opacity:"0.1"},200).animate({opacity:"0.9"},200).animate({opacity:"0.1"},200).animate({opacity:"0.9"},200);$("#whotyping").show();document.title=(document.title==FaqeeLang.title)?"\u3010"+FaqeeLang.inputing+"\u3011"+FaqeeLang.title:FaqeeLang.title}return}else if((_.body+"").indexOf("notyping`")==0){A=_.body.split("`")[1];if(A!=webim.status.myname){$("#whotyping").hide();document.title=FaqeeLang.title}return}else if((_.body+"").indexOf("mfplaying`")==0){this.playMagicFace(_.body.split("`")[1]);return}var B=_.body;B=this.transFace(B);if(webim.status.nickname!=this.formatRoomNick(_.from)){this.appendMessage(_.body+"",false,this.formatRoomNick(_.from));luguoUI.newMessageCome();luguoUI.playSound("message");this.pushMessage({who:FaqeeLang.stranger,message:B});if(webim.status.autoreply!="")if((_.body+"").indexOf("autoreply`")!=0)webim.sendGroupMessage(GCONFIG.roomid,"autoreply`"+webim.status.autoreply)}else this.pushMessage({who:FaqeeLang.me,message:B});$(".chatmsg").focus()};luguoUI.newMessageCome=function(){if(typeof(TITLETIMER)=="undefined")TITLETIMER=window.setInterval(function(){document.title=(document.title==FaqeeLang.title)?("\u3010"+FaqeeLang.newmess+"\u3011"+FaqeeLang.title):FaqeeLang.title},500)};luguoUI.sendInvite=function(_){var A=$("#chkinvitetxt").val();$("input[name='"+_+"']").each(function(){var _=$(this).val();_=_.replace(" ","\\40");webim.sendMessage(A,_)});$(".boxy-wrapper").hide()};luguoUI.selectAll=function(_){$("input[name='"+_+"']").each(function(){$(this).attr("checked",true)})};luguoUI.whoChange=function(C,B,_){var A=C.split("@")[0];if(A=="")return;if($("#myf_"+A).length==0)$("#inviteList").append("<p id='myf_"+A+"'><input type='checkbox' value='"+C+"' name='chkinvite'/>"+A+"</p>")};luguoUI.loginSvr=function(C){var _=$("#usr_"+C).val(),B=$("#pwd_"+C).val(),A=C;if($.trim(_)==""||$.trim(B)==""){alert(FaqeeLang.blackuser);return}webim.bindMSN(_,B,A);$("#btn_"+C).attr("disabled",true);$("#btn_"+C).val(FaqeeLang.reading)};luguoUI.invite=function(B){if(B=="all"){var _="<p><a href=\"#\" onclick=\"javascript:luguoUI.invite('msn');\" langtag=\"invitebymsn2\">\u9080\u8bf7\u4f60\u7684MSN\u670b\u53cb\u5230\u8fd9\u91cc\u6765\uff01</a></p><br/>"+"<p><a href=\"#\" onclick=\"javascript:luguoUI.invite('yahoo');\" langtag=\"invitebyyahoo2\">\u9080\u8bf7\u4f60\u7684Yahoo\u670b\u53cb\u5230\u8fd9\u91cc\u6765\uff01</a></p><br/>"+"<p><a href=\"#\" onclick=\"javascript:luguoUI.invite('gtalk');\" langtag=\"invitebygtalk2\">\u9080\u8bf7\u4f60\u7684Gtalk\u670b\u53cb\u5230\u8fd9\u91cc\u6765\uff01</a></p><br/>"+"<p><a href=\"#\" onclick=\"javascript:luguoUI.invite('icq');\" langtag=\"invitebyicq2\">\u9080\u8bf7\u4f60\u7684ICQ\u670b\u53cb\u5230\u8fd9\u91cc\u6765\uff01</a></p><br/>";this.openWnd({title:"\u8bf7\u9009\u62e9\u9080\u8bf7\u65b9\u5f0f",content:_})}else{$("#msnlist").remove();var A="<div id=\"msnlist\"><p>"+B+FaqeeLang.username+"\uff1a<input type=\"text\" id=\"usr_"+B+"\" /></p><p>"+B+FaqeeLang.password+"\uff1a<input type=\"password\" id=\"pwd_"+B+"\" /></p>"+"<center><input type=\"button\" id=\"btn_\""+B+" onclick=\"luguoUI.loginSvr('"+B+"')\" value=\""+FaqeeLang.login+"\" /></center></div>";this.openWnd({title:FaqeeLang.invite,content:A})}};luguoUI.getJoke=function(){$.getJSON("http://www.faqee.com/crm/g_joke.action?cmd=getjoke&callback=?",function(A){if(A.joke){var $=A.joke.title,_="<div style='font-size:12px;'>"+A.joke.content+"</div><center id=\"xiaohua_center\"><a href=\"javascript:luguoUI.getJoke();\">"+FaqeeLang.switchpage+"</a></center>",B=A.joke.class_name;luguoUI.openWnd({title:$+" \u2014 "+B,content:_})}})};function sendEmailcallback(){if(AjaxCrossDomainResponse.indexOf("1")>0){luguoUI.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.emailok});window.setTimeout(function(){$(".boxy-wrapper").hide()},2000)}else{luguoUI.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.emailerror});window.setTimeout(function(){$(".boxy-wrapper").hide()},2000)}}luguoUI.sendEmailOK=function(){email=$("#myemail").val();this.setCookie("email",email);this.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.emailsending});var A="",_=this.args.messList.join("");_=encodeURIComponent(_);_=encodeURIComponent(_);if(_==""){$(".boxy-wrapper").hide();return}$("#frm_email").val(email);$("#frm_content").val(_);AjaxCrossDomainRequest(this.url.sendemail,"POST","cross_domain_demo","sendEmailcallback()")};luguoUI.ubb=function($){if($.indexOf("://")>0){$=$.replace(/(^|[^\"\'\]])(http|ftp|mms|rstp|news|https)\:\/\/([^\s\033\[\]\"\']+)/gi,"$1[url]$2://$3[/url]");$=$.replace(/\[url\](http\:\/\/\S+\.)(gif|jpg|jpeg|png)\[\/url\]/gi,"[img]$1$2[/img]")}if($.match(/\[(\w+)([^\[\]\s]*)\].*\[\/\1\]/)){$=$.replace(/\[url\](.+?)\[\/url\]/gi,"<a href=$1 target=_blank>$1</a>");$=$.replace(/\[img\](.+?\.(?:gif|jpg|jpeg|png))\[\/img\]/gi,"<img src='$1' alt='$1'>");$=$.replace(/\[flash\](.+?\.swf)\[\/flash\]/gi,"<embed src='$1' quality=high wmode=transparent type='application/x-shockwave-flash' width=400 height=300></embed><br> FLASH: <a href='$1' target=_blank>$1</a><br>");$=$.replace(/\[wma\](.+?\.(?:wma|mp3))\[\/wma\]/gi,"<embed src='$1' height=40 AutoStart=0></embed><br> WMA: <a href='$1' target=_blank>$1</a><br>");$=$.replace(/\[color=([#0-9a-zA-Z]{1,10})\](.+?)\[\/color\]/gi,"<font color='$1'>$2</font>");$=$.replace(/\[b\](.+?)\[\/b\]/gi,"<b>$1</b>");$=$.replace(/\[i\](.+?)\[\/i\]/gi,"<i>$1</i>")}return $};luguoUI.sendEmail=function(_){this.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.inputEmail+"<input type=\"text\" id=\"myemail\" value=\"@\" />&nbsp;&nbsp;<input type=\"button\" onclick=\"luguoUI.sendEmailOK()\" value=\""+FaqeeLang.send+"\" />"});if(this.getCookie("email")!=null)$("#myemail").val(this.getCookie("email"))};luguoUI.getClipboard=function(){if(window.clipboardData)return(window.clipboardData.getData("Text"));else if(window.netscape){netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var $=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!$)return;var _=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!_)return;_.addDataFlavor("text/unicode");$.getData(_,$.kGlobalClipboard);var B=new Object(),C=new Object();try{_.getTransferData("text/unicode",B,C)}catch(A){return null}if(B)if(Components.interfaces.nsISupportsWString)B=B.value.QueryInterface(Components.interfaces.nsISupportsWString);else if(Components.interfaces.nsISupportsString)B=B.value.QueryInterface(Components.interfaces.nsISupportsString);else B=null;if(B)return(B.data.substring(0,C.value/2))}return null};luguoUI.sendFile=function(){this.openWnd({title:FaqeeLang.infor,content:"<iframe src=\"http://www.faqee.com/crm/common/luguo.jsp\" border=\"0\" frameBorder=\"0\" style=\"z-index: -1; padding-bottom: 0px; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; height: 100%; top: 0px; padding-top: 0px; left: 0px;\"></iframe>"})};luguoUI.sendPic=function($){var _=luguoUI.randID();this.openWnd({title:FaqeeLang.infor,content:FaqeeLang.inputURL+"\uff1a<input type=\"text\" style=\"width:350px;\" id=\"picurl_"+_+"\" value=\"http://\" />&nbsp;&nbsp;<input type=\"button\" onclick=\"luguoUI.sendPicOK('"+$+"','"+_+"')\" value=\""+FaqeeLang.insert+"\" />"})};luguoUI.sendPicOK=function(_,A){var B="["+_+"]"+$("#picurl_"+A).val()+"[/"+_+"]";insertAtCaret($(".chatmsg").get(0),B);$(".boxy-wrapper").hide()};luguoUI.insert2Text=function(_){$(".chatmsg").focus();insertAtCaret($(".chatmsg").get(0),_)};window.sendEmailCallback=function($){if(typeof($.res)!="undefined"){if($.res=="1")alert(FaqeeLang.emailok);else alert(FaqeeLang.emailerror)}else alert(FaqeeLang.emailerror)};luguoUI.downloadMessages=function(){var E=new Date(),D=(E.getDate()).toString();if(E.getDate()<10)D="0"+(E.getDate()).toString();var B=(E.getMonth()+1).toString();if((E.getMonth()+1)<10)B="0"+B;var A=E.getYear().toString()+B+D+"_"+Math.floor(Math.random()*1000000)+".html",C=window.open();C.document.open("html","UTF-8");C.document.writeln("<html></body>");C.document.writeln($(".logbox").html());C.document.writeln("<br>");C.document.writeln("<center>  Copyright @ 2009 faqee.com</center>");C.document.writeln();C.document.writeln("</body></html>");var _=C.document.execCommand("SaveAs",true,A);C.close()};luguoUI.pushMessage=function($){this.args.messList.push("<div>"+$.who+"\uff1a"+$.message+"</div>")};luguoUI.formatStr=function($){var _="";if($<10)_="0"+$;else _=$;return _};luguoUI.showDate=function(){var B=new Date(),A=(B.getDate()).toString();if(B.getDate()<10)A="0"+(B.getDate()).toString();var _=(B.getMonth()+1).toString();if((B.getMonth()+1)<10)_="0"+_;var $=B.getYear().toString()+"-"+_+"-"+A,C=$+"  "+this.formatStr(B.getHours())+":"+this.formatStr(B.getMinutes())+":"+this.formatStr(B.getSeconds());return C};luguoUI.setCookie=function(_,$){date=new Date();date.setTime(date.getTime()+2*365*(24*60*60*1000));document.cookie=_+"="+($!=""?escape($):"")+"; expires="+date.toGMTString()};luguoUI.getCookie=function(_){var $=document.cookie.split("; ");for(var B=0;B<$.length;B++){var A=$[B].split("=");if(_==A[0]){if(typeof(A[1])=="undefined")return null;return unescape(A[1])}}return null};luguoUI.changeRoom=function(_){var $=this.url.getrandg+"&gid="+webim.status.myname+"&pregid="+_+"&site=luguo&callback=window.getRandUser";$=$+"&t="+new Date();this.exeCode($)};luguoUI.setGuest=function(A,_){var $=this.url.setguest+"&gid="+webim.status.myname+"&key="+A+"&value="+_+"&callback=window.setGuestCallback";$=$+"&t="+new Date();this.exeCode($)};window.setGuestCallback=function($){alert("\u8bbe\u7f6e\u6210\u529f!")};luguoUI.newChat=function(){$(".logbox").empty();this.startChat(true)};luguoUI.showChatWnd=function(){$("#mainDiv").hide();$("#chatdiv").show();var _=$(".chatmsg").offset();$("#whotyping").css("left",_.left+220);$("#whotyping").css("top",_.top+35);$("#whotyping").show()};luguoUI.startChat=function(A,_){this.showChatWnd();if(typeof(_)=="undefined"){GCONFIG.roomid=luguoUI.randID();webim.joinRoom(GCONFIG.roomid,webim.status.nickname)}else{if(webim.status.ischat)webim.leaveRoom(GCONFIG.roomid);GCONFIG.roomid=_;webim.joinRoom(_,webim.status.nickname)}if(A){sysMessage(FaqeeLang.searching);this.changeRoom(GCONFIG.cguest)}$(".disconnectbtn").attr("disabled",false)};window.getRandUser=function($){if(typeof($.res)!="undefined"){if($.res=="0")sysMessage(FaqeeLang.person2low);else{var _=$.guest;GCONFIG.scity=_.addr;GCONFIG.cguest=_.gid;var A=FaqeeLang.supei.replace(/_stranger_/g,GCONFIG.cguest).replace(/_me_/g,webim.status.nickname);sysMessage(A);webim.roomInviteOne(GCONFIG.roomid,_.gid+"@"+GCONFIG.url,FaqeeLang.autoinvitereason)}}else sysMessage(FaqeeLang.person2low)};window.getInviteLuguoCallback=function(A){var _="";$.each(A.glist,function(C,B){var $=B.addr,A=B.gid;if(typeof(A)!="undefined")if(A!=webim.status.myname)_=_+"<input type='radio' name='radio_invitethissite' id='inv_chk_"+A+"' value='"+A+"' /><label for='inv_chk_"+A+"'>"+A+"("+$+")</label><br/>"});_=_+"<p><center><textarea rows=3 style='border:1px solid #CCC;width:98%' id='inv_txt_reason'>"+FaqeeLang.inviteinfordefault+"</textarea></center></p>";_=_+"<p><center><input type='button' onclick=\"luguoUI.sendInviteFromThisSite()\" value='"+FaqeeLang.startinvite+"' /></center></p>";_=_+"<p><center style='font-size:12px;'>"+FaqeeLang.disinfor+"</center></p>";luguoUI.openWnd({title:FaqeeLang.invitezhannei,content:_})};window.getguestlistCallback=function(A){var _="<table width=550><thead><td width=80>ID</td><td width=120>"+FaqeeLang.glisttd_logindt+"</td><td width=60>"+FaqeeLang.glisttd_sex+"</td><td width=140>"+FaqeeLang.glisttd_city+"</td><td>"+FaqeeLang.opration+"</td></thead>";$.each(A.glist,function(C,B){var $=B.addr,A=B.gid;_+="<tr>";if(typeof(A)!="undefined")if(A!=webim.status.myname)_=_+"<td>"+A+"</td><td>"+B.loginDate+"</td><td>"+(B.sex=="0"?FaqeeLang.secret:(B.sex=="m"?FaqeeLang.man:FaqeeLang.woman))+"</td><td>"+$+"</td><td><a href=\"javascript:luguoUI.sendInviteByGid('"+A+"')\">"+FaqeeLang.chat2he+"</a></td>";else _=_+"<td>"+FaqeeLang.me+"</td><td>"+B.loginDate+"</td><td>"+(B.sex=="0"?FaqeeLang.secret:(B.sex=="m"?FaqeeLang.man:FaqeeLang.woman))+"</td><td>"+$+"</td><td><a href=\"javascript:luguoUI.sendInviteByGid('"+A+"')\">"+FaqeeLang.chat2he+"</a></td>";_+="</tr>"});_=_+"</table>";luguoUI.openWnd({title:FaqeeLang.onlinelistinfor,content:_})};luguoUI.getGuestDetail=function(_){var A=webim.status.myname,$=this.url.getguestdetail;$=$+"&gid="+_+"&callback=window.getguestlistDetailCallback";$=$+"&t="+new Date();this.exeCode($)};luguoUI.getGuestDetailInfor=function(_){var A=webim.status.myname,$=this.url.getguestdetail;$=$+"&gid="+_+"&callback=window.getguestlistDetailInforCallback";$=$+"&t="+new Date();this.exeCode($)};window.getguestlistDetailCallback=function($){if($.guest){var _=$.guest;GCONFIG.scity=_.addr;GCONFIG.cguest=_.gid}else sysMessage(FaqeeLang.shasgoneinfor)};window.getguestlistDetailInforCallback=function(_){if(_.guest){var A=_.guest,$="";$=FaqeeLang.daoju_user+"\uff1a<br/>"+FaqeeLang.glisttd_city+"\uff1a"+A.addr;$=$+"\uff0cIP\uff1a "+A.ip;$=$+"\uff0c"+FaqeeLang.glisttd_logindt+"\uff1a "+A.loginDate;$=$+"\uff0c"+FaqeeLang.glisttd_sex+"\uff1a "+(A.sex=="0"?FaqeeLang.secret:(A.sex=="f"?FaqeeLang.woman:FaqeeLang.man));sysMessage($)}else sysMessage(FaqeeLang.daoju_gone)};luguoUI.sendInviteFromThisSite=function(){var _=$("input[name='radio_invitethissite'][type=radio][checked]").val();if($.trim(_)==""){alert(FaqeeLang.leastone);return}if(typeof(GCONFIG.roomid)!="undefined")webim.leaveRoom(GCONFIG.roomid);GCONFIG.roomid=this.randID();webim.joinRoom(GCONFIG.roomid,webim.status.nickname);window.setTimeout(function(){webim.roomInviteOne(GCONFIG.roomid,_+"@"+GCONFIG.url,$("#inv_txt_reason").val())},2000);this.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.hassend});window.setTimeout(function(){$(".boxy-wrapper").hide()},2000);this.getGuestDetail(_);if(document.getElementById("mainDiv").style.display!="none"){$("#mainDiv").hide();$("#chatdiv").show();var A=$(".sendbtnwrapper").offset();$("#whotyping").css("left",A.left+220);$("#whotyping").css("top",A.top+35);$("#whotyping").hide()}};window.portalWeather=function(_){if(typeof(_.t)!="undefined"&&_.t!="undefined"){var A=FaqeeLang.today+FaqeeLang.weather+"\uff1a<b><font color=red>"+_.t+"</font>("+_.t_result+")</b>\uff0c<br/>"+FaqeeLang.today2+FaqeeLang.weather+"\uff1a<b><font color=green>"+_.t2+"</font>("+_.t2_result+")</b>\uff0c<br/>"+FaqeeLang.today3+FaqeeLang.weather+"\uff1a<b><font color=green>"+_.t3+"</font>("+_.t3_result+")</b>\uff0c<br/>",$="";for(var B=0;B<_.zhishu.length;B++)$+=_.zhishu[B].name+":"+_.zhishu[B].value+"<br/>";sysMessage(FaqeeLang.daoju_weather+"\uff1a<br/>"+FaqeeLang.stranger+A+"<br/>"+$)}else sysMessage(FaqeeLang.daoju_weather+"\uff1a"+FaqeeLang.daoju_error)};luguoUI.trans=function(A){$("#whotyping").text(FaqeeLang.transing+"...");var _=A;google.language.translate(_,"","en",function(A){if(!A.error){var B=A.translation;webim.sendGroupMessage(GCONFIG.roomid,B)}else webim.sendGroupMessage(GCONFIG.roomid,_);$("#whotyping").text("")})};luguoUI.daoju=function(D){var B=GCONFIG.logindt,E=new Date(),_=parseInt((E-B)/1000);if(_<120){var A=FaqeeLang.daoju_2low.replace(/_jg_/g,_+"");this.openWnd({title:FaqeeLang.sysinfor,content:A});return}if("qly"==D){if(GCONFIG.scity!=""){A=FaqeeLang.daoju_qly_infor.replace(/_city_/g,GCONFIG.scity);sysMessage(A)}else sysMessage(FaqeeLang.nolink)}else if("ld"==D){if(GCONFIG.scity!=""){sysMessage("<a href=\"#\" onclick=\"javascript:luguoUI.getJuli()\">"+FaqeeLang.daoju_juli_infor+"</a>");GCONFIG.map=new LTMaps("mapDiv");GCONFIG.map.addControl(new LTStandMapControl());JULI.cal("",GCONFIG.scity,GCONFIG.youcity)}else sysMessage(FaqeeLang.nolink)}else if("qyb"==D){if(GCONFIG.scity!=""){var C="http://www.faqee.com/crm/interface/weather/w.js?id=portal_weather_zhishu&encode=UTF-8&city="+GCONFIG.scity+"&callback=window.portalWeather";$("#faqee_weather_script").attr("src",C);sysMessage(FaqeeLang.daoju_qyb+"\uff1a");window.setTimeout(function(){FaqeeWeatherService.init()},2000)}else sysMessage(FaqeeLang.nolink)}else if("tkq"==D){if(GCONFIG.scity!="")this.getGuestDetailInfor(GCONFIG.cguest);else sysMessage(FaqeeLang.nolink)}else if("trans"==D)$("#transAgent").toggle(function(){$(this).css("font-weight","bold");GCONFIG.transEnglish=true},function(){$(this).css("font-weight","normal");GCONFIG.transEnglish=false});else sysMessage("error\uff01")};luguoUI.sendInviteByGid=function(_){if(typeof(GCONFIG.roomid)!="undefined")webim.leaveRoom(GCONFIG.roomid);GCONFIG.roomid=this.randID();webim.joinRoom(GCONFIG.roomid,webim.status.nickname);window.setTimeout(function(){webim.roomInviteOne(GCONFIG.roomid,_+"@"+GCONFIG.url,$("#inv_txt_reason").val())},2000);this.getGuestDetail(_);this.openWnd({title:FaqeeLang.sysinfor,content:FaqeeLang.invitehassend});window.setTimeout(function(){$(".boxy-wrapper").hide()},2000);if(document.getElementById("mainDiv").style.display!="none"){$("#mainDiv").hide();$("#chatdiv").show();var A=$(".sendbtnwrapper").offset();$("#whotyping").css("left",A.left+220);$("#whotyping").css("top",A.top+35);$("#whotyping").hide()}};luguoUI.inviteLuguo=function(){var _=webim.status.myname,$=this.url.guestlist;$=$+"&callback=window.getInviteLuguoCallback";$=$+"&t="+new Date();this.exeCode($)};luguoUI.getguestlist=function(){var _=webim.status.myname,$=this.url.guestlist;$=$+"&callback=window.getguestlistCallback";$=$+"&t="+new Date();this.exeCode($)};luguoUI.openWnd=function(_){$(".boxy-wrapper").hide();new Boxy("<div style='background-color:#FFFFCC;font-size:14px;'>"+_.content+"</div>",{title:_.title,width:450})};luguoUI.loadFile=function(_,A){var $=null;if(A=="js"){$=document.createElement("script");$.setAttribute("type","text/javascript");$.setAttribute("src",_)}else if(A=="css"){$=document.createElement("link");$.setAttribute("rel","stylesheet");$.setAttribute("type","text/css");$.setAttribute("href",_)}if(typeof $!="undefined")document.getElementsByTagName("head")[0].appendChild($)};luguoUI.script={exeScript:"faqee_script_exescript"};luguoUI.createScriptTag=function(){var _=document.getElementsByTagName("head").item(0),$=document.createElement("script");$.src="";$.id=this.script.exeScript;_.appendChild($)};luguoUI.exeCode=function(_){if(document.getElementById(this.script.exeScript)){var $=document.getElementById(this.script.exeScript),A=$.parentNode;A.removeChild($)}var C=document.getElementsByTagName("head").item(0),B=document.createElement("script");B.src=_;B.id=this.script.exeScript;C.appendChild(B)};luguoUI.retGuestList=function(){var _=webim.status.myname,$=this.url.guestlist;$=$+"&callback=window.retGuestList";$=$+"&t="+new Date();this.exeCode($)};window.retGuestList=function(_){luguoUI.refreshGuest();window.setInterval(function(){luguoUI.refreshGuest()},10000);$.each(_.glist,function(D,C){var _=C.addr,A=C.gid,B=luguoUI.HTMLMODEL.glistinfor.replace(/#addr#/g,_).replace(/#id#/g,A);$(".fex_rows").append(B)})};luguoUI.refreshGuest=function(){var $=this.url.refreshGuest+"&callback=window.getOnlineUser";$=$+"&t="+new Date();this.exeCode($)};luguoUI.refreshStat=function(){var $=this.url.getstat+"&callback=window.getStat";$=$+"&t="+new Date();this.exeCode($)};luguoUI.getDist=function(_,$){JULI.cal("juli_"+_,$,GCONFIG.youcity)};window.getOnlineUser=function(A){var _=A.len;$("#totalnum").html(FaqeeLang.chatonline+":<b>"+_+"</b>");$("#totalnum").animate({opacity:"show"},1000).animate({opacity:"0.1"},200).animate({opacity:"0.9"},200).animate({opacity:"0.1"},200).animate({opacity:"0.9"},200)};window.getStat=function(A){var _=A.len;$("#stotalmess").text(_.split("/")[1]);$("#stotaluser").text(_.split("/")[0])};luguoUI.sendMagicFace=function($){webim.sendGroupMessage(GCONFIG.roomid,"mfplaying`"+$+"`"+webim.status.myname+"")};luguoUI.playMagicFace=function($){document.getElementById("magic_face").style.display="";var _=new SWFObject("mf/mf_"+$+".swf","mymovie","500","350","6","#336699","wmode");_.addParam("wmode","transparent");_.write("magic_face");window.setTimeout(function(){document.getElementById("magic_face").style.display="none"},5000)};luguoUI.setAway=function(){var $=document.getElementById("chkAllowChat").checked;if($){document.getElementById("chkAutoAllowChat").checked=false;this.setCookie("autochat","0");this.setCookie("nochat","1")}else this.setCookie("nochat","0")};luguoUI.setNoSound=function(){var $=document.getElementById("chkNoSound").checked;if($)this.setCookie("nosound","1");else this.setCookie("nosound","0")};luguoUI.playSound=function($){var A=this.getCookie("nosound");if(A==null||A!="1"){var B="wave/msgcome.swf";if($=="invite")B="wave/invite.swf";else if($=="leave")B="wave/leave.swf";else if($=="online")B="wave/online.swf";document.getElementById("magic_face").style.display="";var _=new SWFObject(B,"mymovie","1","1","6","#336699","wmode");_.addParam("wmode","transparent");_.write("magic_face");window.setTimeout(function(){document.getElementById("magic_face").style.display="none"},3000)}};luguoUI.setAutoAllow=function(){var $=document.getElementById("chkAutoAllowChat").checked;if($){document.getElementById("chkAllowChat").checked=false;this.setCookie("nochat","0");this.setCookie("autochat","1")}else this.setCookie("autochat","0")};luguoUI.setHome=function(A,B){try{A.style.behavior="url(#default#homepage)";A.setHomePage(B)}catch($){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch($){alert("\u6b64\u64cd\u4f5c\u88ab\u6d4f\u89c8\u5668\u62d2\u7edd\uff01\n\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165\"about:config\"\u5e76\u56de\u8f66\n\u7136\u540e\u5c06[signed.applets.codebase_principal_support]\u8bbe\u7f6e\u4e3a'true'")}var _=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);_.setCharPref("browser.startup.homepage",B)}}};luguoUI.addFavor=function(A,_){try{window.external.addFavorite(_,A)}catch($){try{window.sidebar.addPanel(A,_,"")}catch($){alert("\u52a0\u5165\u6536\u85cf\u5931\u8d25\uff0c\u8bf7\u4f7f\u7528Ctrl+D\u8fdb\u884c\u6dfb\u52a0")}}};luguoUI.jp=function(){try{if(!document.all){alert("\u5bf9\u4e0d\u8d77\uff0c\u8be5\u529f\u80fd\u53ea\u80fd\u5728IE\u5185\u6838\u4e0b\u7684\u6d4f\u89c8\u5668\u4f7f\u7528\uff01");return}var A=new ActiveXObject("kf37.HotKeyX"),B="1.0";try{B=A.version();if(B==null||B=="undefined")B="1.0"}catch(_){}if(B!="2.0"){if(confirm("\u9700\u8981\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684\u63d2\u4ef6\u624d\u80fd\u4f7f\u7528\u8be5\u529f\u80fd\uff0c\u4f60\u662f\u5426\u786e\u5b9a\u9700\u8981\u5b89\u88c5\uff1f"))window.open("activex/WEB_IM_Screen.exe")}else{var $=A.jp();A=null}}catch(_){if(confirm("\u9700\u8981\u5b89\u88c5\u63d2\u4ef6\u624d\u80fd\u4f7f\u7528\u8be5\u529f\u80fd\uff0c\u4f60\u662f\u5426\u786e\u5b9a\u9700\u8981\u5b89\u88c5\uff1f"))window.open("activex/WEB_IM_Screen.exe");return}};luguoUI.scroll={flag:true,t:0};luguoUI.startli=function(){if(this.scroll.flag){if(typeof(luguoUI.scroll.t)!="undefined")clearInterval(luguoUI.scroll.t);luguoUI.scroll.t=setInterval("luguoUI.autoScroll(\".scrollDiv\")",5000)}};luguoUI.autoScroll=function(_){$(_).find("ul:first").animate({marginTop:"-20px"},500,function(){$(this).css({marginTop:"0px"}).find("li:first").appendTo(this)})};luguoUI.getLang=function(){var $=navigator.language||navigator.userLanguage;$=$.replace(/_/,"-").toLowerCase();if($.length>3)$=$.substring(0,2);return $};JULI=new Object();JULI.showPoint=function(_){if(_.searchPoints.length>0){var $=_.searchPoints[0];GCONFIG.pointA=$}else GCONFIG.pointA="-1"};JULI.showPoint2=function(_){if(_.searchPoints.length>0){var $=_.searchPoints[0];GCONFIG.pointB=$}else GCONFIG.pointB="-1"};JULI.dealwith=function(A){var _=A.indexOf("\u7701"),$=A.indexOf("\u5e02");if(_>=0&&$>=0)return A.substring(_+1,$);else if(_<0&&$>=0)return A.substring(0,$);else if(_>=0&&$<0)return A.substring(_+1);else return A};JULI.cal=function(objid,city1,city2){var s=city1,e=city2;s=this.dealwith(s);e=this.dealwith(e);if(s==e){if(objid=="")sysMessage(FaqeeLang.daoju_leida+"\uff1a"+FaqeeLang.daoju_leida_samecity);else $("#"+objid).text(FaqeeLang.daoju_leida+"\uff1a"+FaqeeLang.daoju_leida_samecity);return}var search=new LTLocalSearch(JULI.showPoint);search.setCity(s);search.search(s);window.setTimeout(function(){var $=new LTLocalSearch(JULI.showPoint2);$.setCity(e);$.search(e)},2000);var TIMERTEMP="TT_"+objid+" = ";TIMERTEMP+="window.setInterval(function(){"+"  if((GCONFIG.pointA!=\"\") && (GCONFIG.pointB!=\"\")){"+"     window.clearInterval(TT_"+objid+");"+"\t if((GCONFIG.pointA!=\"-1\")&&(GCONFIG.pointB!=\"-1\")){"+"\t\tvar distance=LTFunction.getPointsDistance(GCONFIG.pointA.point,GCONFIG.pointB.point);"+"       window.clearInterval(TT_"+objid+");"+"\t\tif(objid==\"\"){"+"\t\t\tsysMessage("+FaqeeLang.daoju_leida+"\"\uff1a"+FaqeeLang.daoju_xc+"  <b>\" + distance/1000 + \"</b>  "+FaqeeLang.kmeter+"\");"+"\t\t}else{"+"\t\t\t$(\"#\"+objid).text(distance/1000+\""+FaqeeLang.kmeter+"\");}"+"\t }"+"  }"+"},1000);";eval(TIMERTEMP)}