var isNS=false;
var isIE=true;
if (navigator.appName == "Microsoft Internet Explorer") isIE=true;
if (navigator.appName == "Netscape") {isIE=false;isNS=true;}

var cn_infos=new Array(
"网络故障，无法连接服务器",//1
"连接失败",//2
"连接已断开，无法发送消息",//3
"连接已断开",//4
"的客服助手",//5
"客服不在线，请留言",//6
"占线请稍候",//7
"对不起！线路忙，请稍候。您也可以给我们留言。",//8
"说",//9
"与...交谈中",//10
"客服已离线，请留言<br>为便于我们与您联系，请注明您的姓名和联系方式。谢谢！",//11
"客服不在线",//12
"对话结束",//13
"我 ",//14
"请输入链接:",//15
"请输入链接显示的文字，如果留空则直接显示链接：",//16
"请输入图片地址:",//17
"公告建议",//18
"连接中请稍候",//19
"连接中，无法发送消息",//20
"按Enter键发送",//21
"按Ctrl+Enter键发送",//22
"您已经打开了一个窗口咨询，不允许同时开两个窗口",//23
"不在线，以下是客服助手的自动应答",//24
"无此客服",//25
"不在线",//26
"正在输入消息",//27
"如果离开，您将无法继续接收客服的消息！",//28
"如果没有留下联系方式，客服将无法联系您！",//29
"系统提示",//30
"等待您选择客服人员",//31
"在线",//32
"留言",//33
"无法连接客服，您已被阻止",//34
"网页对话",//35
"请输入HTML代码:",//36
"感谢您的咨询！请点击“取消”给客服评分",//37
"评分",//38
"感谢您的评分",//39
"您已经评过分！",//40
"没有建立对话，不能发送文件",//41
"文件正在传送中",//42
"正在传送文件",//43
"传送成功",//44
"发送文件给您",//45
"点击接收保存",//46
"您指定的客服不在线！<br>您可以给客服<span class='span-link' onclick='to_rec();' title='请在信息输入框中发送留言'> 留言 </span>或者选择<span class='span-link' onclick='showauto()'> 客服助手 </span>的帮助！<br>如果您要选择其他客服人员进行对话，请<span class='span-link' onclick='to_main_kf()'> 返回 </span>。",//47
"您也可以选择<span class='span-link' onclick='showauto()'> 客服助手 </span>的帮助。",//48
"请在此发送留言！",//49
"感谢您的评分，我将继续为您服务！",//50
"尚未与客服建立对话，不能评分!",//51
"请填写你的姓名！",//52
"请填写你的电子信箱！",//53
"请填写你的电话号码或手机号码！（固定电话必须填写区号，中间不可有“－”如：0571－87858665 应该填写为 05718785866）",//54
"请填写你的电话号码或手机号码！（固定电话必须填写区号，中间不可有“－”如：0571－87858665 应该填写为 05718785866）",//55
"请填写你的qq！",//56
"请填写留言内容！",//57
"自助答疑助手",//58
"系统自动回复",//59
"秒后自动为您分配客服接待...",//60
"空闲",//61
"正常",//62
"繁忙",//63
"占线",//64
"未分配部门",//65
"该部门无客服在线",//66
"在您之前还有",//67
"位访客在排队等待，请稍候...",//68
"如果您不想继续等待，也可以<span class='span-link' onclick='getWlist(1)'><b>给客服人员留言</b></span>",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>如果不是太复杂的问题，我也可以为您<span class='span-link' onclick='showzsk()'><b>立刻解答</b></span></span><br/>",//70
"文件传送成功！",//71
"给客服评分",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>管理中心设置问候语</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;请选择您想咨询的问题分类",//74
"有如下热门问题:",//75
"小Q 说:",//76
"所有分类",//77
"&nbsp;&nbsp;&nbsp;您是不是想咨询这些问题:",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;其他分类中还有",//79
"个类似问题 >> <span class='span-link' onclick='lookOver()'>点击查看</span></td></tr>",//80
"如果您没有得到满意的解答，可以 <span class='span-link' onclick='getWlist(1)'>给客服人员留言</span> 或 <span class='span-link' onclick='history.go(0)'>在线咨询</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> 您正在咨询有关",//82
"的问题</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>选择问题分类</span>",//83
"所有分类",//84
"&nbsp;&nbsp;&nbsp;&nbsp;抱歉，该类没有找到与您输入相关的问题",//85
"请填写你的msn！",//86
"请填写你的单位",//87
"• 客服人员将您转接至自助答疑<br>",//88
"未建立对话，不能发送消息。",//89
"对话已结束，不能发送消息。",//90
"发送内容不能为空，请重新输入。",//91
"智能机器人",//92
"自助答疑", //93
"您好，我是", //94
"提交留言", //95
"继续留言",//96
"结束对话",//97
"留言成功！",//98
"是否继续留言"//99
);

var tw_infos=new Array(
"網絡故障，無法連接服務器",
"連接失敗",
"連接已斷開，無法發送消息",
"連接已斷開",
"的客服助手",
"客服不在線，請留言",
"占線請稍候",
"對不起！線路忙，請稍候。您也可以給我們留言。",
"說",
"與...交談中",
"客服已離線，請留言<br>爲便于我們與您聯系，請注明您的姓名和聯系方式。謝謝！",
"客服不在線",
"對話結束",
"我 ",
"請輸入鏈接:",
"請輸入鏈接顯示的文字，如果留空則直接顯示鏈接：",
"請輸入圖片地址:",
"公告建議",
"連接中請稍候",
"連接中，無法發送消息",
"按Enter鍵發送",
"按Ctrl+Enter鍵發送",
"您已經打開了一個窗口咨詢，不允許同時開兩個窗口",
"不在線，以下是客服助手的自動應答",
"無此客服",
"不在線",
"正在輸入消息",
"如果離開，您將無法繼續接收客服的消息！",
"如果沒有留下聯系方式，客服將無法聯系您！",
"系統提示",
"等待您選擇客服人員",
"在线",
"离线",
"無法連接客服",
"網頁對話",
"請輸入HTML代碼:",
"請給本客服評分",
"評分",
"感謝您的評分",
"您已經評過分！",
"沒有建立對話，不能發送文件",
"文件正在傳送中",
"正在傳送文件",
"傳送成功",
"發送文件給您",
"點擊接收保存",
"您指定的客服不在綫！<br>您可以給客服<span class='span-link' onclick='to_rec();' title='請在信息輸入框中發送留言'> 留言 </span>或者選擇<span class='span-link' onclick='showauto()'> 客服助手 </span>的幫助！<br>如果您要選擇其他客服人員進行對話，請<span class='span-link' onclick='to_main_kf()'> 返回 </span>。",
"您也可以選擇<span class='span-link' onclick='showauto()'> 客服助手 </span>的幫助。",
"請在此發送留言！",
"感謝您的評分，我降繼續爲您服務！",
"尚未与客服建立對話，不能評分！",
"請填寫你的姓名！",
"請填寫你的電子信箱！",
"請填寫你的電話！",
"電話格式不對！",
"請填寫你的qq！",
"請填寫留言內容！",//57
"自助答疑助手",//58
"系統自動回復",//59
"秒后自动为您分配客服接待...",//60
"空闲",//61
"正常",//62
"繁忙",//63
"占线",//64
"未分配部门",//65
"该部门无客服在线",//66
"在您之前还有",//67
"位访客在排队等待，请稍候...",//68
"如果您不想继续等待，也可以<span class='span-link' onclick='getWlist(1)'><b>给客服人员留言</b></span>",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>如果不是太复杂的问题，我也可以为您<span class='span-link' onclick='showzsk()'><b>立刻解答</b></span></span><br/>",//70
"文件传送成功！",//71
"給客服評分",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>管理中心设置问候语</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;请选择您想咨询的问题分类",//74
"有如下热门问题:",//75
"小Q 说:",//76
"所有分类",//77
"&nbsp;&nbsp;&nbsp;您是不是想咨询这些问题:",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;其他分类中还有",//79
"个类似问题 >> <span class='span-link' onclick='lookOver()'>点击查看</span></td></tr>",//80
"如果您没有得到满意的解答，可以 <span class='span-link' onclick='getWlist(1)'>给客服人员留言</span> 或 <span class='span-link' onclick='history.go(0)'>在线咨询</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> 您正在咨询有关",//82
"的问题</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>选择问题分类</span>",//83
"所有分类",//84
"&nbsp;&nbsp;&nbsp;&nbsp;抱歉，该类没有找到与您输入相关的问题",//85
"请填写你的msn！",//86
"请填写你的单位",//87
"• 客服人员将您转接至自助答疑<br>",//88
"未建立对话，不能发送消息。",//89
"对话已结束，不能发送消息。",//90
"发送内容不能为空，请重新输入。",//91
"智能機器人",//92
"自助答疑", //93
"您好，我是", //94
"提交留言", //95
"繼續留言",//96
"結束對話",//97
"留言成功！",//98
"是否繼續留言"//99
);

