var companyId = 69;

var auto_agent = window.navigator.userAgent.toLowerCase();   
var client_kf = {
	 isQuirks:	document.compatMode == 'BackCompat',   
	 isOpera:   auto_agent.indexOf('opera') > -1,   
	 isIE:		auto_agent.indexOf('msie') > -1,   
	 isFF:		auto_agent.indexOf('firefox') > -1,   
	 isIE6:      auto_agent.indexOf('msie 6') > -1,    
	 isIE7:		auto_agent.indexOf('msie 7') > -1,  
	 isIE8:      auto_agent.indexOf('msie 8') > -1,   
	 is360:		false
 }; 
var isOpera=client_kf.isOpera;
var isBackCompat=client_kf.isQuirks;
var is360Strict = client_kf.is360 && !client_kf.isQuirks && !client_kf.isIE6;
var isIE =	client_kf.isIE;
var isIE8 = client_kf.isIE8;
var isIE6 =  client_kf.isIE6;
var isFF =	client_kf.isFF;
var host = "http://kf.5251.net"; 
var icon_isIE=isIE;
var img_host = "http://kf.5251.net";
var kf_openurl="http://chat.5251.net/client.jsp?flag=1&companyId=69&style=333&locate=cn" +"&refer="+ escape(window.location.href)+"&username="+encodeURIComponent("")+"&conn_word="+encodeURIComponent("");
/*
 * Compressed by JSA(www.xidea.org)
 */
