PageSourceSearch

https://rc.fjlib.net/rc/jsp/web/chat/consult/js/jiqiren/base.js?tm=51790308814355

js fjlib.net collected 2026-09-25 04:00:37 UTC 39,527 bytes, 1,364 lines download raw bytes

1//######分为两部分:工具方法,页面逻辑############
2//#####工具方法#######
3function fillRobotSay(content,ishistory) {
4	var html = robotTemplate(content); // 客服回复
5	if(ishistory==1){
6		if(isMCustomScrollbar){
7			$("#content_1 .mCSB_container").prepend(html);
8		}else{
9			$("#content_1").prepend(html);
10		}
11		scrollToTop();
12	
13	}else{
14		if(isMCustomScrollbar){
15			$("#content_1 .mCSB_container").append(html);
16		}else{
17			$("#content_1").append(html);
18		}
19		scrollToBottom();
20	}
21}
22function fillmesay(content,ishistory){
23	var html = mesayTemplate(content); // 客服回复
24	if(ishistory==1){
25		if(isMCustomScrollbar){
26			$("#content_1 .mCSB_container").prepend(html);
27		}else{
28			$("#content_1").prepend(html);
29		}
30		scrollToTop();
31	
32	}else{
33		if(isMCustomScrollbar){
34			$("#content_1 .mCSB_container").append(html);
35		}else{
36			$("#content_1").append(html);
37		}
38		scrollToBottom();
39	}
40}
41
42
43//--加载中模板
44function getLoadImgJ(){
45return $('<img alt="发送中…" src="'+root+'/themes/default/images/pagination_loading.gif" \
46style="position:absolute;left:0;top:0;font-size:12px;"/>');
47}
48
49//--填写template 如mesayTemplate,得到html,然后写到content_1(咨询框)
50function fillTemplate(template,parm,ishistory){
51	var html ="";
52	if(typeof template =='function'){
53		html=template(parm)
54	}
55	if(html!=null&&html!=''){
56		if(ishistory==1){
57			if(isMCustomScrollbar){
58				$("#content_1 .mCSB_container").prepend(html);
59			}else{
60				$("#content_1").prepend(html);
61			}
62			scrollToTop();
63		}else{
64			if(isMCustomScrollbar){
65				$("#content_1 .mCSB_container").append(html);
66			}else{
67				$("#content_1").append(html);
68			}
69			scrollToBottom();
70		}
71		
72	
73	}
74}
75function fillToChatDiv(html){
76	if(html!=null&&html!=''){
77		if(isMCustomScrollbar){
78			$("#content_1 .mCSB_container").append(html);
79		}else{
80			$("#content_1").append(html);
81		}
82		scrollToBottom();
83	}
84}
85
86var isMCustomScrollbar =false;
87function scrollToBottom(){
88	if(isMCustomScrollbar){
89		window.setTimeout(scrollbarBottom, 500);
90	}else{
91		var contentDiv2 = document.getElementById("content_1");
92		contentDiv2.scrollTop = contentDiv2.scrollHeight;
93	}
94}
95function scrollToTop(){
96	if(isMCustomScrollbar){
97		window.setTimeout(scrollbarTop, 500);
98	}else{
99		var contentDiv2 = document.getElementById("content_1");
100		contentDiv2.scrollTop = 20;
101	}
102}
103
104var g_scrollInertia=0;
105function scrollbarTop(){
106	$("#content_1").mCustomScrollbar("update");
107	//$("#content_1").mCustomScrollbar("scrollTo","bottom",{scrollInertia:250,scrollEasing:"easeInOutQuad"});
108	$("#content_1").mCustomScrollbar("scrollTo","top",{scrollInertia:g_scrollInertia,scrollEasing:"easeInOutQuad"});
109}
110
111function scrollbarBottom(){
112	$("#content_1").mCustomScrollbar("update");
113	//$("#content_1").mCustomScrollbar("scrollTo","bottom",{scrollInertia:250,scrollEasing:"easeInOutQuad"});
114	$("#content_1").mCustomScrollbar("scrollTo","bottom",{scrollInertia:g_scrollInertia,scrollEasing:"easeInOutQuad"});
115}
116
117function scrollTo(ele){
118	if(isMCustomScrollbar){
119		window.setTimeout(function(){scrollbarTo(ele);}, 500);
120	}
121}
122function scrollbarTo(ele){
123	$("#content_1").mCustomScrollbar("update");
124	//$("#content_1").mCustomScrollbar("scrollTo",ele,{scrollInertia:250,scrollEasing:"easeInOutQuad"});
125	$("#content_1").mCustomScrollbar("scrollTo","ele",{scrollInertia:g_scrollInertia,scrollEasing:"easeInOutQuad"});
126}
127
128function isSrollAble_fun(){
129	//0为不允许
130	var ieAllows ={
131//			'6.0':'0',
132//			'7.0':'0'
133			'6.0':'0'
134	}
135	var sys =domObj.getBrowserType();
136	if((sys.ie&&ieAllows[sys.info[1]]=='0')){//判断是否为ie
137		return false;
138	}
139	if(checkIsPhone()){
140		return false;
141	}
142	return true;
143}
144
145
146//错误提示
147function errorfun() {
148	jAlert("error");
149}
150
151//获得radio的值
152function getRadioValue(id) {
153	var New = document.getElementsByName(id);
154	var value;
155	for ( var i = 0; i < New.length; i++) {
156		if (New.item(i).checked) {
157			value = New.item(i).getAttribute("value");
158			break;
159		} else {
160			continue;
161		}
162	}
163	return value
164}
165
166//--去除前后空格
167function dealkeyContent (keyContent){
168	if(keyContent==null){
169		return "";
170	}
171	keyContent =  keyContent.replace(/(^\s*)|(\s*$)/g, "");
172	return keyContent;
173}
174
175//--处理特殊字符?
176function userInoutCoder(str) {
177    var s = "";
178    if(str==null) return "";
179    if (str.length == 0) return "";
180    for (var i = 0; i < str.length; i++) {
181        switch (str.substr(i, 1)) {
182            case "<": s += "&lt;"; break;
183            case ">": s += "&gt;"; break;
184            case "&": s += "&amp;"; break;
185            case " ": s += "&nbsp;"; break;
186            case "\"": s += "&quot;"; break;
187            default: s += str.substr(i, 1); break;
188        }
189    }
190    return s;
191}
192
193//--<a>link按钮
194function getLinkFunStr_l(fun, str, className){
195	if(className==null||className==''){
196		className="link";
197	}
198	return oa_tools.getLinkFunStr(fun, str, className) ;
199}
200
201//去str转html
202function trfStrToHtml(str){
203	if(str==null){return "";}
204	return str.replace(/[ ]/g, "&nbsp;").replace(/</g,"&lt;")
205			.replace(/\n/g, "<br/>");
206}
207
208//--判断字符串宽度是否超过限定值
209function getHtmlOutIndex(str,size){
210	var length=0;
211	if(str !=null &&str !='' ){
212		for(var i=0;i<str.length;i++){
213    		var c =str.charAt(i);
214    		if((/[\u4e00-\u9fa5]+/).test(c)){
215    			length+=2;
216    		}else{
217    			length+=1;
218    		}
219    		if(size<length){
220    			return i;
221    		}
222    	}
223	}
224	return 0;
225}
226
227//--替换如${chatBtn}等字样为相关按钮
228function getSpecialFieldHtml(html){
229	
230	var content =html;
231	if(html!==null&&html!=''){
232		content =replaceAll_fun(content,"&#36;{rootName}",g_robotName);
233		//content ="<span class=\"hyperlinks\">"+content+"</span>";
234
235		//空格
236		var space_str = "&nbsp;";
237		space_str ="";
238		if(chatSetting.stopChat=='1'||!isChatStr()){
239			
240			content=replaceAll_fun(content,"&#36;{chatBtn}",""+ space_str);
241			
242		}else{
243			content=replaceAll_fun(content,"&#36;{chatBtn}",""+ space_str+getLinkFunStr_l("begin_allot();", rc_lang.smsg("begin_allot","转到人工服务") , ""));
244			
245		}
246		content=replaceAll_fun(content,"&#36;{leaveMsgBtn}",space_str+getLinkFunStr_l("goLeaveMsg('" + g_issueTitle + "');",rc_lang.smsg("leavemsg","leavemsg")+"", ""));
247		content=replaceAll_fun(content,"&#36;{zskbtn}",space_str+"<a href=\""+root+"/web/kb/center/index_"+unitNo+".html\""+
248				"target=\"_blank\" class=\"link\" title=\""+rc_lang.smsg("knowledgeBasepage","点击打开知识库页面") +"\" class='link'>"+rc_lang.smsg("knowledgeBase","转到人工服务") +"</a>");
249
250		content=replaceAll_fun(content,"&#36;{wtBtn}",
251			space_str+"<span style=\"\n" +
252			"    text-align: right;\n" +
253			"    /* margin-right: 106px; */\n" +
254			"\" ><a href=\""+root+"/web//chat/consignation/rcRetrievalOrder/fillForm.html?globalLibraryCode="+g_rdLib+"\""+
255			"target=\"_blank\" class=\"link\" title=\""+"(代查资料)委托单" +"\" class='link' style='    color: #fff;\n" +
256			"    border-bottom: #ff6600;\n" +
257			"    background: #ff6600;\n" +
258			"    padding: 3px 10px;\n" +
259			"    border-radius: 2px;\n" +
260			"    /* font-size: 17px; */\n" +
261			"    font-family: Verdana, sans-serif;'>"+"(代查资料)委托单→" +"</a></span>");
262
263
264		if(chatSetting.welcome_btn_dh!='' &&chatSetting.welcome_btn_dh !=null  &&chatSetting.welcome_btn_dh !='null'){
265            var welcome_btn_dh=replaceAll_fun(chatSetting.welcome_btn_dh,"\\${unitNo}",unitNo);
266            welcome_btn_dh=replaceAll_fun(welcome_btn_dh,"\\${libcode_w}",libcode_w);
267			content+="&nbsp;<div style=\"text-align: right\"><a  href=\""+welcome_btn_dh+"\""+
268			" class=\"link\" title=\"\" class='link'>"+rc_lang.smsg("KnowledgeNavigation","返回知识导航网") +"→</a></div>"
269		}
270	}
271	return content;
272}
273
274//替换全部
275function replaceAll_fun(s0,s1,s2){     
276    return s0.replace(new RegExp(s1,"gm"),s2);     
277}   
278
279var contentDivHtml = "";
280//--保存咨询框内容到contentDivHtml
281function saveChatDiveHtmlTG(){
282	var content_1_html="";
283	if(isMCustomScrollbar){
284		content_1_html=$("#content_1 .mCSB_container").html();
285	}else{
286		content_1_html=$("#content_1").html();
287	}
288	contentDivHtml=content_1_html;
289}
290//--把contentDivHtml填写到咨询框
291function fillChatDiveHtmlFG(){
292	if(isMCustomScrollbar){
293		$("#content_1 .mCSB_container").html(contentDivHtml);
294	}else{
295		$("#content_1").html(contentDivHtml);
296	}
297}
298
299function getCurrChatDiveHtml(){
300	var content_1_html="";
301	if(isMCustomScrollbar){
302		content_1_html=$("#content_1 .mCSB_container").html();
303	}else{
304		content_1_html=$("#content_1").html();
305	}
306	return content_1_html;
307}
308//--增加路径参数,用于拼装url
309function addUrlArg(sKey, sValue){
310	if(sValue){
311		return sKey + sValue;
312	}else{
313		return "";
314	}
315}
316
317
318function window_close(){
319	try{
320		var sys =domObj.getBrowserType();
321		if(sys.chrome){
322			window.location.href="about:blank";
323		}else{
324			window.open('', '_self', '');
325			window.close();
326		}
327	}catch(e){
328		window.location.href="about:blank";
329	}
330}
331
332function exitstep1(){
333	if(isEmbed=='1'){
334		back_fun ();
335	}else{
336		
337		window_close();
338	}
339}
340//替换含{0}{1}的字符串
341function rePlaceBrace(str) {
342	if (str == null) {
343		return null;
344	}
345	var arr = [];
346	for ( var i = 1; i < arguments.length; i++) {
347		arr.push(arguments[i]);
348	}
349	var message = str.replace(/\{(\d+)\}/g, function(m, i) {
350		return arr[i];
351	});
352	return message;
353}
354
355function addEvent(eo, es, ef) {
356	if (typeof eo.addEventListener == "function") {
357		eo.addEventListener(es, ef);
358	} else {
359		eo.attachEvent("on" + es, ef);
360	}
361}
362
363function removeEvent(eo, es, ef) {
364	if (typeof eo.addEventListener == "function") {
365		eo.removeEventListener(es, ef);
366	} else {
367		eo.detachEvent("on" + es, ef);
368	}
369}
370
371
372//
373var isPhone=false;
374function checkIsPhone(){
375	if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
376		if(window.location.href.indexOf("?mobile")<0){
377			try{
378				isPhone=true;
379				return isPhone;
380			}catch(e){}
381			}
382		}
383}
384
385function isMoblieBrowser() {  
386    var sUserAgent = navigator.userAgent.toLowerCase();  
387    var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";  
388    var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";  
389    var bIsMidp = sUserAgent.match(/midp/i) == "midp";  
390    var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";  
391    var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";  
392    var bIsAndroid = sUserAgent.match(/android/i) == "android";  
393    var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";  
394    var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";  
395    if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){  
396        return false;
397    }
398    return true;
399  
400}  
401
402
403function setActiveStyleSheet(filename){
404	//document.write("<link href="+filename+" rel=stylesheet>");
405	loadjscssfile(filename,"css");
406}
407function loadjscssfile(filename, filetype){
408	if (filetype=="js"){ //判断文件类型 
409		  var fileref=document.createElement('script')//创建标签 
410		  fileref.setAttribute("type","text/javascript")//定义属性type的值为text/javascript 
411		  fileref.setAttribute("src", filename)//文件的地址 
412		} 
413		else if (filetype=="css"){ //判断文件类型 
414		  var fileref=document.createElement("link") 
415		  fileref.setAttribute("rel", "stylesheet") 
416		  fileref.setAttribute("type", "text/css")  
417		  fileref.setAttribute("href", filename) 
418		} 
419		if (typeof fileref!="undefined") {
420		  document.getElementsByTagName("head")[0].appendChild(fileref) 
421		}  
422}
423//#######页面逻辑#######常用按钮功能和事件绑定,公告,功能面板tab(
423)处理
424
425//--############常用按钮功能和事件绑定start
426//--保存记录
427function savelocal_kb(){   
428	var  htmlStrb= getCurrChatDiveHtml() ;
429	if(htmlStrb){
430		var subData = {
431				"htmlStr" : htmlStrb
432		};
433		
434		formSubmit(subData, "savekblocalForm", root+"/web/kb/kbinfo/savelocal.html?t="+new Date().getTime());
435	}else{ 
436		fillTemplate(sysSayTemplate,content);
437	}
438}
439
440
441//--对话滚动条
442function initScrollbar(){
443	isMCustomScrollbar =isSrollAble_fun();
444	if(isMCustomScrollbar){
445		// 对话滚动条
446	  $("#content_1").mCustomScrollbar({
447	    scrollButtons:{
448	      enable:true,
449	      advanced:true
450	    },
451	    autoDraggerLength: true
452	  });
453	  // nav滚动条
454	  $(".xf_qiehuannr").mCustomScrollbar({
455	    scrollButtons:{
456	      enable:true,
457	      advanced:true
458	    },
459	    autoDraggerLength:true
460	  });
461	}
462//	else{
463//		$("#content_1").css("overflow","auto");
464//	}
465}
466
467//--快捷按键发送
468function bindkbsendPanel(){
469	// 打开发送类型
470	$('.xf_fskjjxz ul li a').eq(0).addClass('cur');
471	$('.xf_bcfs em i').live('click', function(){
472		var hidden =$('.xf_fskjjxz').is(":hidden");
473		if(hidden){
474			$('.xf_fskjjxz').show();
475		}else{
476			$('.xf_fskjjxz').hide();
477		}
478		
479	});
480	$('.xf_fskjjxz ul li a').live('click', function(){
481		$(this).addClass('cur').parent().siblings().find('a').removeClass('cur').parents('.xf_fskjjxz').hide();
482		var mode =$(this).attr("mode");
483		set_sendbtn_key(mode);
484	});
485	// 打开发送类型end
486}
487//--更换快捷键
488function set_sendbtn_key(mode){
489	if(mode=='1'){
490		content_onkeydown=content_crtlenterKry_kb;
491	}else{
492		content_onkeydown=content_enterKry_kb;	
493	}
494	$("#content").die().live("keydown",content_onkeydown);   
495	//document.getElementById("content").onkeydown=content_onkeydown;
496}
497//--两种快捷键实现
498//ctrl_enter
499function content_crtlenterKry_kb(e){
500	if(e==null){
501		e=event;
502	}	
503	if ((e.ctrlKey || e.metaKey) && (e.which == 13 || e.keyCode == 13)
504	&& !e.shiftKey && !e.altKey) {
505		sendKb_fun();
506		return false;
507	}
508	
509}
510
511//ctrl_enter
512function content_enterKry_kb(e){
513	if(e==null){//ie6..
514		e=event;
515	}	
516	if ((e.which == 13 || e.keyCode == 13)&&(!(e.ctrlKey || e.metaKey))
517			&& !e.shiftKey && !e.altKey) {
518		sendKb_fun();
519		return false;
520	}
521} 
522
523
524 
525//留言
526function goLeaveMsg(issueTitle,notCheck) {
527	if(typeof checkmsgLogin =="function" &&notCheck !="1"){
528//		if(!checkmsgLogin()){
529//				return;
530//		}
531	
532		checkmsgLogin();
533		return;
534	}
535	
536	//alert(isLeaveMsgLogin);
537	var subData = {
538		"issueTitle" : issueTitle
539	};
540	formSubmit(subData, "leaveMsgForm", "recordleave.html?libcode_w="+libcode_w+"&unitNo="+unitNo);
541}
542//--############常用按钮功能和事件绑定end
543
544
545	
546	//--############遮蔽层
547	function createMask(){
548		if( $("#shield").get(0)==null){
549		    //创建背景
550		    var rootEl=document.documentElement||document.body;
551		    var docHeight=((rootEl.clientHeight>rootEl.scrollHeight)?rootEl.clientHeight:rootEl.scrollHeight)+"px";
552		    var docWidth=((rootEl.clientWidth>rootEl.scrollWidth)?rootEl.clientWidth:rootEl.scrollWidth)+"px";
553		   // var shieldStyle="position:absolute;top:0px;left:0px;width:"+docWidth+";height:"+docHeight+";background-color:#ccc;z-index:10000;filter:alpha(opacity=1);opacity:1;";
554		   var shieldStyle="position: absolute;  top: 0px;  left: 0;  z-index:100;  width: 100%;  height: 100%;  background-color: #000; "; 
555		   shieldStyle+="filter:alpha(opacity=30);  -moz-opacity: 0.3;  opacity: 0.3;"; 
556		   var div =$("<div id='shield' style=\""+shieldStyle+"\"></div>").appendTo("body");
557		   div.html("<div style=''><br><span style='background-color:#fff;z-index:101;'><a href='javascript:void(0);' onclick='removeMask();'>关闭遮蔽层</a></span></div>");
558		}else{
559			$("#shield").show();
560		}
561		resizeMask();
562	} 
563	$(window).resize(function(){
564		resizeMask();//重新调用一次
565	});
566	function resizeMask(){
567		   var ht=parseInt($(document).height()); //遮蔽层默认高度为浏览器窗口高度
568		   var bodyHt=($("body").height().toString()).split("px");
569		   if(ht<parseInt(bodyHt[0])){
570		         ht=bodyHt[0];
571		   }
572		   $("#shield").css("height",ht+"px");
573	}
574	
575	function removeMask(){
576		try{
577	        $("#shield").remove();
578	        $("#shield").hide();
579	    }catch(e){} 
580	}
581	//--############遮蔽层end
582	
583	
584	//-- 人工咨询按钮
585	function bingChatBtn(){
586		$("#chat_btn").click(function(){
587			//chatToStaff();
588			begin_allot();
589		});
590	}
591
592	
593	//--##########右边分栏 功能面板tab start
594	//--功能面板选择功能
595	function selectTab(nav_a){
596		$(nav_a).click();
597	}
598	//--常见问题Accordion百叶窗
599	function bingfaqlistAccordion(){
600		//xf_qhcjwt:常见问题面板,cur代表之前打开了
601		//.xf_qhcjwt ul li a 
602		$('.xf_qhcjwt ul li a').live('click', function(){
603			if($(this).siblings('div').hasClass('cur')){//处于打开状态
604				$(this).removeClass('acur');
605				$(this).siblings('div').removeClass('cur');
606			}else{//处于关闭状态
607				$(this).addClass('acur');
608				$(this).siblings('div').addClass('cur');
609				var ishited =	$(this).attr("ishited");
610				$(this).attr("ishited","1");
611				if(ishited!="1"){
612					var isfaq =$(this).attr("isfaq");
613					var id=$(this).attr("id");
614					var infoNo =$(this).attr("infoNo");
615					var title = $(this).attr("title");
616					var parm = {isfaq:isfaq,id:id,infoNo:infoNo,title:title};
617					faqhits(parm);	
618				}
619			}
620			
621			//为了重新修改滚动条,所以把当前面板设置为gdcur
622			if($('.xf_qiehuannr .xf_block').eq($(this).index()).hasClass('gdcur')){
623				$('.xf_qiehuannr .xf_block').eq($(this).index()).addClass('gdcur');
624			}else{
625				$('.xf_qiehuannr .xf_block').eq($(this).index()).removeClass('gdcur');
626				if(isMCustomScrollbar){
627					$(".xf_qiehuannr").mCustomScrollbar("update");					
628				}
629			}
630	  });
631	}
632	
633	function faqhits(parm){
634		var success_fun =function(data){
635			
636		}
637		var data={
638				faqid:parm.id,
639				infoNo:parm.infoNo,
640				isfaq:parm.isfaq,
641				unitNo:parm.unitNo,
642				title:parm.title
643		}
644		var error_fun=function(){
645			
646		}
647		createajax(root+"/web/chat/airclass/addFaqhits.html", success_fun, data, error_fun);
648	}
649//isMCustomScrollbar
650	//--常见问题
651	function fill_faqlist(){
652		var lis="";
653		if(g_faqlist!=null&&g_faqlist.length>0){
654			for (var i=0;i<g_faqlist.length;i++){
655				var model =g_faqlist[i];
656
657				var tilte_temp =model.title;
658				
659				var outIndex=getHtmlOutIndex(tilte_temp,32);
660				if(outIndex>0){
661					tilte_temp=tilte_temp.substring(0, outIndex);
662			    	tilte_temp =trfStrToHtml(tilte_temp)+"<span >...</span>";
663		    	}else{
664		    		tilte_temp =trfStrToHtml(tilte_temp);
665			    }
666				
667				li =faqlistTemplate({index:i+1,title:trfStrToHtml(model.title), showTitle:tilte_temp,content:model.content
668				,id:model.id,infoNo:model.infoNo,isfaq:model.isfaq
669				});
670				lis+=li;
671			}
672			
673			$(".xf_faq >ul").html(lis);
674		}else{		
675			$(".xf_faq >ul").html("<li>"+rc_lang.smsg("noRecord","暂无") +"</li>");
676		}
677	}
678	
679	function showAir_li(obj){
680		var index =$(obj).attr("index");
681		 $("#air_li_img_"+index).hide();
682		 $("#air_li_"+index).show();
683	}
684	//修改src
685	function AirSrcError(obj){
686		var error =$(obj).attr("error");
687		if(error!="1"){
688			$(obj).attr("src",root+"/themes/newchatframe/images/xf_kzkt.jpg");
689			$(obj).attr("error","1");
690		}
691	}
692	function fill_airlist(){
693		var lis="";
694		$(".xf_air >ul").html("");
695		if(g_airlist!=null&&g_airlist.length>0){
696			
697			for (var i=0;i<g_airlist.length;i++){
698				var model =g_airlist[i]
699				var parm={img:model.img, index:i+1,content:model.content,airModel:'1', vedio:model.vedio,speakerName:model.speakerName,speakedTime:model.speakedTime};
700				var li =airLiTemplate(parm);
701				//lis+=li;
702				var li_j=$(li);
703				var iframe_j =li_j.find("iframe");
704				var iframe_ele =iframe_j.get(0);
705				
706				if(iframe_ele!=null){
707					$(iframe_j).before("<img id=\"air_li_img_"+i+"\" src=\""+root+"/themes/newchatframe/images/loading.png"+"\" />");
708					$(iframe_j).attr("height","200");
709					$(iframe_j).attr("width","220");
710					$(iframe_j).attr("index",i);
711					$(iframe_j).attr("id","air_li_"+i);
712					$(iframe_j).attr("class","air_li");
713					$(iframe_j).hide();
714					//$(iframe_j).attr("onload","showAir_li(this)");
715					
716					//改成缩略图点击查看
717					parm.airModel="0";
718					li =airLiTemplate(parm);					
719					li_j =$(li);
720					li_j.attr("src",iframe_j.attr("src"));
721					li_j.attr("vediotype","iframe");
722				}else{
723					iframe_j =li_j.find("embed");
724					$(iframe_j).attr("height","200");
725					$(iframe_j).attr("width","220");
726					iframe_ele =iframe_j.get(0);
727					
728					if(iframe_ele!=null){
729						//改成缩略图点击查看
730						parm.airModel="0";
731						li =airLiTemplate(parm);
732						li_j =$(li);
733						li_j.attr("src",iframe_j.attr("src"));
734						li_j.attr("vediotype","embed");
735					}
736					
737				}
738				
739				
740				li_j.attr("vedioId",model.id);
741				
742				$(".xf_air >ul").append(li_j);
743			
744				
745				
746			}
747			$(".xf_air >ul").append("<li class=\"other_air\" style=\"\"><a target=\"_blank\" href=\""+root+"/web/airclassrom/index_"+unitNo+".html\">查看课程历史>></a></li>");
748			
749			
750			$(".air_li").load(function(){showAir_li(this);});
751			
752			// 打开关闭视频弹窗
753			$('.xf_qhkzkt ul li').click(function(){
754				var vediotype =$(this).attr("vediotype");
755				var src=$(this).attr("src");
756				var html =null;
757				if(src!=null&&src!=""){
758					 html =xf_sptc_Template({type:vediotype,src:src});
759				}
760				if(html==null||html==''){
761					return;
762				}
763				$('.xf_sptc').show();
764				$('.tcinner').html(html);
765				addVideohits($(this).attr("vedioId"));
766				
767//				$(".xf_sptc_iframe").hide();
768//				$(".xf_sptc_embed").hide();
769//				if(vediotype=='iframe'){
770//					var src=$(this).attr("src");
771//					$(".xf_sptc_iframe").attr("src",src);
772//					$('.xf_sptc').show();
773//					$(".xf_sptc_iframe").show();
774//				}else if(vediotype=='embed'){
775//					var src=$(this).attr("src");
776//					$('.xf_sptc').show();
777//					$(".xf_sptc_embed").attr("src",src);
778//					$(".xf_sptc_embed").show();
779//				}
780				
781			});
782			$('.tcinner i').live("click",function(){
783				$(this).parents('.xf_sptc').hide();
784				$(".xf_sptc_embed").attr("src","about:blank");
785				$(".xf_sptc_iframe").attr("src","about:blank");
786				$('.tcinner').html('');
787			});
788			
789			//$(".xf_air >ul").html(lis);
790		}else{		
791			$(".xf_air >ul").html("<li>"+rc_lang.smsg("noRecord","暂无") +"</li>");
792		}
793	}
794	
795	//视频点击量统计
796	function addVideohits(vedioId){
797		var success_fun =function(data){
798			
799		}
800		var data={
801				vedioId:vedioId,
802				unitNo:unitNo
803		}
804		var error_fun=function(){
805			
806		}
807		createajax(root+"/web/chat/airclass/addhits.html", success_fun, data, error_fun);
808	}
809	
810	
811	//馆情快看统计
812	function addAdhits(adId){
813		var success_fun =function(data){
814			
815		}
816		var data={
817				adId:adId,
818				unitNo:unitNo
819		}
820		var error_fun=function(){
821			
822		}
823		createajax(root+"/web/chat/rcchatad/addhits.html", success_fun, data, error_fun);
824	}
825	
826	//--馆情快看
827	function fill_adlist(){
828
829		var data ={unitNo:unitNo};
830		var success_fun = "";
831		success_fun = function(data){
832			
833			var lis="";
834			if(data.list!=null&&data.list.length>0){
835				for (var i=0;i<data.list.length;i++){
836					var model =data.list[i]
837					var title_temp = model.title;
838					var type=model.type;
839					var url="";
840					if(type=="text"||type=="html"){
841						url=root+"/web/chat/rcchatad/contentpage.html?id="+model.id;
842					}else{
843						url=model.url;
844					}
845					var html ="";
846					if(url!=null&&url!=""){
847						li =adLiTemplate({href:url,title:title_temp,content:title_temp});
848					}else{
849						li =title_temp;
850					}
851					lis+="<li adId='"+model.id+"'>"+li+"</li>";
852				}
853				$(".xf_ad >ul").html(lis);
854				$('.xf_ad ul li').click(function(){
855					addAdhits($(this).attr("adId"));
856				});
857			}else{		
858				$(".xf_ad >ul").html("<li>"+rc_lang.smsg("noRecord","暂无") +"</li>");
859			}
860		};
861		var error_fun = function(){
862			//sysAlert("公告异常!"); 
863		};
864		createajax(root+"/web/chat/rcchatad/getChatAds.html", success_fun, data, error_fun);
865	}
866	
867		
868	function fillTabPanel(){
869		bingRelatedkbAccordion();
870		changeTabShow();
871	}
872	
873	//--按配置修改功能面板
874	function changeTabShow(){
875		var tab_fun={
876				faq :changeToFaqTab,
877				relatedkb:changeToRelatedkb,
878				staffInfo:changeToServiceInfo,
879				ad:changeToAdTab,
880				air:changeToAirTab,
881				interlibmsg:changeToInterlibmsg,
882				experts:changeToExperts
883		}
884		
885		
886		
887		if(g_tabs!=null){
888			for(var i=0 ; i<g_tabs.length;i++){
889				var tab =g_tabs[i];
890				if(tab!=null){
891					if(typeof tab_fun[tab.tab] =='function'){
892						tab_fun[tab.tab]($("#nav_xf_"+(i+1)),$(".xf_"+(i+1)));
893					}
894				}
895				
896			}
897			
898//			changeToRelatedkb($("#nav_xf_2"),$(".xf_2"));
899//			changeToServiceInfo($("#nav_xf_3"),$(".xf_3"));
900		}
901	}
902	
903	function changeToInterlibmsg(xf_right_nav,xf_block){
904		$(xf_right_nav).html("行业资讯");
905		$(xf_right_nav).addClass("nav_interlibmsg");
906		$(xf_block).removeClass("xf_qhkzkt");
907		$(xf_block).addClass("xf_interlibmsg");
908		$(xf_block).removeClass("xf_qhcjwt");
909		$(xf_block).addClass("xf_interlibmsg");
910		fill_interlibmsg();
911	}
912	
913	//--
914	//加载在线专家列表
915	function changeToExperts(xf_right_nav,xf_block){
916		$(xf_right_nav).html(rc_lang.smsg("expertsList","专家列表"));
917		$(xf_right_nav).addClass("nav_experts");
918		$(xf_block).removeClass("xf_qhkzkt");
919		$(xf_block).addClass("xf_experts");
920		$(xf_block).removeClass("xf_qhcjwt");
921		$(xf_block).addClass("xf_experts");
922		fill_experts();
923	}
924	
925	function fill_interlibmsg(){
926		var data ={unitNo:unitNo};
927		var success_fun = "";
928		success_fun = function(data){
929			var lis="";
930			if(data.list!=null&&data.list.length>0){
931				for (var i=0;i<data.list.length;i++){
932					var model =data.list[i]
933					var title_temp = model.title;
934					var type=model.type;
935					var url="";
936					if(type=="text"||type=="html"){
937						url=root+"/web/chat/rcchatad/contentpage.html";
938					}else{
939						url=model.url;
940					}
941					var html ="";
942					if(url!=null&&url!=""){
943						li =interlibmsgTemplate({href:url,title:title_temp,content:model.content,img:model.img});
944					}else{
945						li =title_temp;
946					}
947					lis+="<li adId='"+model.id+"'>"+li+"</li>";
948				}
949				
950				//$(".xf_interlibmsg").addClass("xf_qhkzkt");
951				$(".xf_interlibmsg >ul").html(lis);
952				$('.xf_interlibmsg ul li').click(function(){
953					addAdhits($(this).attr("adId"));
954				});
955			}else{		
956				$(".xf_interlibmsg >ul").html("<li>"+rc_lang.smsg("noRecord","暂无") +"</li>");
957			}
958			
959			if(isMCustomScrollbar){
960				$(".xf_qiehuannr").mCustomScrollbar("update");					
961			}
962		};
963		var error_fun = function(){
964			//sysAlert("公告异常!"); 
965		};
966		createajax(root+"/web/chat/rcchatad/interlibmsg.html", success_fun, data, error_fun);
967	
968	}
969	
970	//渲染绘制 在线专家列表
971	function fill_experts(){
972		var success_fun =function(data){
973			if(data.staffCount!=null &&data.staffCount>0){
974				var lis="";
975				if(data.data!=null&&data.data.length>0){
976					for (var i=0;i<data.data.length;i++){
977						var model =data.data[i]
978						var genreName =model.genreName;
979						var outIndex=getHtmlOutIndex(genreName,32);
980						if(outIndex>0){
981							genreName=genreName.substring(0, outIndex);
982					    	genreName =trfStrToHtml(genreName)+"<span >...</span>";
983				    	}else{
984				    		genreName =trfStrToHtml(genreName);
985					    }
986						var content ="";
987						for(var j=0;j<model.staffs.length;j++){
988							var staff =model.staffs[j];
989							content +=expertsTemplate({index:i+1,title:trfStrToHtml(staff.nickName),unitNo:unitNo, showTitle:staff.nickName,staffNo:staff.adminNo,
990								isOnline:staff.isOnline,content:""});
991						}
992						
993						content ="<ul>"+content+"</ul>";
994						
995						li =genreTemplate({index:i+1,title:trfStrToHtml(genreName), showTitle:genreName,content:content,online:model.onlineNum,count:model.count});
996						lis+=li;
997					}
998					
999					$(".xf_experts >ul").html(lis);
1000				}else{
1001					$(".xf_experts >ul").html("<li>"+rc_lang.smsg("noRecord","暂无") +"</li>");
1002				}
1003				if(isMCustomScrollbar){
1004					$(".xf_qiehuannr").mCustomScrollbar("update");					
1005				}
1006			}
1007		}
1008		var data={
1009				"unitNo":unitNo
1010		}
1011		var error_fun=function(){
1012			//alert("");
1013		}
1014		var url =root+"/web/chat/expert/list.html";
1015		createajax(url, success_fun, data,error_fun);
1016	}
1017	
1018	function changeToFaqTab(xf_right_nav,xf_block){
1019		$(xf_right_nav).html(rc_lang.smsg("Commonproblems","常见问题") );
1020		$(xf_right_nav).addClass("nav_faq");
1021		$(xf_block).removeClass("xf_qhkzkt");
1022		$(xf_block).addClass("xf_faq");
1023		$(xf_block).addClass("xf_qhcjwt");
1024		fill_faqlist();
1025	}
1026	
1027	
1028	function changeToAdTab(xf_right_nav,xf_block){
1029		$(xf_right_nav).html(rc_lang.smsg("Pavilionaffectionlook","馆情快看") );
1030		$(xf_right_nav).addClass("nav_ad");
1031		$(xf_block).removeClass("xf_qhkzkt");
1032		$(xf_block).addClass("xf_ad");
1033		$(xf_block).addClass("xf_qhcjwt");
1034		fill_adlist();
1035	}
1036	
1037	function changeToAirTab(xf_right_nav,xf_block){
1038		$(xf_right_nav).html(rc_lang.smsg("Airclassroom","空中课堂") );
1039		$(xf_right_nav).addClass("nav_air");
1040		$(xf_block).removeClass("xf_qhcjwt");
1041		$(xf_block).addClass("xf_air");
1042		$(xf_block).addClass("xf_qhkzkt");
1043		fill_airlist();
1044	}
1045	
1046	//--设置相关知识面板
1047	function changeToRelatedkb(xf_right_nav,xf_block){
1048		$(xf_right_nav).html(rc_lang.smsg("relevantKnowledge","相关知识") );
1049		$(xf_right_nav).addClass("nav_relatedkb");
1050		fillRelated(xf_block)
1051	}
1052	
1053	//--设置相关知识面板内容
1054	function fillRelated(xf_block){
1055		$(xf_block).addClass("relatedkb-xf_block");
1056		$(xf_block).removeClass("xf_qhkzkt");
1057		var defaultHtml= relatedkbDefaultTemplate()
1058		$(xf_block).html(defaultHtml);
1059	}
1060	
1061	//--获取相关知识
1062	function getRelatedkblist(keyContents,issue){
1063		var data ={
1064			"keyContent": issue,
1065			"keyContents": keyContents,
1066			"unitNo":unitNo,
1067			"url":pageurl
1068		}
1069		var success_fun = function(data) {
1070			getRelatedkblist_complete(keyContents, data.data);
1071		};
1072		var error_fun =function(){
1073			//window.setTimeout(function(){getRelatedkblist();}, 3000);
1074		}
1075		var url = root+"/web/kb/kbinfo/getRelatedList.html";
1076		createajax(url, success_fun, data,error_fun);
1077	}
1078	
1079	
1080	//--相关知识_complete
1081	function getRelatedkblist_complete(inputValue, list){
1082		var relatedkb_acco= document.getElementById("relatedkb_acco");
1083		if(relatedkb_acco){
1084			fill_relatedkb(list);
1085		}
1086	    //选择相关知识
1087		selectTab($(".nav_relatedkb"));
1088	}
1089	
1090	//--点击量
1091	function accokbhits(infoNo,obj){
1092		 var isActive=$(obj).attr("isActive");
1093		 if(isActive!='1'){
1094				var data ={
1095						infoNo:infoNo
1096				};
1097				var success_fun = "";
1098				var error_fun ="";
1099				var url = root+"/web/kb/kbinfo/hits.html";
1100				createajax(url, success_fun, data,error_fun);
1101		 }
1102
1103	}
1104	
1105	//--相关知识Accordion百叶窗
1106	function bingRelatedkbAccordion(){
1107		//xf_qhcjwt:常见问题面板,cur代表之前打开了
1108		//.xf_qhcjwt ul li a 
1109		$('#relatedkb_acco ul li').live('click', function(){
1110			if($(this).siblings('div').hasClass('cur')){//处于打开状态
1111				$(this).removeClass('acur');
1112				$(this).siblings('div').removeClass('cur');
1113			}else{//处于关闭状态
1114				$(this).addClass('acur');
1115				$(this).siblings('div').addClass('cur');
1116				var ishited =	$(this).attr("ishited");
1117				$(this).attr("ishited","1");
1118				if(ishited!="1"){
1119					accokbhits($(this).attr("infoNo"));
1120				}
1121			}
1122			
1123			//为了重新修改滚动条,所以把当前面板设置为gdcur
1124			if($('.relatedkb-xf_block').eq($(this).index()).hasClass('gdcur')){
1125				$('.relatedkb-xf_block').eq($(this).index()).addClass('gdcur');
1126			}else{
1127				$('relatedkb-xf_block').eq($(this).index()).removeClass('gdcur');
1128				$(".xf_qiehuannr").mCustomScrollbar("update");
1129			}
1130	  });
1131	}
1132	
1133	//填写相关知识面板内容
1134	function fill_relatedkb(list){
1135		var lis="";
1136		$("#relatedkb_acco").html($("<ul>"));
1137		if(list!=null&&list.length>0){
1138				for ( var i in list) {
1139				var  infoTitle =list[i].infoTitle;
1140				var  infoStr = "";
1141				var  linkTitle=trfStrToHtml(infoTitle);
1142				if(typeof infoTitle =="string"){
1143			    	var outIndex= getHtmlOutIndex(infoTitle,30);
1144			    	if(outIndex>0){
1145				    	var temp =infoTitle.substring(0, outIndex);
1146				    	infoStr =trfStrToHtml(temp)+"<span >...</span>";
1147			    	}else{
1148			    		infoStr =trfStrToHtml(infoTitle);
1149				    }
1150				}
1151				var index =i-0+1;
1152				li =faqlistTemplate({index:index,title:linkTitle,infoNo:list[i].infoNo, showTitle:infoStr,content:list[i].infoContent});
1153				lis+=li;
1154			}
1155			
1156			$("#relatedkb_acco >ul").html(lis);
1157		}else{		
1158			$("#relatedkb_acco >ul").html("<li>"+rc_lang.smsg("noRecord","") +"</li>");
1159		}
1160	}
1161	
1162	//--咨询员信息面板
1163	function changeToServiceInfo(xf_right_nav,xf_block){
1164		$(xf_right_nav).html(rc_lang.smsg("ConsultantInformation","咨询员信息") );
1165		$(xf_right_nav).addClass("nav_serviceInfo");
1166		fillServiceInfo(xf_block)
1167	}
1168	
1169	//--设置-咨询员信息面板内容
1170	function fillServiceInfo(xf_block){
1171		$(xf_block).addClass("relatedkb-xf_block");
1172		$(xf_block).removeClass("xf_qhkzkt").removeClass("xf_qhcjwt");
1173		var html=serviceInfoTemplate(g_serviceInfo);
1174		$(xf_block).html(html);
1175	}
1176	
1177	//--##########右边分栏end
1178	
1179	
1180	//--############公告
1181	//--公告
1182	//滚动插件
1183	(function($){
1184		$.fn.extend({
1185			Scroll:function(opt,callback){
1186					//参数初始化
1187					if(!opt) var opt={};
1188					var _this=this.eq(0).find("ul:first");
1189					var lineH=_this.find("li:first").height(), //获取行高
1190						line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度
1191						speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒)
1192						timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒)
1193					var timerID=opt.timerID;
1194					if(line==0) line=1;
1195					var upHeight=0-line*lineH;
1196					//滚动函数
1197					var scrollUp=function(){
1198							_this.animate({
1199									marginTop:upHeight
1200							},speed,function(){
1201									for(i=1;i<=line;i++){
1202											_this.find("li:first").appendTo(_this);
1203									}
1204									_this.css({marginTop:0});
1205							});
1206					}
1207					
1208					_this.data("scrollUp", scrollUp);
1209					 
1210					//鼠标事件绑定
1211					_this.hover(function(){
1212							clearInterval(window[timerID]);
1213					},function(){
1214						    var obj =this;
1215							window[timerID]=setInterval(function(){
1216								$(obj).data('scrollUp')();
1217							},timer);
1218					}).mouseout();
1219			}       
1220		});
1221		
1222		$.fn.extend({
1223			ScrollLeft:function(opt,callback){
1224					//参数初始化
1225					if(!opt) var opt={};
1226					var timerID=opt.timerID;
1227					var ele =this;
1228					var width=$(ele).width();
1229					var speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒)
1230					timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒)
1231				
1232					var speed =opt.speed;
1233					  var num = 0;
1234					    function scrollUp() {
1235					        //750是根据你给的尺寸,可变的
1236					        if (num <= -1 * width) {
1237					            num = 0;
1238					        }
1239					        num = -1 * width;
1240//					        $(ele).css({
1241//					        	marginLeft: num
1242//					        })
1243					        $(ele).animate({
1244					        	marginLeft:num
1245					        },speed,function(){
1246					        	$(ele).css({marginLeft:0});
1247					        });
1248					     
1249					    }
1250					   this.data("scrollUp", scrollUp);
1251					    //设置鼠标经过时滚动停止
1252					    $(ele).hover(function() {
1253					        clearInterval(window[timerID]);
1254					    },
1255					    function() {
1256					    	var obj =this;
1257							window[timerID]=setInterval(function(){
1258								$(obj).data('scrollUp')();
1259							},timer);
1260					    	//window[timerID] = setInterval(goLeft, 500);
1261					    }).mouseout();
1262			}       
1263		});
1264	})(jQuery);
1265	
1266	var timerID_1=null;
1267	//var timerID_2=null;
1268	//公告栏
1269	$(document).ready(function(){
1270		//$("#s1").Scroll({line:1,speed:500,timer:4000,timerID:"timerID_1"});
1271		//$("#s2").Scroll({line:1,speed:500,timer:4000,timerID:"timerID_2"});
1272		//getChatAds();
1273	});
1274
1275	function getChatAds() {
1276		var data ={unitNo:unitNo};
1277		var success_fun = "";
1278		success_fun = function(data){
1279			$("#s1 ul").html("");
1280			var preli =$("<li></li>");
1281			var preContent=rc_lang.smsg("WarmPrompt","温馨提示") ;
1282
1283			preHtml =adsTemplate({href:root+"/web/kb/center/index_"+unitNo+".html",title:rc_lang.smsg("knowledgeBasepage","") ,content:preContent});
1284			preli.html(preHtml);
1285			$("#s1 ul").append(preli);
1286			
1287			
1288			$(data.list).each(function(i,val){
1289				var li =$("<li></li>");
1290				var title_temp = val.title;
1291				var type=val.type;
1292				var url="";
1293				if(type=="text"||type=="html"){
1294					url=root+"/web/chat/rcchatad/contentpage.html?id="+val.id;
1295				}else{
1296					url=val.url;
1297				}
1298				var html ="";
1299				if(url!=null&&url!=""){
1300					html =adsTemplate({href:url,title:title_temp,content:title_temp});
1301				}else{
1302					html =title_temp;
1303				}
1304				li.html(html);
1305				$("#s1 ul").append(li);
1306			});
1307			$("#s1").Scroll({line:1,speed:500,timer:3000,timerID:"timerID_1"});
1308		};
1309		var error_fun = function(){
1310			//sysAlert("公告异常!"); 
1311		};
1312		createajax(root+"/web/chat/rcchatad/getChatAds.html", success_fun, data, error_fun);
1313	}
1314	//--##############公告end
1315	//==是否可以在线咨询 isfillInfo是否需要填写信息
1316	function isCanAllot(isfillInfo){
1317    //g_isNeedfillInfo 需要填写个人信息
1318    if(g_isNeedfillInfo=='1'
1319    	&&(startAllot!='1'||allotdOnceState!=1)
1320    	&&g_isfilledInfo!='1'&&isfillInfo!='0'){
1321        open_fillInfo_win();
1322        return false;
1323    }
1324    //g_isNeedfillInfo2 需要登录才能对话
1325    else if(g_isNeedfillInfo2=='1'&&isfillInfo!='0'){
1326    	open_login_win_check(1);
1327        return false;
1328    }
1329    return true;
1330}
1331var HtmlUtil = {
1332	    /*1.用正则表达式实现html转码*/
1333		  htmlEncodeByRegExp:function (str){
1334		       var s = "";
1335		      if(str.length == 0) return "";
1336		      s = str.replace(/&/g,"&amp;");
1337		        s = s.replace(/</g,"&lt;");
1338		       s = s.replace(/>/g,"&gt;");
1339		       s = s.replace(/ /g,"&nbsp;");
1340		        s = s.replace(/\'/g,"&#39;");
1341		     s = s.replace(/\"/g,"&quot;");
1342		        return s;
1343		  },
1344	   /*2.用正则表达式实现html解码*/
1345		   htmlDecodeByRegExp:function (str){
1346		         var s = "";
1347		          if(str.length == 0) return "";
1348		       s = str.replace(/&amp;/g,"&");
1349		      s = s.replace(/&lt;/g,"<");
1350		         s = s.replace(/&gt;/g,">");
1351		         s = s.replace(/&nbsp;/g," ");
1352		         s = s.replace(/&#39;/g,"\'");
1353		        s = s.replace(/&quot;/g,"\"");
1354		         return s;
1355		   }
1356	 };
1357$(function(){
1358		var xf_winwidth = $(window).width();
1359		if(xf_winwidth<640){
1360			$('.xf_head .xf_headleft h3').css('font-size','20px')
1361			$('.xf_head_erweim,.xf_head_gbqp').hide();
1362			$('.xf_qhjrrga').css('padding-right','10px').text(rc_lang.smsg("begin_allot","") )
1363		}
1364})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.