var en_infos=new Array(
"Obstruction occurs, unavailable to the server",
"Fail to connect",
"No connection, unable to send messages",
"No connection",
"Assisstant of the Customer Service",
"Customer Service is offline,please leave your message",
"The line is busy now, please wait for a while",
"Sorry, the line is engaged. Please wait for a while,or you can leave a message for us. ",
"",
"In conversation with",
"The Customer Service is offline. Please leave a message with your details (Fullname,telephone,Email,etc.). We will be response to you within 24 Hours.",
"Customer Service is offline",
"The conversation is over.",
"I ",
"Please enter the URL of your link:",
"Please enter the text to be displayed for the link:",
"Please enter the URL of your image:",
"Suggestions",
"Connecting ,please wait for a while",
"Connecting ,unable to send messages",
"Enter",
"Ctrl+Enter",
"You have already open a window,so you can not open another one in the same time.",
" is offline,the following are the automatic responses",
"The worker is not exists",
" is offline",
"is typing now",
"if you go away,you will never receive the message from Customer Service!",
"Please provide your contact information for our Customer Service to get back to you.",
"System's tip",
"Please choose your consumer service",
"online",
"offline",
"Unavailable to the Customer Service",
"Live Chat",
"Please enter the HTML:",
"Please evaluate my service",
"Evaluate",
"Thanks for your evaluation",
"You have evaluated for me!",
"Chat hasn’t been setup, fail to send file",
"File is being sent",
"Sending file",
"Sent successful",
"Send file to you",
"Click to accept sending file",
"The service staff you appoint is not online.<br>You can leave message to our service staff<span class='span-link' onclick='to_rec();' title='Please enter message in the fram'> Leave message </span>or choose<span class='span-link' onclick='showauto()'> service assistant </span><br>If You nee to choose other service staf, please<span class='span-link' onclick='to_main_kf()'> go back </span>。",
"You can also choose<span class='span-link' onclick='showauto()'> the service assistant </span>.",
"Please send message here!",
"Thanks for your evaluation",//50
"hat with service staff hasn’t been setup, fail to evaluate!",//51
"Please fill in your name!",//52
"Please fill in your E-mail!",//53
"Please fill in your phone!",//54
"Sorry,please fill in your real phone!",//55
"Please fill in your qq!",//56
"Please fill in the leave word!",//57
"automatic reply helper",//58
"Server auto reply",//59
"automatically connecting to customer service after a while...",//60
"free now",//61
"In gear",//62
"busy now",//63
"the line is busy",//64
"undivided department",//65
"no customer service is on line in this department",//66
"before you,there is",//67
"this customer is on line,pls wait!...",//68
"If you don want to wait,you can <span class='span-link' onclick='getWlist(1)'><b>leave</b></span> a message to our customer serveice worker",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>if problem is not difficult，I can help you<span class='span-link' onclick='showzsk()'><b>solution problem</b></span></span><br/>",//70
"the file is transmitted successfully!",//71
"Pls give a grade to our customer service worker!",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>set Greetings</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;pls choose the questions which you want to ask.",//74
"the following popular questions:",//75
"the Q say:",//76
"all kinds",//77
"&nbsp;&nbsp;&nbsp;do you want to consult these questions?",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;other kinds",//79
"similar questions >> <span class='span-link' onclick='lookOver()'>view</span></td></tr>",//80
"if you are not satisfaction,you could <span class='span-link' onclick='getWlist(1)'>leave message</span> or <span class='span-link' onclick='history.go(0)'>chat online</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> you ask ",//82
" question</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>choose question</span>",//83
"all kinds",//84
"&nbsp;&nbsp;&nbsp;&nbsp;sorry, there's no results accord to your questions",//85
"pls fill in your MSN",//86
"pls fill in your company",//87
"• the customer service worker will let automatic reply helper to answer your questions<br>",//88
"Hasn’t been setup, fail to send",//89
"Chat has finished, fail to send",//90
"Pls input message!",//91
" Intelligent Robot",//92
"Self-help Q & A", //93
"Hello, I am", //94
"Submit", //95
"Continue",//96
"Close dialogue",//97
"Success!",//98
"Continue Leave Words"//99
);