var route=escape(window.location.href);var kdocTitle = "";if(companyId != 17700){kdocTitle=document.title;if(kdocTitle==null){var t_titles=document.getElementByTagName("title");if(t_titles&&t_titles.length>0)kdocTitle=t_titles[0];else kdocTitle=""}}function setCookie($,C,B,A){var _=$+"="+escape(C)+"; expires=Thu, 6 Jan 2100 12:01:01 UTC"+((B)?"; path="+B:"")+((A)?"; domain="+A:"");document.cookie=_}function getCookie(A){var $=document.cookie,_=A+"=",C=$.indexOf("; "+_);if(C==-1){C=$.indexOf(_);if(C!=0)return""}else C+=2;var B=document.cookie.indexOf(";",C);if(B==-1)B=$.length;return unescape($.substring(C+_.length,B))}var kf_now=new Date(),icon_ss=kf_now.getTime(),temp_d=parseInt(Math.random()*10000),user_str= icon_ss+"_"+temp_d,userid=getCookie("kf51_userid");if(userid==""||userid==null){setCookie("kf51_userid",user_str);userid=user_str}var ref=document.referrer,local_host=document.domain;if(ref.indexOf(local_host)<0)setCookie("kf51_referrer",ref);var getScreenAttr=function(){var $=0,_=0;if(isBackCompat){if(document.body){$=document.body.clientWidth;_=document.body.clientHeight}}else if(document.documentElement){$=document.documentElement.clientWidth; _=document.documentElement.clientHeight}if($==0||_==0)if(document.body){$=document.body.clientWidth;_=document.body.clientHeight}else if(document.documentElement){$=document.documentElement.clientWidth; _=document.documentElement.clientHeight}if($==0||_==0)return[window.screen.availWidth-24,window.screen.availHeight-160];else return[$,_]},temp_screen=getScreenAttr(),screen_w=temp_screen[0],screen_h=temp_screen[1];
kf_openurl+=("&keyword="+escape(getCookie('kf51_referrer')) + "&userid="+userid);
var is_kf_online = 1;
var kf_workids = ",24160,";
var workids = ",24160,";
function open_pic_chat()
{
	try{
	var chat_win= window.open(kf_openurl,'chat_69','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	chat_win.focus();	sendAndRecieve("/js/recieve.jsp?state=4&companyId="+69+"&sessionId="+userid);}catch(e){}
}
function open_chat_person(workerid)
{
	try{
	var chat_win = window.open(kf_openurl+'&workId='+workerid+'&flag=3','chat_69','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	chat_win.focus();
	sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);}catch(e){}
}
function open_tel_chat(wiseid,seat)
{
	try{
    var etel_url = "http://etel.5251.net/etel/dial.jsp?wiseid=" + wiseid + "&seat=" + seat+"&com_name="+encodeURIComponent(" &#x5317;&#x4eac;&#x8fdc;&#x5927;&#x4f18;&#x7ee9;&#x79d1;&#x6280;&#x53d1;&#x5c55;&#x6709;&#x9650;&#x516c;&#x53f8;%>");
	var wins = window.open(etel_url,'e_tel_chat','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	wins.focus();
	}catch(e){}
}
var judge_kf_isonline=function(workerid){if(kf_workids.indexOf(","+workerid+",")>-1)return true; else return false}
var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},Extend=function($,_){for(var A in _)$[A]=_[A]},Bind=function(_,$){return function(){return $.apply(_,arguments)}},BindAsEventListener=function(_,$){return function(A){return $.call(_,(A||window.event))}},CurrentStyle=function(A,_){if(A.style[_])return A.style[_];else if(A.currentStyle)return A.currentStyle[_];else if(document.defaultView&&document.defaultView.getComputedStyle){_=_.replace(/([A-Z])/g,"-$1").toLowerCase();var $=document.defaultView.getComputedStyle(A,"");return $&&$.getPropertyValue(_)}return null};function addEventHandler($,_,A){if($.addEventListener)$.addEventListener(_,A,false);else if($.attachEvent)$.attachEvent("on"+_,A);else $["on"+_]=A}function removeEventHandler($,_,A){if($.removeEventListener)$.removeEventListener(_,A,false);else if($.detachEvent)$.detachEvent("on"+_,A);else $["on"+_]=null}var KF_Drag=Class.create();KF_Drag.prototype={initialize:function(A,_,$){this.Drag=document.getElementById(A);this._x=this._y=0;this._marginLeft=this._marginTop=0;this._fM=BindAsEventListener(this,this.Move);this._fS=Bind(this,this.Stop);this._Lock=false;this.SetOptions(_,$);this._playRoller=null;this._lastDiffy=0;this._lastSW=0;this._lastSH=0;this.RollInit();addEventHandler(this.Drag,"mousedown",BindAsEventListener(this,this.Start))},SetOptions:function(dragargs,rollargs){this.dragargs={Handle:"",Lock:false,pos:"absolute",top:0,left:0};this.rollargs={Able:false,Lock:false,KeepX:0,KeepX_px:0,KeepY:0,Freq:5,Step:0.1};Extend(this.dragargs,eval("("+dragargs+")")||{});Extend(this.rollargs,eval("("+rollargs+")")||{})},RollInit:function(){if(this.dragargs.left>=0)this.Drag.style.left=this.dragargs.left+"px";if(this.dragargs.pos=="fixed"){this.rollargs.KeepY=0;if(isBackCompat&&icon_isIE){this.Drag.style.position="absolute";var $="#"+this.Drag.id+"{left:"+this.dragargs.left+"px;top:expression((ignoreMe=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"+(this.dragargs.top)+" +'px');}\n";if(document.body)if(document.body.style.backgroundImage==""||document.body.style.backgroundImage=="none"||(document.body.style.backgroundImage=="url(about:blank)"&&document.body.style.backgroundAttachment!="fixed"))$+="*html body{background:url(about:blank)  fixed;}";
if(!this._css){this.Drag.style["top"]="";for(var D=0;D<document.styleSheets.length;D++){var A=document.styleSheets[D];if(A.title=="css_5251"&&A.rules)for(var C=0;C<A.rules.length;C++)if(A.rules[C].selectorText.toLowerCase()=="#"+this.Drag.id)A.rules[C].style.top=""}this._css=document.createStyleSheet();this._css.cssText=$;this._css.title="css_5251"}}else{this.Drag.style.position="fixed";if(this.dragargs.top>=0)this.Drag.style.top=this.dragargs.top+"px"}this.rollargs.Able=true}else if(this.dragargs.pos=="absolute"){this.Drag.style.position="absolute";if(this.dragargs.top>=0)this.Drag.style.top=this.dragargs.top+"px"}this._marginTop=parseInt(CurrentStyle(this.Drag,"marginTop"))||0;this._marginLeft=parseInt(CurrentStyle(this.Drag,"marginLeft"))||0;if(this.rollargs.Able){if(this.rollargs.Freq<=0)this.rollargs.Freq=5;if(this.rollargs.Step<=0||this.rollargs.Step>=1)this.rollargs.Step=0.1;if(this.rollargs.KeepX<0||this.rollargs.KeepX>=100)this.rollargs.KeepX=0;if(this.rollargs.KeepX_px<0)this.rollargs.KeepX_px=0;if(this.rollargs.KeepX_px>0)this.rollargs.KeepX=0;if(this.rollargs.KeepX<0||this.rollargs.KeepX>=100)this.rollargs.KeepX=0;if(this.rollargs.KeepX_px>0||this.rollargs.KeepX>0||this.rollargs.KeepY>0){var B=getScreenAttr();this._lastSW=B[0];this._lastSH=B[1]}var _=this;_._playRoller=window.setInterval(function(){_.Roller()},this.rollargs.Freq)}},Start:function($){if(isOpera&&this.dragargs.pos=="fixed"){this.Drag.style.position="absolute";this.Drag.style.top=(this.Drag.offsetTop+this.getDiffY())+"px"}if(this.dragargs.Handle!="")try{var A=null;if($.srcElement)A=$.srcElement;else A=$.target;if(A.parentNode.id!=this.dragargs.Handle&&A.id!=this.dragargs.Handle)this._Lock=true;else this._Lock=false}catch(_){}if(this._Lock||this.dragargs.Lock)return;this._x=$.clientX-this.Drag.offsetLeft;this._y=$.clientY-this.Drag.offsetTop;addEventHandler(document,"mousemove",this._fM);addEventHandler(document,"mouseup",this._fS);if(icon_isIE){if(this.dragargs.pos=="fixed")for(var D=0;D<document.styleSheets.length;D++){var A=document.styleSheets[D];if(A.title=="css_5251"&&A.rules)for(var C=0;C<A.rules.length;C++)if(A.rules[C].selectorText.toLowerCase()=="#"+this.Drag.id)A.rules[C].style.top=(this.Drag.offsetTop)+"px"}addEventHandler(this.Drag,"losecapture",this._fS);this.Drag.setCapture()}else{addEventHandler(window,"blur",this._fS);$.preventDefault()}this.setRoll()},Move:function($){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty();var A=$.clientX-this._x,_=$.clientY-this._y;this.Drag.style.left=A-this._marginLeft+"px";this.Drag.style.top=_-this._marginTop+"px"},Stop:function(){if(this._Lock||this.dragargs.Lock)return;removeEventHandler(document,"mousemove",this._fM);removeEventHandler(document,"mouseup",this._fS);if(icon_isIE){removeEventHandler(this.Drag,"losecapture",this._fS);this.Drag.releaseCapture()}else removeEventHandler(window,"blur",this._fS);if(this.rollargs.KeepX>0)this.rollargs.KeepX=(this.Drag.offsetLeft/(this._lastSW-this.Drag.offsetWidth)*100).toFixed(2);if(this.rollargs.KeepY>0)this.rollargs.KeepY=((this.Drag.offsetTop-this.getDiffY())/(this._lastSH-this.Drag.offsetHeight)*100).toFixed(2);if(this.dragargs.pos=="fixed")if(isBackCompat&&icon_isIE)if(this._css){var $=this._css.cssText;$=$.replace(/(\+.+\+)/gm,"+"+(this.Drag.offsetTop-this.getDiffY())+"+");this._css.cssText=$;this.Drag.style["top"]=""}if(isOpera&&this.dragargs.pos=="fixed"){this.Drag.style.top=(this.Drag.offsetTop-this.getDiffY())+"px";this.Drag.style.position="fixed"}this.cancelRoll()},Roller:function(){var $=this,A=0;if($.rollargs.Lock)return;try{var _=getScreenAttr();if(_[0]!=$._lastSW&&$.rollargs.KeepX_px>0){$.Drag.style.left=parseInt(_[0]-$.rollargs.KeepX_px-$.Drag.offsetWidth)+"px";$._lastSW=_[0];return}
if(_[0]!=$._lastSW&&$.rollargs.KeepX>0){$.Drag.style.left=parseInt((_[0]-$.Drag.offsetWidth)*$.rollargs.KeepX/100)+"px";$._lastSW=_[0];return}A=$.getDiffY();if(_[1]!=$._lastSH){
if($.rollargs.KeepY==100){$.Drag.style.top=(_[1]-$.Drag.offsetHeight+A)+"px";} else if($.rollargs.KeepY>0){$.Drag.style.top=parseInt((_[1]-$.Drag.offsetHeight)*$.rollargs.KeepY/100+A)+"px";}$._lastSH=_[1];return}if($.dragargs.pos !="absolute")return;var B=$.rollargs.Step*(A-$._lastDiffy); if(B>0)B=Math.ceil(B);else B=Math.floor(B);$._lastDiffy=$._lastDiffy+B;$.Drag.style.top=parseInt(B+ $.Drag.offsetTop-$._marginTop)+"px"}catch(C){$._playRoller=null}},getDiffY:function(){if(window.innerHeight)return window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;else if(document.body)return document.body.scrollTop;else return 0},setRoll:function(){this.rollargs.Lock=true},cancelRoll:function(){this.rollargs.Lock=false}}
var kftype=2, isonline = 1, myid="client",onliner_id=1, img_hight = 0,img_width = 0, hasOpen= false,closeButton = true,closeIMG ="http://kf.5251.net/images/close.gif";
		var img_on = "http://kf.5251.net/upload/2008-09-11/108841759233.gif",img_off = "http://kf.5251.net/upload/2008-09-11/108841759409.gif",alignx = 2,alignW =0,alignH=-1,alignHStr ="";if(alignW<=0)alignW=10;
 var float_flag = 0,icon_isIE = (document.all) ? 1: 0;
/*
 * Compressed by JSA(www.xidea.org)
 */
function IconClass(){this.property=new Array();this.imgsrc=(isonline==1)?img_on:img_off;this.left=0;this.top=0;this.show="visible";this.scrollTimer=null;this.floatHtml=null;this.autoScroll=iconAutoScroll;this.imageTimer=onliner_imageTimer;this.get_tip_str=onliner_get_tip_str;this.win_open=onliner_win_open;this.start=icon_start;this.initialize=icon_init;this.get_clost_str=onliner_get_close_str;this.hidden=hidden_div;this._drag=null;this.icon_css_st=get_icon_css_str}function icon_init(){getImageProperty();icon.start()}function icon_start(){if(icon_isIE&&document.readyState!="complete"){setTimeout("icon.start()",1000);return}var $=document.createElement("DIV");$.id="kf_icon_div";this.left=alignW;if(alignx==2)this.left=screen_w-this.property["width"]-alignW;this.top=alignH;if(alignH<0)this.top=screen_h-this.property["height"]-2;alignHStr="left:"+this.left+"px;";if(document.getElementsByTagName("BODY")[0])document.getElementsByTagName("BODY")[0].appendChild($);else document.write("<div id='kf_icon_div'></div>");this.autoScroll()}function onliner_get_close_str(){if(closeButton)return"<img onclick='icon.hidden()' style='position:absolute; right:7px; top:7px; cursor:hand;' src='"+closeIMG+"'/>";return ""}function hidden_div(){this.show="hidden";document.getElementById("kf_icon").style.visibility="hidden";try{clearInterval(icon.scrollTimer)}catch($){}}function onliner_win_open(){hasOpen=true;open_pic_chat()}function onliner_imageTimer(){try{if(document.getElementById("kf_icon_div").innerHTML.indexOf(".gif")==-1&&document.getElementById("kf_icon_div").innerHTML.indexOf(".jpg")==-1&&document.getElementById("kf_icon_div").innerHTML.indexOf(".swf")==-1){this.get_tip_str();document.getElementById("kf_icon_div").innerHTML=this.floatHtml}}catch($){}}function onliner_get_tip_str(){var $="";	if(!(isIE8||isFF)&&float_flag!=1)$+="<iframe   style='position:absolute;z-index:7998;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression(this.nextSibling.offsetLeft);' frameborder='0'></iframe>";var _="<img src='"+this.imgsrc+"' border='0' style='cursor:pointer' onclick='icon.win_open()'/>";$+="<DIV id='kf_icon' style='"+this.icon_css_st()+"'>"+this.get_clost_str()+_+"</div>";this.floatHtml=$}function get_icon_css_str(){var $="z-index:8998;display:none;visibility:"+this.show+";"+alignHStr+"width:"+this.property["width"]+"px;height:"+this.property["height"]+"px;overflow:hidden";return $}function iconAutoScroll(){try{showKFDiv();}catch($){}getImageProperty();this.left=alignW;if(alignx==2)this.left=screen_w-this.property["width"]-alignW;this.top=alignH;if(alignH<0)this.top=screen_h-this.property["height"]-2;this.imageTimer();if(document.getElementById("kf_icon_div").innerHTML=="")this.scrollTimer=window.setTimeout("icon.autoScroll()",100);else{this._drag=new KF_Drag("kf_icon","{Lock:true,pos:'absolute',top:"+this.top+",left:"+this.left+"}","{Able:true,Lock:false,KeepX_px:"+(alignx==2?alignW:0)+",KeepY:"+(alignH<0?100:0)+"}");document.getElementById("kf_icon").style.display=''}}function getImageProperty(){if(img_hight>0&&img_width>0)return;var _=img_off;if(isonline==1)_=img_on;if(_.indexOf(".txt")>-1)return;if(_.indexOf("10913144096.jpg")>0||_.indexOf("en_offline.gif")>0){img_hight=88;img_width=171;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(_.indexOf("1088215854.gif")>0||_.indexOf("10882158160.gif")>0){img_hight=62;img_width=143;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(_.indexOf("10882158490.gif")>0||_.indexOf("1088215996.gif")>0){img_hight=125;img_width=93;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(_.indexOf("10882157269.gif")>0||_.indexOf("10882156495.gif")>0){img_hight=73;img_width=119;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(_.indexOf("108841759233.gif")>0||_.indexOf("108841759409.gif")>0){img_hight=111;img_width=82;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}var B=_.indexOf("_");if(B>0){var $=_.indexOf("_",B+1);img_width=parseInt(_.substr(B+1,$));img_hight=parseInt(_.substr($+1));icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(companyId==11328){img_hight=159;img_width=120;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}if(companyId==7114){img_hight=77;img_width=160;icon.property["height"]=img_hight;icon.property["width"]=img_width;return}var A=new Image();if(isonline)A.src="\"+img_on+\"";else A.src="\"+img_off+\"";A.onerror=function(){};if(!A.complete){setTimeout("getImageProperty()",100);return}img_hight=A.height;img_width=A.width;icon.property["height"]=img_hight;icon.property["width"]=img_width}var icon=new IconClass();icon.initialize();


function y_gVal(iz)
{var endstr=document.cookie.indexOf(";",iz);if(endstr==-1) endstr=document.cookie.length;return document.cookie.substring(iz,endstr);}
function y_g(name)
{var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;var j;while(i<clen) {j=i+alen;if(document.cookie.substring(i,j)==arg) return y_gVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0) break;}return null;}
function cc_k()
{var y_e=new Date();var y_t=31104000000;var yesvisitor=1000*36000;var yesctime=y_e.getTime();y_e.setTime(y_e.getTime()+y_t);var yesiz=document.cookie.indexOf("cck_lasttime");if(yesiz==-1){document.cookie="cck_lasttime="+yesctime+"; expires=" + y_e.toGMTString() +  "; path=/";document.cookie="cck_count=0; expires=" + y_e.toGMTString() +  "; path=/";return 0;}else{var y_c1=y_g("cck_lasttime");var y_c2=y_g("cck_count");y_c1=parseInt(y_c1);y_c2=parseInt(y_c2);y_c3=yesctime-y_c1;if(y_c3>yesvisitor){y_c2=y_c2+1;document.cookie="cck_lasttime="+yesctime+"; expires="+y_e.toGMTString()+"; path=/";document.cookie="cck_count="+y_c2+"; expires="+y_e.toGMTString()+"; path=/";}return y_c2;}}
var yesdata;
yesdata='companyId=69&userid='+userid+'&refe='+escape(document.referrer)+'&location='+escape(document.location)+'&color='+screen.colorDepth+'x&resolution='+screen.width+'x'+screen.height+'&returning='+cc_k()+'&language='+navigator.systemLanguage+'&ua='+escape(navigator.userAgent)+'&ip=';
var host_stat = document.domain;
var refe_stat = document.referrer;
if(refe_stat == null)refe_stat= "";
var pos = refe_stat.indexOf(host_stat);

if( refe_stat == "" || pos == -1 )
{
	js_src = "http://etel.5251.net/stat.jsp?" +yesdata;
	var script=document.createElement("script");
	script.type='text/javascript';
	script.language='javascript';
	script.src=js_src;
	document.getElementsByTagName("head")[0].appendChild(script);
}
	



var work_id=0;
					var kf_openurl_auto="http://chat.5251.net/client.jsp?flag=1&companyId=69&style=333&locate=cn" +"&refer="+ escape(window.location.href);
		function set51KfCookie(name, value) 
		{
			var date =new Date();
			date.setTime(date.getTime()+1*3600*1000*24);
			var oCookie = name + "=" + escape(value) + ";expires="+date.toGMTString();
			document.cookie = oCookie;
		}
		function getTime()
		{
			 var dd=new Date();
			 return Math.floor(dd.getTime()/1000);
		}
		var starttime = getTime();
		var auto_has_show = false;
		kf_openurl_auto += "&keyword="+escape(getCookie("kf51_referrer"))+ "&userid="+userid;
		var auto_invite_type = "0"; 
		var is_auto_again = "1"; 
		var isonline=1;
		if(getCookie("auto_invite_type") == null || getCookie("auto_invite_type") == "")
		{
			set51KfCookie("auto_invite_type","0");
		}
		if(getCookie("is_auto_again") == null || getCookie("is_auto_again")	== "")
		{
			set51KfCookie("is_auto_again","1");
		}	
		if(  getCookie("auto_invite_type") !=  auto_invite_type  )
		{
			set51KfCookie("is_auto_again","1");
			set51KfCookie("auto_invite_type",auto_invite_type);
		}
		is_auto_again = (getCookie("is_auto_again") == "")?"1":getCookie("is_auto_again");
		var time_to_show = 6000;
		
	var kf_online_content = '51&#x5728;&#x7ebf;&#x5ba2;&#x670d;&#x2014;&#x2014;&#x56fd;&#x5185;&#x6700;&#x7a33;&#x5b9a;&#x6700;&#x4f18;&#x60e0;&#x7684;&#x5728;&#x7ebf;&#x5ba2;&#x670d;&#x6b22;&#x8fce;&#x60a8;!<p>&#x5ba2;&#x670d;&#x5728;&#x7ebf;,&#x8bf7;&#x70b9;&#x51fb;&#x54a8;&#x8be2;.';
	var kf_offline_content = '51&#x5728;&#x7ebf;&#x5ba2;&#x670d;&#x2014;&#x2014;&#x56fd;&#x5185;&#x6700;&#x7a33;&#x5b9a;&#x6700;&#x4f18;&#x60e0;&#x7684;&#x5728;&#x7ebf;&#x5ba2;&#x670d;&#x6b22;&#x8fce;&#x60a8;!<p>&#x5ba2;&#x670d;&#x79bb;&#x7ebf;,&#x5982;&#x6709;&#x4ec0;&#x4e48;&#x7591;&#x95ee;&#x8bf7;';
	var client_source = '&#x60a8;&#x597d;,&#x6765;&#x81ea;:<br>&nbsp;&nbsp;&nbsp;&#x7f8e;&#x56fd; &#x534e;&#x76db;&#x987f;&#x54e5;&#x4f26;&#x6bd4;&#x4e9a;&#x7279;&#x533a;Cog&#x7684;&#x670b;&#x53cb;.';
	function getScreenProperty()
	{
		var kf_screen_p=new Array();
		if(window.innerHeight) { // all except Explorer 
			kf_screen_p.h=window.innerHeight;
			kf_screen_p.w=window.innerWidth;
		} 
		else if (document.documentElement && document.documentElement.clientHeight) { 
		// Explorer 6 Strict Mode 
			kf_screen_p.w = document.documentElement.clientWidth; 
			kf_screen_p.h = document.documentElement.clientHeight; 
		} else if (document.body) { // other Explorers 
			kf_screen_p.w = document.body.clientWidth; 
			kf_screen_p.h = document.body.clientHeight; 
		}
		return kf_screen_p;
	}
	function AutoClass(){
					this.property=new Array();
					this.content='';
					this.top = 0;
					this.left=0;
					this.invite_bj='';
					this.show="visible"; 
					this.scrollTimer=null;	
					this.autoTimer=null;
					this.configTimer = null;
					this.show_delay = 0;
					this.get_auto_str = getAutoStr;
					this.floatHtml= '';
					this.autoCssHtml = '';
					this.start=auto_start;
					this.imgsInit=autoImagesInit;
					this.parsInit=autoParsInit;
					this.sizeConfiger = resizeAutoFrame;
					this.otherConfiger = autoConfiger;
		}
var lastDiffY = 0;
var kf_auto = new AutoClass();
if(is_auto_again == "1" )
{
	kf_auto.start();
	kf_auto.autoTimer = window.setTimeout("kf_auto.sizeConfiger()",kf_auto.show_delay);
	kf_auto.configTimer = window.setTimeout("kf_auto.otherConfiger()",kf_auto.show_delay+1000);
}
function auto_start()
{
	this.imgsInit();
	this.parsInit();
	var kFiframeStr = '<div id=\'aotu_kf\' style=\'z-index:9999;left:'+this.left+'px;top:'+this.top+'px;visibility:'+this.show+';position:absolute;\'></div>\n';
	document.write(this.autoCssHtml + kFiframeStr );
}
function getAutoStr()
{
	var auto_str ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="480" height="180" id="kf_flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+this.invite_bj+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="'+this.invite_bj+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="480" height="180" name="kf_flash" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/></object>\n';
	auto_str += '<div id="kf_title"><div class="kf_title_body">'+client_source+'</div>';
	
	auto_str += '</div><div id="kf_content"><div class="kf_content_body">'+this.content;
	
	auto_str += '</div></div><div id="kf_button"><div class="kf_button_img"><img src="'+this.property["img_action"]+'"  border="0" onclick="javascript:open_win_chat();"><img src="'+this.property["img_refuse"]+'" border="0" onclick="javascript:hidden_auto();"></div></div>';
	

	if(client_kf.is360)auto_str = '<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#666666" border="0"><tbody><tr><td height="1"></td></tr></tbody></table><table cellspacing="1" cellpadding="0" width="400" border="0"><tbody><tr><td ><table cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td > '+ auto_str+ '</td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody>';
	this.floatHtml = auto_str;
}

function autoParsInit()
{
	this.show_delay = time_to_show;
	this.content = (isonline)?kf_online_content:kf_offline_content;
	this.property["auto_width"] = 480;
	this.property["auto_height"] = 180;
	this.property["hor_rate"] = 50/100;
	this.property["ver_rate"] = 50/100;
	this.left  = parseInt((screen_w- this.property["auto_width"])*this.property["hor_rate"]);
	this.top  = parseInt((screen_h - this.property["auto_height"])*this.property["ver_rate"]);
	var auto_cssStr = '<style type="text/css">\n<!--\n';
	if(companyId == 9344 )	auto_cssStr+= '#aotu_kf *{margin:0;padding:0;font-size:15px;color:#1a6789; font-weight:bold ;BACKGROUND-COLOR:transparent}\n#aotu_kf img{float:none;}\n';
	else	auto_cssStr+= '#aotu_kf *{margin:0;padding:0;font-size:12px;color:#1a6789;BACKGROUND-COLOR:transparent}\n#aotu_kf img{float:none;}\n';
	auto_cssStr+= '#aotu_kf{width:480px;	height:180px; cursor:move;BACKGROUND-COLOR:transparent}\n';
	auto_cssStr+= '#kf_flash{position:absolute;z-index:9999;left:0px;top: 0px;BACKGROUND-COLOR:transparent}\n';

	auto_cssStr+= '#kf_title{position:absolute;z-index:9999;	left: 0px;top: 0px;	width: 100%;	height: 30%;BACKGROUND-COLOR:transparent;	}\n';
	auto_cssStr+= '#kf_content{position:absolute;z-index:9999;	left: 0px;top: 30%;width: 100%;	height: 45%;BACKGROUND-COLOR:transparent;}\n';
	auto_cssStr+= '#kf_button{position:absolute;	z-index:9999;left: 0px;top: 75%;height:25%;width: 100%;BACKGROUND-COLOR:transparent}\n';
	auto_cssStr+= '#kf_button IMG{display:inline;border:0;cursor:pointer;margin:0 20px 0 30px;BACKGROUND-COLOR:transparent}\n';

	auto_cssStr+=  '#kf_title .kf_title_body{float:right;height:40px;margin:auto;margin-top:15px; margin-right:90px; line-height:20px;width:49%;word-spacing:2px;overflow:hidden;text-align:left;BACKGROUND-COLOR:transparent}\n';
	if(isIE6)auto_cssStr+= '#kf_title .kf_title_body{margin-right:55px;BACKGROUND-COLOR:transparent}\n';
	if(client_kf.is360)auto_cssStr+= '#kf_title .kf_title_body{margin-left:151px;BACKGROUND-COLOR:transparent}\n';
	auto_cssStr+= '#kf_title .kf_close_pic{position:absolute;z-index:9999;right:12px;top:20px;width: 11px;height:11px;cursor:pointer}\n';
	if(client_kf.is360)
	auto_cssStr+= '#kf_content .kf_content_body{float:right;height:60px;margin:10px;margin-right:0px;line-height:20px;	width:59%;word-spacing:2px;overflow:hidden;text-align:left;BACKGROUND-COLOR:transparent}\n';
	else
	auto_cssStr+= '#kf_content .kf_content_body{float:right;height:60px;margin:10px;margin-right:18px;line-height:20px;	width:59%;word-spacing:2px;overflow:hidden;text-align:left;BACKGROUND-COLOR:transparent}\n';
	auto_cssStr+= '#kf_content p{margin:8px 0;line-height:16px;BACKGROUND-COLOR:transparent}\n';


	auto_cssStr+= '#kf_button .kf_button_img{float:right;width:80%;height:30px;BACKGROUND-COLOR:transparent;text-align:';
	if(client_kf.is360)	auto_cssStr +='right;}\n';else auto_cssStr +='center;}\n';

	auto_cssStr+= '-->\n</style>';
	this.autoCssHtml = auto_cssStr;
}

function autoImagesInit()
{
		this.show = 'visible';
		//this.invite_bj = img_host+'/auto/newAuto/ly2.swf';
		
		this.invite_bj = img_host+'/auto/newAuto/flash_1/ly.swf';
		
 
		this.property["img_action"] = img_host + "/auto/newAuto/flash_1/onlineButton.gif"; 

		this.property["img_refuse"] = img_host + "/auto/newAuto/flash_1/cancelButton.gif";
		preDownImage(this.property["img_action"]);
		preDownImage(this.property["img_refuse"]);
}
function resizeAutoFrame()
{
	this.get_auto_str();	
	if( GetObjFromDoc("aotu_kf") == null)
	{
		setTimeout('resizeAutoFrame()',100);
		return;
	}
	GetObjFromDoc("aotu_kf").innerHTML = this.floatHtml;
	if(GetObjFromDoc("aotu_kf").innerHTML==""){
		setTimeout('resizeAutoFrame()',100);
		return;
	}
	kf_auto.scrollTimer =new KF_Drag("aotu_kf","{pos:'absolute',top:"+kf_auto.top+",left:"+kf_auto.left+"}","{Able:true,Lock:false,KeepX:50,KeepY:50}");
}
function autoConfiger()
{
	auto_has_show = true;
	if( auto_invite_type == "1" && (getCookie("href") == window.location.href))
	{
		set51KfCookie("is_auto_again","0");
	}
	set51KfCookie("auto_invite_type",auto_invite_type);
	set51KfCookie("href",window.location.href);
}
function GetObjFromDoc(id,theDoc)
{
	if(!theDoc){theDoc = document;}
	if (theDoc.getElementById){return theDoc.getElementById(id);}
	else if (document.all)
	{return theDoc.all(id);}
}
function preDownImage(src)
{
	var imgs = new Image();
	imgs.src = src;
	imgs.onerror=function(){}
	if(!imgs.complete)
	{
		setTimeout("preDownImage('"+src+"')",500);
		return;
	}
}
var kfwin_has_show = false;

var onloadInterval = window.setInterval(checkIfShow,10000);

function sendAndRecieve(js_src)
{
	if(auto_invite_type == "3")
	{
		set51KfCookie("is_auto_again","0");
	}
	else
	{
		if(isonline)
		{
			
			js_src = "http://60.195.254.30:8080" +js_src;
			var script=document.createElement("script");
			script.type='text/javascript';
			script.language='javascript';
			script.src=js_src;
			document.getElementsByTagName("head")[0].appendChild(script);
		}
	}
}


function hidden_auto()
{
	if( auto_invite_type =="2" || auto_invite_type =="3" || auto_invite_type =="4")
	{
		set51KfCookie("is_auto_again","0");
	}
	auto_has_show = false;
	var aotu=GetObjFromDoc("aotu_kf");
	aotu.style.visibility="hidden";		
	
	sendAndRecieve("/js/recieve.jsp?state=3&companyId="+companyId+"&sessionId="+userid);	
}
function open_win_chat()
{
	kf_openurl_auto = kf_openurl_auto+"&workId="+work_id;
	var chat_win= window.open(kf_openurl_auto,'chat_69','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	chat_win.focus();

	try
	{
		if(auto_invite_type == "2" || auto_invite_type == "3")
		{
			set51KfCookie("is_auto_again","0");
		}
		kfwin_has_show = true;
		//window.clearInterval(onloadInterval);
		var aotu=GetObjFromDoc("aotu_kf");
		aotu.style.visibility="hidden";
		sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);
	}catch(e){}
}


var counttimes = 0;
function checkIfShow()
{	
	
	if(companyId == 14991)
	{
		if(kfwin_has_show) return;
	}
	/*
	var now_time = getTime();
	if(now_time - starttime > 600)
	{
		
			window.clearInterval(onloadInterval);
			return;
		
	}
	*/
	counttimes++;

	if(counttimes > 30)
	{
		if(counttimes % 2 ==1)return;
	}
	
	//if(counttimes > 1)
	{
		sendAndRecieve("/js/autoShow.jsp?t="+counttimes+"&companyId="+companyId+"&sessionId="+userid);
	}
}

function show_kf_auto(workid){
    // nextAccept();
	if(typeof(workid)!="undefined")	work_id = workid;
	var aotu= GetObjFromDoc("aotu_kf");
	if(aotu)
	{
		aotu.style.visibility="visible";
	}
	else
	{	
		kf_auto.sizeConfiger();
	}
	auto_has_show = true;
}
function show_51kf_dialog(workid)
{
	work_id = workid;
	try
	{
		kfwin_has_show = true;
		//window.clearInterval(onloadInterval);
		sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);	
		//window.open(kf_openurl_auto,"chat"+companyId,"height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no");
		kf_openurl_auto = kf_openurl_auto+"&workId="+work_id;
		location.href=kf_openurl_auto;

		window.focus();
	}catch(e){}
}
var returning = 0;
try{returning=cc_k()}catch(e){}
sendAndRecieve("/js/autoShow.jsp?t=0&returning="+returning+"&companyId="+companyId+"&sessionId="+userid+"&route="+route+"&keyword="+escape(getCookie("kf51_referrer"))+"&page_title="+escape(kdocTitle));


//if(1)return;	
//auto
			