var ge_infos=new Array(
"Hindernis tritt auf, nicht erreichbar zum Server",
"Sie können nicht anschließen",
"Kein Anschluß,keine Nachricht zu senden",
"Kein Anschluß",
"Assisstant des Kundendiensts",
"Kunden-Service ist nicht verfügbar, wenden Sie sich bitte Nachricht",
"Die Linie ist jetzt, warten bitte für eine Weile beschäftigt",
"Traurig, wird die Linie engagiert. Warten Sie bitte für eine Weile oder Sie können eine Anzeige für uns lassen.",
"sprechen",
"Im Gespraech mit",
"Der Kundendienst ist offline. Lassen Sie bitte eine Nachricht mit Ihren Daten (Fullname, Telefon, E-Mail, usw.). Wir antworten Ihnen innerhalb 24 Stunden！",
"Kundendienst ist offline",
"Das Gespräch zum Ende",
"Ich ",
"Tragen Sie bitte Ihre Verbindung ein:",
"Tragen Sie bitte den Text der Verbindung ein, wenn leer, zeigt Links unmittelbar dann：",
"Tragen Sie bitte die Adresse Ihres Bildes ein:",
"Vorschlaege",
"Waehrend des Anschließens, warten Sie bitte",
"Waehrend des Anschließens, keine Nachricht gesendet zu werden",
"Enter",
"Ctrl+Enter",
"Sie haben bereits ein Fenster geöffnet, also können Sie nicht ein anderes Fenster in der gleichen Zeit öffnen",
"Offline, das folgende ist die automatischen Antworten vom Assisstant des Kundendiensts",
"Der Assisstant des Kundendiensts besteht nicht",
"Offline",
"schreibt jetzt",
"wenn Sie weggehen, empfangen Sie keine Nachricht vom Kundendienst！",
"Lassen Sie bitte Ihre Kontaktinformationen für unseren Kundendienst zur Verfügung, um zurück Ihnen zu erhalten！",
"Hinweisung des Systems",
"Wählen Sie bitte Ihren Verbraucherservice",
"Online",
"Offline",
"Nicht erreichbar zum Kundendienst",
"Gespraech auf der Website",
"Tragen Sie bitte das HTML ein:",
"Bitte, werten mich aus",
"Werten Sie aus",
"Dank für Ihre Auswertung",
"Sie haben für mich ausgewertet！",
"Ohne Verbindung, keine Akte zu senden",
"Die Akte wird gesendet",
"Die Akte ist moment gesendet",
"Sendung ist fertig zum Erfolg",
"Ich senden Ihnen die Akte",
"Klicken Sie hier, um die Sendung der Akte anzunehmen",
"Der Service, den Sie moechten, ist nicht online.<br>Sie koennen Ihre Nachricht zu unserem Service hinterlassen<span class='span-link onclick='to_rec(); „title='Bitte tragen Sie Ihre Nachricht in den Rahmen ein </span>oder waehlen Sie<span class='span-link“ onclick='showauto () „>Assisstant des Kundendiensts</span><br>Falls Sie den anderen Service waehlen moechten, bitte <span class='span-link“ onclick='to_main_kf () '> Zurück </span>.",
"Sie können auch waehlen<span class='span-link onclick='showauto () '> den Assisstant des Kundendiensts  </span>.",
"Lassen Sie bitte Ihre Nachricht hier hinter！",
"Dank für Ihre Auswertung, ich bediene Sie noch weiter！",
"Keine Verbindung mit unserer Service-Personal, Sie koennen nicht auswerten!",
"Füllen Sie bitte Ihren Namen aus！",
"Füllen Sie bitte Ihre E-mail aus！",
"Füllen Sie bitte Ihre Telefonnummer aus",
"Entschuldigung, füllen Sie bitte Ihre Telefonnumer oder Handynummer aus",
"Füllen Sie bitte Ihr MSN aus！",
"Füllen Sie bitte Ihre Nachricht aus！",//57
"automatic reply helper",//58
"Server auto reply",//59
"automatically connecting to customer service after a while...",//60
"free now",//61
"In gear",//62
"busy now",//63
"the line is busy",//64
"undivided department",//65
"no customer service is on line in this department",//66
"before you,there is",//67
"this customer is on line,pls wait!...",//68
"If you don want to wait,you can <span class='span-link' onclick='getWlist(1)'><b>leave</b></span> a message to our customer serveice worker",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>if problem is not difficult，I can help you<span class='span-link' onclick='showzsk()'><b>solution problem</b></span></span><br/>",//70
"the file is transmitted successfully!",//71
"Pls give a grade to our customer service worker!",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>set Greetings</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;pls choose the questions which you want to ask.",//74
"the following popular questions:",//75
"the Q say:",//76
"all kinds",//77
"&nbsp;&nbsp;&nbsp;do you want to consult these questions?",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;other kinds",//79
"similar questions >> <span class='span-link' onclick='lookOver()'>view</span></td></tr>",//80
"if you are not satisfaction,you could <span class='span-link' onclick='getWlist(1)'>leave message</span> or <span class='span-link' onclick='history.go(0)'>chat online</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> you ask ",//82
" question</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>choose question</span>",//83
"all kinds",//84
"&nbsp;&nbsp;&nbsp;&nbsp;sorry, there's no results accord to your questions",//85
"pls fill in your MSN",//86
"pls fill in your company",//87
"• the customer service worker will let automatic reply helper to answer your questions<br>",//88
"Hasn’t been setup, fail to send",//89
"Chat has finished, fail to send",//90
"Pls input message!",//91
" Intelligente Roboter",//92
"Self-help Q & A", //93
"Hallo,ich bin", //94
"Übermitteln", //95
"Weiter",//96
"Das Ende des Dialogs",//97
"Message Erfolg!",//98
"Ob oder nicht weiter nach"//99
);

var ru_infos=new Array(
"неисправность　сети,связь　с　сервисом　невозможна",
"связь　неудачна",
"свзь　оторвана,передача　новости　невозможна",
"свзь　оторвана",
"помощник　абонентского　обслуживания",
"Обслуживание клиентов, не в Интернете, пожалуйста, сообщение",
"линия　занята,на　минуту,пожалуйста",
"извините,линия　занята,на　минуту,пожалуйста,также　оставите　записке",
"говорить",
"в　　разговоре　с",
"вам　нужное　абонентског　гбслуживание　оторвано　от　лииии,оставите　записку　и　ваши　фамилию,имя　для　связи　с　вами！",
"на　лирий　нет　вам　нужного　абонентского　обслужсивания",
"диалог　закончен",
"я　",
"вводите　связъ:",
"ввздите　язык　индикации　цепочного　списка,при　оставлении　свободной　непосредствено　показывается　цепочечный　список：",
"вводите　адрес　изображения:",
"опубликованив　првдложения",
"на　минуту,идёт　связь",
"идёт　связь,невозможна　передача　информаций",
"Enter",
"Ctrl+Enter",
"вам　окно　дая　консультации　открыта,одновременное　открытие　двух　окон　(на　консультацию)　запрещёно",
"на　линии　нет,далее　автоответчик　помощоика　абонентского　обслуживания",
"нет　данного　абонетского　обслуживания",
"оа　линии　нет",
"идёт　ввод　новости",
"после　ухода　и　невозможен　продолжительный　приём　новости　от　абонентского！",
"абонентское　обслуживание　невозможно　связать　с　вами　без　показания　способа　связи！",
"указание　от　системы",
"готовка　вашего　выбра　абонентского　обслуживащеог　персонала",
"на　линии",
"от　линии",
"невозмжна　связь　с　абонентским　обслуживанием",
"диалог　по　сети",
"ввод　код　HTML:",
"дайте　оцеку　данного　абонентского　обслуживания",
"оценка",
"спасибо　за　оценку",
"вы　сдели　оценку！",
"вы　сдели　оценку",
"файл　в　передаче",
"идёт　пеуедача　файла",
"передача　удачна",
"вам　передача　файл",
"нажатие　на　приём　и　сохранение",
"обратитесь　к　абонентскому　обслуживлнии！<br>передача　записки　в　буфер　ввода　информации<span class='span-link' onclick='to_rec();' title='передача　записки　в　буфер　ввода　информации'> записка </span>или　выбор<span class='span-link' onclick='showauto()'> помощник　абонентского　обслуживария </span>！<br>помощь，если　хотите　разговаривать　с　другим　абонентским　обслуживающим　персоналом<span class='span-link' onclick='to_main_kf()'> пожалуйста </span>。",
"такжалуйста<span class='span-link' onclick='showauto()'> помощник　абонентского　обслуживария </span>。",
"здесь　передача　записки！",
"спасибо　за　вашу　оценку,продолжаю　вам　служить！",
"не　создан　разговор　с　лбонентск　м　обслуживанием　и　оценка　не　возможна!",
"Please fill in your name!",//52
"Please fill in your E-mail!",//53
"Please fill in your phone!",//54
"Sorry,please fill in your real phone!",//55
"Please fill in your qq!",//56
"Please fill in the leave word!",//57
"automatic reply helper",//58
"Server auto reply",//59
"automatically connecting to customer service after a while...",//60
"free now",//61
"In gear",//62
"busy now",//63
"the line is busy",//64
"undivided department",//65
"no customer service is on line in this department",//66
"before you,there is",//67
"this customer is on line,pls wait!...",//68
"If you don want to wait,you can <span class='span-link' onclick='getWlist(1)'><b>leave</b></span> a message to our customer serveice worker",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>if problem is not difficult，I can help you<span class='span-link' onclick='showzsk()'><b>solution problem</b></span></span><br/>",//70
"the file is transmitted successfully!",//71
"Pls give a grade to our customer service worker!",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>set Greetings</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;pls choose the questions which you want to ask.",//74
"the following popular questions:",//75
"the Q say:",//76
"all kinds",//77
"&nbsp;&nbsp;&nbsp;do you want to consult these questions?",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;other kinds",//79
"similar questions >> <span class='span-link' onclick='lookOver()'>view</span></td></tr>",//80
"if you are not satisfaction,you could <span class='span-link' onclick='getWlist(1)'>leave message</span> or <span class='span-link' onclick='history.go(0)'>chat online</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> you ask ",//82
" question</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>choose question</span>",//83
"all kinds",//84
"&nbsp;&nbsp;&nbsp;&nbsp;sorry, there's no results accord to your questions",//85
"pls fill in your MSN",//86
"pls fill in your company",//87
"• the customer service worker will let automatic reply helper to answer your questions<br>",//88
"Hasn’t been setup, fail to send",//89
"Chat has finished, fail to send",//90
"Pls input message!",//91
" Умный робот",//92
"Самопомощи Q И A", //93
"Здравствуйте, я", //94
"Отправить", //95
"Продолжить",//96
"В конце диалога",//97
"Сообщение успеха!",//98
"О том, следует ли продолжать пост"//99
);

var ko_infos=new Array(
"네트워크 고장이므로, 서버에 연계할수 없습니다",
"연계실패",
"접속차단으로 메시지 전송 불가능",
"접속차단",
"의 고객서비스조수",
"고객 서비스, 온라인 상태가 아닌 메시지를하시기 바랍니다",
"통화중이오니 잠시만 기다려 주십시요",
"미안합니다.통화중이오니 잠시만 기다려주십시요. 메모를 남기셔도 됩니다.",
"의말",
"…와 상담중",
"고객서비스는 오프라인상태입니다. 저희서로의 연락편리를 도모하기 위하여<br>로 메모 부탁드리며, 이름과 연계방식을 남겨주시기 바랍니다. 감사합니다.",
"고객서비스는 오프라인상태입니다",
"대화끝남",
"나의 ",
"링크를 입력해 주십시요:",
"링크가 표시하는 문자를 입력해 주세요. 만일 공백일 경우 직접 링크로 표시됩니다：",
"이미지 주소를 입력해 주십시요:",
"공고 건의",
"접속중이므로, 잠시만 기다려 주십시요",
"접속중이므로, 메세지를 발송할수 없습니다",
"Enter",
"Ctrl + Enter",
"이미 원도우컨설팅 하나를 열었으므로, 동시에 두개 원도우를 열수가 없습니다",
"오프라인 상태이므로, 아래는 고객서비스 조수의 자동응답입니다",
"본 고객서비스가 존재하지 않읍니다",
"오프라인상태",
"메세지를 입력하고 있읍니다",
"떠나시면, 당신은 계속하여 고객서비스 메세지를 접수할수 없습니다.",
"연락방식을 남기지 않으면, 고객서비스는 당신과 연계를 가질수 없습니다.",
"시스템 제시",
"고객서비스 인원 선택을 기다리고 있읍니다",
"온라인",
"오프라인",
"고객서비스와 련계할수없습니다",
"온라인 1대1서비스",
"HTML 코드를 입력하시기 바랍니다:",
"이번 고객서비스 님에게 채점해주세요.",
"점수를 평하다",
"채점해주셔서 감사합니다",
"고객님께서는 이미 채점하셨습니다.",
"대화가 성립되지 않아 파일전송할수없습니다",
"파일 전송중",
"파일 전송중입니다",
"파일 성공적으로 전송하였습니다",
"님이 파일전송 신청하였습니다",
"파일 저장하기",
"지정한 고객서비스는 현재 오프라인상태이므로.<br>고객서비스에 <span class='span-link' onclick='to_rec();' title='정보입력모듈에서 메모를 발송하여 주십시요.'>메시지</span>를 남겨주시거나 <span class='span-link' onclick='showauto()'>고객서비스조수</span>의 도움을 요청하실수있습니다.<br>만약에 기타 고객서비스 이원과 대화를 원하시면 <span class='span-link' onclick='to_main_kf()'>되돌아가기</span> 를 클릭하세요.",
"<span class='span-link' onclick='showauto()'>고객서비스조수의</span> 도움을 요청할수도있습니다.",
"여기서 메시지를 전송해 주세요.",
"Thanks for your evaluation",//50
"hat with service staff hasn’t been setup, fail to evaluate!",//51
"Please fill in your name!",//52
"Please fill in your E-mail!",//53
"Please fill in your phone!",//54
"Sorry,please fill in your real phone!",//55
"Please fill in your qq!",//56
"Please fill in the leave word!",//57
"automatic reply helper",//58
"Server auto reply",//59
"automatically connecting to customer service after a while...",//60
"free now",//61
"In gear",//62
"busy now",//63
"the line is busy",//64
"undivided department",//65
"no customer service is on line in this department",//66
"before you,there is",//67
"this customer is on line,pls wait!...",//68
"If you don want to wait,you can <span class='span-link' onclick='getWlist(1)'><b>leave</b></span> a message to our customer serveice worker",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>if problem is not difficult，I can help you<span class='span-link' onclick='showzsk()'><b>solution problem</b></span></span><br/>",//70
"the file is transmitted successfully!",//71
"고객 서비스 점수하려면!",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>set Greetings</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;pls choose the questions which you want to ask.",//74
"the following popular questions:",//75
"the Q say:",//76
"all kinds",//77
"&nbsp;&nbsp;&nbsp;do you want to consult these questions?",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;other kinds",//79
"similar questions >> <span class='span-link' onclick='lookOver()'>view</span></td></tr>",//80
"if you are not satisfaction,you could <span class='span-link' onclick='getWlist(1)'>leave message</span> or <span class='span-link' onclick='history.go(0)'>chat online</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> you ask ",//82
" question</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>choose question</span>",//83
"all kinds",//84
"&nbsp;&nbsp;&nbsp;&nbsp;sorry, there's no results accord to your questions",//85
"pls fill in your MSN",//86
"pls fill in your company",//87
"• the customer service worker will let automatic reply helper to answer your questions<br>",//88
"Hasn’t been setup, fail to send",//89
"Chat has finished, fail to send",//90
"Pls input message!",//91
" Intelligent Robot",//92
"Self-help Q & A", //93
"안녕하세요, 저는", //94
"제출하다", //95
"계속",//96
"대화의 끝",//97
"메시지의 성공!",//98
"또는 안하든 계속 게시"//99
);

var ja_infos=new Array(
"ネットワークが故障で、サーバーに接続できません",//1
"接続が失敗しました",//2
"接続が切れて、メッセージを発送することができません",//3
"接続はもう切れました",//4
"の顧客サービスの助手",//5
"顧客サービス、オンラインではないメッセージをください。",//6
"話し中で、少々お待ちください",//7
"すみません！ラインは忙しくして、少々お待ちください。またはお客様は私達に伝言をあげることもできます.",//8
"の話",//9
"と会話中",//10
"現在、スタッフはオフラインとなっております。ご用件のある方は、もうしばらくお待ちくださいませ!",//11
"顧客サービスはオンラインでありません",//12
"会話は終わりました",//13
"自分 ",//14
"ＵＲＬを入力して下さい:",//15
"ＵＲＬの示す文字を入力して下さい、もし空白を残したら、直接ＵＲＬを示します:",//16
"ピクチャーのＵＲＬを入力して下さい:",//17
"公告と提案",//18
"接続しています、少々お待ちください。",//19
"接続の中で、メッセージを発送することができません",//20
"Enter",//21
"Ctrl＋Enter",//22
"今はもう１つのウィンドウのコンサルティングを開けて、同時に2つのウィンドウをつけることを許しません",//23
"はオンラインじゃなくて、以下は顧客サービスの助手の自動の応答です",//24
"この顧客サービスはありません",//25
"はオフラインです",//26
"はメッセージを入力しています",//27
"このページを閉じれば、この会話は終わりますので、ご了承ください。",//28
"ご連絡方法を教えて頂ければ、こちらから連絡致しますので、宜しくお願い致します!",//29
"システムヒント",//30
"顧客サービス人員を選ぶことを待ちます",//31
"オンライン",//32
"オフ・ライン",//33
"顧客サービスにつながることができません",//34
"ホームページの対話",//35
"HTMLコードを入力して下さい:",//36
"この顧客サービスを採点して下さい。",//37
"採点",//38
"ご採点ありがとうございます",//39
"もう採点しました！",//40
"顧客サービスがオフラインですので、ファイルを送信することができません。",//41
"ファイルは伝送中",//42
"ファイルを送り届けています",//43
"伝送成功",//44
"貴方様にファイルを発送します",//45
"クリックした後接収と保存します",//46
"指定した顧客サービスはオフ・ラインです！<br>>貴方様は顧客サービスに<span class='span-link' onclick='to_rec();' title='情報入力枠で伝言を入力して、そして発送し下さい'> 伝言 </span>あるいは選び<span class='span-link' onclick='showauto()'> 顧客サービス助手 </span>の助け！<br>もし他の顧客サービス人員を選ぶしたい，どうぞ<span class='span-link' onclick='to_main_kf()'> 戻り </span>。",//47
"貴方様は<span class='span-link' onclick='showauto()'> 顧客サービス助手 </span>の助けを選ぶことができます。",//48
"伝言を入力と発送し下さい！",//49
"ご採点有難うございました。またのご利用をお待ちしております。",//50
"まだ顧客サービスとの会話が始まっていないので、採点することができません。",//51
"Please fill in your name!",//52
"Please fill in your E-mail!",//53
"Please fill in your phone!",//54
"Sorry,please fill in your real phone!",//55
"Please fill in your qq!",//56
"Please fill in the leave word!",//57
"automatic reply helper",//58
"Server auto reply",//59
"automatically connecting to customer service after a while...",//60
"free now",//61
"In gear",//62
"busy now",//63
"the line is busy",//64
"undivided department",//65
"no customer service is on line in this department",//66
"before you,there is",//67
"this customer is on line,pls wait!...",//68
"If you don want to wait,you can <span class='span-link' onclick='getWlist(1)'><b>leave</b></span> a message to our customer serveice worker",//69
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>if problem is not difficult，I can help you<span class='span-link' onclick='showzsk()'><b>solution problem</b></span></span><br/>",//70
"the file is transmitted successfully!",//71
"Pls give a grade to our customer service worker!",//72
"<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>Hello.this brainpower robot Q<br/><br/>set Greetings</span><br/><br/>",//73
"&nbsp;&nbsp;&nbsp;pls choose the questions which you want to ask.",//74
"the following popular questions:",//75
"the Q say:",//76
"all kinds",//77
"&nbsp;&nbsp;&nbsp;do you want to consult these questions?",//78
"<tr><td align='left'>&nbsp;&nbsp;&nbsp;other kinds",//79
"similar questions >> <span class='span-link' onclick='lookOver()'>view</span></td></tr>",//80
"if you are not satisfaction,you could <span class='span-link' onclick='getWlist(1)'>leave message</span> or <span class='span-link' onclick='history.go(0)'>chat online</span>",//81
"<div style='float:left; margin-top:5px; margin-left:3px;'>>> you ask ",//82
" question</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>choose question</span>",//83
"all kinds",//84
"&nbsp;&nbsp;&nbsp;&nbsp;sorry, there's no results accord to your questions",//85
"pls fill in your MSN",//86
"pls fill in your company",//87
"• the customer service worker will let automatic reply helper to answer your questions<br>",//88
"Hasn’t been setup, fail to send",//89
"Chat has finished, fail to send",//90
"Pls input message!",//91
"知能ロボット",//92
"セルフヘルプのQ ＆", //93
"こんにちは、私は", //94
"提出する", //95
"継続",//96
"対話の終了",//97
"メッセージに成功!",//98
"続行するかどうかを投稿"//99
);

function getStringField(str,deli,pos)
{
	arr=str.split(deli);
	if (arr.length>=pos)
  {
    return arr[pos-1];
  }
  else
  {
    return "";
  }
}

function getStringFieldEnd(str,deli,pos)
{
	arr=str.split(deli);
	if (arr.length<pos) return "";
	var sss="";
	var cl=0;
	for (var i=0;i<str.length;i++)
  {
		if (str.substr(i,1) == deli)
    {
			cl++;
			if (cl==pos-1)
      {
				sss=str.substr(i+1);
				break;
			}
		}
	}
	return sss;
}

function getStringFieldEnd2(str,deli,pos) 
{
	arr=str.split(deli);
	if (arr.length<pos) return "";
	var sss="";
	for (var i=pos-1;i<arr.length;i++)
  {
    if (sss=="")
    {
		  sss=arr[i];
    }
    else
    {
      sss+=deli+arr[i];
    }
	}
	return sss;
}

// 获取年月日时分秒
function getCurTime()
{
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth()+1;
  var day = now.getDate();
  var hour = now.getHours();

  var minute = now.getMinutes();
  var second = now.getSeconds();

  if(minute<10)
  {
    minute = "0" + minute;
  }
  if(second<10)
  {
    second = "0" + second;
  }

  var time = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;

  return time;
}

// 获取年月日
function getCurTime2()
{
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth()+1;
  var day = now.getDate();

  if(month<10)
  {
    month = "0" + month;
  }
  if(day<10)
  {
    day = "0" + day;
  }

  var time = year + "-" + month + "-" + day;

  return time;
}

function getTime()
{
  var dd=new Date();
  return Math.floor(dd.getTime()/1000);
}

function getMicroTime()
{
  var dd=new Date();
  return dd.getTime();
}

function getTime2()
{
  var date=new Date();
  var hour="000"+date.getHours();
  var min="000"+date.getMinutes();
  var sec="000"+date.getSeconds();
  hour=hour.substr(hour.length-2);
  min=min.substr(min.length-2);
  sec=sec.substr(sec.length-2);
  return hour+":"+min+":"+sec;
}

if (!Array.prototype.pop)
{
  Array.prototype.pop = function()
  {
    var lastElement = this[this.length-1];
    this.length = Math.max(this.length-1,0);
    return lastElement;
  }
}

if (!Array.prototype.push)
{
  Array.prototype.push = function()
  {
    for(var i=0;i<arguments.length;i++)
    {
      this[this.length]=arguments[i];
    }
    return this.length;
  }
}

if (!Array.prototype.shift)
{
  Array.prototype.shift = function()
  {
    var firstElement = this[0];
    this.reverse();
    this.pop();
    this.reverse();
    return firstElement;
  }
}

if (!Array.prototype.splice) {
 Array.prototype.splice = function() {
  var start = arguments[0];
  var deleteCount = start+arguments[1];
  var deleteItem = this.slice(start,deleteCount);
  var beforeItem = this.slice(0,start);
  var afterItem = this.slice(deleteCount);
  this.length=beforeItem.length;
  var i;
  for (i=2;i<arguments.length;this[this.length]=arguments[i++]);
  for (i=0;i<afterItem.length;this[this.length]=afterItem[i++]);
  return deleteItem;
 }
}

if (!Array.prototype.unshift)
{
  Array.prototype.unshift = function()
  {
    var arr = new Array();
    for (var i=0;i<arguments.length;arr[i]=arguments[i++]);
    arr = arr.concat(this);
    this.length = 0;
    for (i=0;i<arr.length;this[i]=arr[i++]);
  }
}

Array.prototype.del=function(n) {  //n is begin as 0
  if(n<0)
  {
    return this;
  }
  else
  {
    return this.slice(0,n).concat(this.slice(n+1,this.length));
  }
}

Array.prototype.search = function(value)  //数组元素不能包含 ,┢
{
  re = new RegExp(value,[""]);
  return (this.toString().replace(re,"┢").replace(/[^,┢]/g,"")).indexOf("┢");
}

String.prototype.trim=function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

//字符串长度，一个中文字符2位
function _length(str)
{
	var len=0;
	for(var i=0;i< str.length;i++)
  {
	  if (str.charAt(i)>'~')
    {
      len+=2;
    }
    else
    {
      len++;
    }
  }
	return len;
}

//取字符串子串，一个中文字符2位
function _substring(str,len)
{
	var ln=0;
	var subs="";
	var flag2=0;
	for(var i=0;i< str.length;i++)
  {
		if (flag2==1)
    {
			subs+="..";
			break;
		}
		var flag=0;
		var s=str.substr(i,1);
		if (s.charAt(0)>'~') 
    {
			ln+=2;
			flag=1;
		} 
		else ln++;
		subs+=s;
		if (ln==len)
    {
			flag2=1;
			continue;
		}
		if (ln>len)
    {
			if(flag==1)subs=subs.substr(0,subs.length-1);
			subs+="..";
			break;
		}
	}
	return subs;
}

//消息长度:
//  中文为6位，经过escape后，中文格式如：%u4E2D
//  空格在url中为3位：%20 
function _URLLength(str)
{
	var len=0;
	for(var i=0;i< str.length;i++)
  {
		if (str.charAt(i)>'~')
    {
      len+=6; 
    }
		else if (str.charAt(i)==" ")
    {
      len+=3;
    }
		else
    {
      len++;
    }
	}
	return len;
}

//取消息子串：
//  中文为6位，经过escape后，中文格式如：%u4E2D
//  空格在url中为3位：%20 
function _URLSubstring(str,len)
{
	var ln=0;
	var subs="";
	for(var i=0;i< str.length;i++)
  {
		var s=str.substr(i,1);
		if (s>'~')
    {
			ln+=6;
		}
		else if (s==" ")
    {
			ln+=3;
		}
		else
    {
      ln++;
    }
		if (ln<=len)
    {
			subs+=s;
			if (ln==len) break;
		}
		else
    {
      break;
    }
	}
	return subs;
}

function HtmlMode(msg)
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.match(/MSIE \d\.\d/) == "MSIE 5.0"))
  {
		;
	}
  else
  {
		msg=msg.replace(new RegExp('<scr'+'ipt[^>]*?>.*?</scr'+'ipt>','g'), "") ;
		msg=msg.replace(new RegExp('\<\!\-\-.*?\-\-\>','g'), "") ;
	}
	msg=msg.replace('\<\!\-\-', "") ;
	msg+="</a>";
	msg=msg.replace(/(\r\n)/g,"<br>&nbsp;&nbsp;");
	return msg;
}

// url编码
function UrlEncode(text)
{
  return encodeURIComponent(text);
  //return text.replace(/&/g, '%26').replace(/\"/g, '%22').replace(/\'/g, '%27').replace(/\"/g, '%22').replace(/</g, '%3C').replace(/>/g, '%3E');
}

// url解码
function UrlDecode(text)
{
  try
  {
    return unescape(text);
  }
  catch(e)
  {
    //insertErrorInfos("1", "URLDecode", text);
    return text;
  }
}

function HtmlEncode(text)
{
  var msg = text.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/\'/g, '&#039;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  msg = msg.replace(/\r\n/g, "<br>");
  return msg;
}

function HtmlDecode(text)
{
    return text.replace(/&amp;/g, '&').replace(/&quot;/g, '\"').replace(/&#039;/g, '\'').replace(/&lt;/g, '<').replace(/&gt;/g, '>');
}

// 2009-5:
// [URL=www.baidu.com]baidu[/URL] www.baidu.com [IMG]=www.era.com/1.gif[/IMG]
//预先转换已存在的UBB编码，解析URL以后，再转换回原状
function UBBEncode(str)
{
    var replaceURL = false;
    var replaceIMG = false;

    if(str.indexOf("[URL")!=-1)
    {
      var pattern = /\[URL\=([^\]]*)\]([^\[]*)\[\/URL\]/gim;
      str = str.replace(pattern, "{#URL={$1{$2}}}");
      replaceURL = true;
    }

    if(str.indexOf("[IMG]")!=-1)
    {
      var imgpattern = /\[IMG\]([^[]*)\[\/IMG\]/gim;
      str = str.replace(imgpattern, "{#IMG={$1}}");
      replaceIMG = true;
    }
    str = "!"+str;

    var pattern = /([^{\/])((ftp:\/\/|https:\/\/|http:\/\/|www\d{0,4}\.)[\w\-]*\.[\w!~*'()&=\+\$%\-\/\#\?:\.,\|\^]*)/gim;
    str = str.replace(pattern, "$1[URL=$2]$2[/URL]");

    str = str.replace('!', '');

    str = str.replace(/\[URL=www/gi, "[URL=http://www");

    if(replaceIMG==true)
    {
      var backimgpattern = /{#IMG={([^}]*)}}/gim;
      str = str.replace(backimgpattern, "[IMG]$1[/IMG]");
    }

    if(replaceURL==true)
    {
      var backpattern = /{#URL={([^{]*){([^}]*)}}}/gim;
      str = str.replace(backpattern, "[URL=$1]$2[/URL]");
    }

    str = str.replace(/([^\[\]\/]*)qq([0-9]+)/gi, "$1[QQ]$2[/QQ]");

    return str;
}


function UBBCode(strContent)
{	
	if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.match(/MSIE \d\.\d/) == "MSIE 5.0"))
  {
		//5.0
		if (strContent.indexOf("[IMG]")>=0)
    {
			var con=strContent.substr(5,strContent.indexOf("[/IMG]")-5);
			strContent="<IMG SRC=\""+con+"\">";
		}
		if (strContent.indexOf("[URL=")>=0)
    {
			var tlink=strContent.substr(5,strContent.indexOf("]")-5);
			var text=strContent.substr(strContent.indexOf("]")+1,strContent.length-6-strContent.indexOf("]")-1);
			strContent="<A HREF=\""+tlink+"\" TARGET=_blank>"+text+"</A>";
		}
	}
  else
  {
		//var r1=/(\[URL=(\S+?)\])(http:\/\/\S+?)(\[\/URL\])/gim;
		//var r2=/(\[URL=(\S+?)\])(\S+?)(\[\/URL\])/gim;
		//var r3=/(\[IMG\])(\S+?)(\[\/IMG\])/gim;
		var r2=new RegExp("(\\[URL=(.+?)\])(.+?)(\\[\\/URL\\])","gim");
		var r3=new RegExp("(\\[IMG\])(\\S+?)(\\[\\/IMG\\])","gim");
		var r4=new RegExp("(\\[QQ\])(\\S+?)(\\[\\/QQ\\])","gim");
		var r5=new RegExp("&amp","gim");
		//var r5=new RegExp("(\\[MSN\])(\\S+?)(\\[\\/MSN\\])","gim");
		//strContent=strContent.replace(r1,'<A HREF="$2" TARGET=_blank>$3</A>');
		strContent=strContent.replace(r2,'<A HREF="$2" TARGET="_blank" style="text-decoration:underline; color:#8A2BE2;">$3</A>');
		strContent=strContent.replace(r3,'<IMG border="0" SRC="$2">');/**/
		strContent=strContent.replace(r4,'<img border="0" title="点击跟我QQ[$2]聊" src="http://www.53kf.com/img/qq.gif" onclick="addQQ(\'$2\')" style="cursor:pointer"/>[$2]');
		//strContent=strContent.replace(r5,'&');
		//strContent=strContent.replace(r5,'<img border="0" title="点击跟我MSN聊" src="img/msn.gif" onclick="addMSN(\'$2\')" style="cursor:pointer"/>');
		
		//strContent=strContent.replace(r4,'<a href="qq.php?qq=$2" target="_blank"><img border="0" title="点击跟我QQ聊" src="img/qq.gif" style="cursor:pointer"/></a>');
		//strContent=strContent.replace(r4,'<script>window.open("Tencent://Message/?Menu=yes&Exe=&Uin=$2&websiteName=www.53kf.com&info=","_self");</script>');
		//strContent=strContent.replace(r4,'<a target="_blank" href="http://wpa.qq.com/msgrd?v=1&uin=$2&site=www.53kf.com&menu=yes">$2</a>');
	}
  strContent=strContent.replace(/{(.[^#.-\/]*)#(.[^#.-\/]*)#}/gi,"<img src=\"http://"+master_host+"/img/face/$1/$1_$2.gif\" border=\"0\">");
	return strContent;
}

function msgFilter(msg)
{
  return msg;
  msg=msg.replace(/((?:kehu\.cn|qollar\.com|5107\.cn|tq\.cn|zoosnet\.net|live800\.com))/gi,"{内容屏蔽，53KF对此类行为表示谴责}");
  msg=msg.replace(/((?:洽谈通|忠仕|live800|qollar|恒聚|网站伴侣))/gi,"{内容屏蔽}");
  return msg;
}

function textCounter(obj,maxlength)
{
	if (obj.value.length>maxlength)
  {
		obj.value=obj.value.substr(0,maxlength);
	}
}

function getpara(strname)
{
  var hrefstr, pos, parastr, para, tempstr;
  hrefstr = window.location.href;
  pos=hrefstr.indexOf("#");
  pos=(pos==-1?hrefstr.length:pos);
  hrefstr=hrefstr.substring(0,pos);

  pos = hrefstr.indexOf("?");
  parastr = hrefstr.substring(pos + 1);
  para = parastr.split("&");
  tempstr = "";
  for (i = 0; i < para.length; i++)
  {
    tempstr = para[i];
    pos = tempstr.indexOf("=");
    if (tempstr.substring(0, pos) == strname)
    {
      return tempstr.substring(pos + 1);
    }
  }
  return "";
}

function addQQ(qq)
{
	window.open('lib/common/qq.php?qq='+qq,'_blank',"top=400,width=5,height=5");
}

//** 提示框
var oPopup;
var PopupLen;
var PopupWidth = 244;
var PopupHeight = 144;
var PopupTimer;
var HideTimer;
var PopupPosLeft = screen.width;
var PopupPosTop = screen.height;
function InitMsgBox(Msg)
{ 
  window.clearInterval(PopupTimer);
  window.clearTimeout(HideTimer);
	PopupLen = 0;
	oPopup = window.createPopup();
	var oPopupBody = oPopup.document.body;
    
	var titleContent = "<div style=\"width:242px; height:142px;border:1px #AABBDB solid; background:#DEE4F1;font-family:arial;font-size:12px; text-align:left;\"><div style=\"width:238px;height:138px;margin:2px;background:url(/style/chat/new/img/msgbox_bg.gif) repear-x;border:1px #AABBDB solid;\"><div style=\"height:21px;background:url(/style/chat/new/img/msgbox_logo.gif) 4px 2px no-repeat;\"><div style=\"float:right;margin:0;padding:0;width:26px;height:21px;background:url(/style/chat/new/img/msgbox_split.gif) left top no-repeat; \"><img src=\"/style/chat/new/img/msgbox_close.gif\" onclick=\"parent.oPopup.hide()\" style=\"margin:3px 0 0 7px; cursor:pointer\" title=\"关闭\"></div></div><div style=\"height:117px;background:url(/style/chat/new/img/msgbox_bg2.gif) 140px 30px no-repeat;\"><div style=\"height:20px;margin-top:28px;color:#004BA8; text-indent:20px;\">"+Msg+"</div><div style=\"margin-top:30px;text-indent:20px;cursor:pointer;color:#f60;\" onclick='parent.PopWindow()'>点击打开客服端</div></div></div></div>";

	oPopupBody.innerHTML = titleContent;
	ShowMsgBox();
}

function ShowMsgBox()
{
	PopupTimer = window.setInterval("MsgBox()", 30);
}    

function MsgBox()
{ 
	PopupLen += 15;
	if (PopupLen > PopupHeight)
	{
		window.clearInterval(PopupTimer);
    PopupLen = PopupHeight;
    HideTimer = setTimeout("oPopup.hide()", 8000);
	}
  oPopup.show(screen.width-PopupWidth-2, screen.height-PopupLen, PopupWidth, PopupLen);
}

// 弹出客服端
function PopWindow()
{
  if(system=="vista")
  {
    window.location.href = "[CMD]popwnd";//弹出
  }
  else
  {
    window.focus();
  }
  oPopup.hide();
}

function insert_flash(url,width,height)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">\n');
    document.write('<param name="movie" value="'+url+'" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="opaque">\n');
		document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>\n');
    document.write('</object>\n');
}

// 访客端调用
function insert_snapshot(host)
{
  var m_isSendSnapshot = 1;

  if(m_success==false)
  {
    m_isSendSnapshot = 0;
  }

	var ss = '';
	ss += '<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="0" HEIGHT="0" codebase="http://'+host+':80/download/jre-6u2-windows-i586-p-iftw.exe" MAYSCRIPT>';
	ss += '<param name="CODE" value="Snapshot.class">';
	ss += '<param name="CODEBASE" value="lib/snapshot">';
	ss += '<param name="ARCHIVE" value="js.jar,snapshot.jar?20090429">';
	ss += '<PARAM NAME="funcMame" VALUE="getSnapshotParam" >';
  ss += '<PARAM NAME="title" VALUE="53KF 截图" >';
	ss += '<PARAM NAME="host" VALUE="'+host+'" >';
  ss += '<PARAM NAME="isSend" VALUE="'+m_isSendSnapshot+'" >';
  ss += '<PARAM NAME="timeout" VALUE="10000" >';
	ss += '<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">';
	ss += '<EMBED type="application/x-java-applet;version=1.3" CODE="Snapshot.class" CODEBASE="lib/snapshot" WIDTH="0" HEIGHT="0" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html" MAYSCRIPT></EMBED>';
	ss += '</OBJECT>';
	document.getElementById('plugin_snapshot').innerHTML=ss;
}

// 客服端调用
function insert_snapshot2(host)
{
  var m_isSendSnapshot = 1;

  if(m_curGid==0)
  {
    m_isSendSnapshot = 0;
  }
  else
  {
    var visitor = getVisitorByGid(m_curGid);
    if(visitor.tid==0)
    {
      m_isSendSnapshot = 0;
    }
  }

	var ss = '';
	ss += '<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="0" HEIGHT="0" codebase="http://'+host+':80/download/jre-6u2-windows-i586-p-iftw.exe" MAYSCRIPT>';
	ss += '<param name="CODE" value="Snapshot.class">';
	ss += '<param name="CODEBASE" value="lib/snapshot">';
	ss += '<param name="ARCHIVE" value="js.jar,snapshot.jar?20090429">';
	ss += '<PARAM NAME="funcMame" VALUE="getSnapshotParam" >';
  ss += '<PARAM NAME="title" VALUE="53KF 截图" >';
	ss += '<PARAM NAME="host" VALUE="'+host+'" >';
  ss += '<PARAM NAME="isSend" VALUE="'+m_isSendSnapshot+'" >';
  ss += '<PARAM NAME="timeout" VALUE="10000" >';
	ss += '<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">';
	ss += '<EMBED type="application/x-java-applet;version=1.3" CODE="Snapshot.class" CODEBASE="lib/snapshot" WIDTH="0" HEIGHT="0" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html" MAYSCRIPT></EMBED>';
	ss += '</OBJECT>';
	document.getElementById('plugin_snapshot').innerHTML=ss;
}

function rpc(url)
{
  var rpcImage=new Image();
  try
  {
    rpcImage.onload = function(){};
    rpcImage.onerror = function(){};
  }catch(e){}
  try
  {
    rpcImage.src = url+"&"+(new Date()).getTime();
  }catch(e){}
}

// 设置cookie
function setCookie(name, value)
{
  var today = new Date();
  var expires = new Date();
  expires.setTime(today.getTime()+1000*60*60*24*365);
  document.cookie = name+"="+escape(value)+"; expires="+expires.toGMTString();
}

// 获取cookie
function getCookie(name)
{
  var search = name+"=";
    if(document.cookie.length>0)
    {
      offset = document.cookie.indexOf(search);
      if(offset!=-1)
      {
        offset += search.length
        end = document.cookie.indexOf(";", offset)
        if(end==-1)
        {
          end = document.cookie.length;
        }
        return unescape(document.cookie.substring(offset, end));
      }	
    }
    return "";
}

var browser = detectBrowser();  // 检测浏览器类型

function detectBrowser()
{ 
  var ret = "ie6"; // default 
  var user_agent = navigator.userAgent; 
  if(user_agent.indexOf("compatible")>-1)
  {
    if(user_agent.indexOf("MSIE 6.0") > -1)
    {
      ret = "ie6";
    }
    else if(user_agent.indexOf("MSIE 7.0") > -1)
    {
      ret = "ie7";
    }
    else if(user_agent.indexOf("MSIE 8.0") > -1)
    {
      ret = "ie8";
    }
  }
  else if(user_agent.indexOf("Gecko") > -1)
  {
    ret = "firefox";
  }

  return ret;
}

// 获取搜索引擎
function get_search(url)
{
  var realSearch = new Array("Google", "Google", "Baidu", "Baidu", "3721", "3721", "Yisou", "Sogou", "Sina", "Sina", "Yahoo", "Yahoo", "Yahoo", "Tom", "Tom", "163", "SOSO", "MSN");
  var search = new Array("google.com", "google.cn", "baidu.com", "baidu.com", "3721.com", "3721.com", "yisou.com", "sogou.com", "iask.com", "sina.com", "search.cn.yahoo.com", "yahoo.cn", "search.yahoo.com", "search.tom.com", "search.tom.com", "so.163.com", "soso.com", "search.msn.com");

  var len = search.length;
  for(var i=0; i<len; i++)
  {
    if(url.indexOf(search[i])!=-1)
    {
      return realSearch[i];
    }
  }
  return "";
}

// 获取域名
function get_domain(url)
{
  var pos = url.indexOf("http://");
  if(pos==0)
  {
    var pos1 = url.indexOf("/", 7);
    if(pos1==-1)
    {
      return url.substr(7);
    }
    else
    {
      var len = pos1-pos-7;
      return url.substr(7, len);
    } 
  }
  else
  {
    pos = url.indexOf("www.");
    if(pos==0)
    {
      var pos1 = url.indexOf("/");
      if(pos1==-1)
      {
        return url.substr(0);
      }
      else
      {
        return url.substr(0, pos1);
      }
    }
  }

  pos = url.indexOf("/");
  if(pos==-1)
  {
    return url;
  }
  else
  {
    return url.substr(0, pos);
  }
}